You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Hugo server is not staging or detecting my content updates when I publish the server, How to fix it?
11
+
### Why doesn't Hugo show my changes when I'm editing my markdown files?
13
12
14
-
There could be multiple reasons for the Hugo server not detecting your content updates. Please try the following steps in order:
13
+
There could be multiple reasons for the Hugo server not detecting your content updates.
15
14
16
-
* Check that you are pusblishing the server from the right directorty where you are updating your learning path (You might have multiple locations where you are updating and saving your content to and you could be starting the server from the wrong location/directory).
15
+
Please try the following steps in order:
17
16
18
-
* Your Browser might be caching the older version of your server/pages. Please clear your browser history or turn off cashing or simple open a new private tab/window and call your page from there.
17
+
1. Check that you are running the server from the right directory
18
+
19
+
You might have multiple locations where you are updating and saving your content to and you could be starting the server from the wrong location/directory.
20
+
21
+
2. Confirm the port number
22
+
23
+
The first port number used is 1313. If you run a second `hugo server` command a new port will be chosen. Your browser may be connected to a different Hugo server than you expect.
24
+
25
+
3. Draft mode is activated
26
+
27
+
Draft mode is used during content review and editing to avoid publishing Learning Paths before they are ready.
28
+
29
+
If you see draft settings as shown below in an _index.md or at the top of an install guide it means draft mode is on.
30
+
31
+
```console
32
+
draft: true
33
+
cascade:
34
+
draft: true
35
+
```
36
+
37
+
To see the content in the browser you have two options:
38
+
39
+
1. Remove the draft mode tags.
40
+
41
+
2. Run Hugo with the draft flag.
42
+
43
+
This tells Hugo to render the draft articles.
19
44
20
-
* Draft mode is activated: sometimes when we return back your learning path after we review it for adjustments, we usually enable "Draft Mode" which will not stage any new content to be published. Once you pull back the learning path changes "Draft Mode" will be activated by default. To fix this issue you can try one of the following options:
21
-
1. Remove the "Draft Mode" tags. Ususally, you will find "draft: true" tag(s) on the main/first page of your learning path (it could also be in other pages). Simply comment out those tags or remove them till you are done with your updates and rerun the Hugo server again.
Copy file name to clipboardExpand all lines: content/learning-paths/cross-platform/_example-learning-path/setup.md
+6-69Lines changed: 6 additions & 69 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,8 +35,7 @@ Three possible ways to set up a development machine are covered below.
35
35
Select **one** that works for you. Please share other ways that work for you
36
36
37
37
- A [local computer (Linux, macOS, or Windows)](#option-1-set-up-a-local-computer)
38
-
- A [Gitpod instance](#option-2-set-up-gitpod) with tools pre-installed (easiest to set up and manage)
39
-
- A [remote Linux server](#option-3-set-up-a-remote-linux-server) via SSH (on your local network or from a Cloud Service Provider)
38
+
- A [remote Linux server](#option-2-set-up-a-remote-linux-server) via SSH (on your local network or from a Cloud Service Provider)
40
39
41
40
## Option 1: Set up a local computer
42
41
@@ -89,8 +88,9 @@ Check Hugo is installed correctly and check the version by running this command:
89
88
hugo version
90
89
```
91
90
92
-
Navigate into the `arm-learning-paths` folder and run hugo to launch a
93
-
development version of website on your machine.
91
+
Most recent versions of Hugo will work, but you may face errors if the version is too old.
92
+
93
+
Navigate into the `arm-learning-paths` folder and run hugo to launch a development version of website on your machine.
94
94
95
95
```bash
96
96
cd arm-learning-paths
@@ -107,37 +107,7 @@ Open a browser and go to [http://localhost:1313](http://localhost:1313)
107
107
108
108
You are now ready to start developing content. The content creation process consists of editing the markdown files for Learning Paths and viewing the changes on your computer using Hugo.
109
109
110
-
## Option 2: Set up Gitpod
111
-
112
-
The second option is to use Gitpod as a development environment.
113
-
114
-
[Gitpod](https://www.gitpod.io/) is a cloud development environment (CDE) which makes it easy to create software from any computer.
115
-
116
-
Instead of installing tools on your local computer, you can create and modify content directly in Gitpod. The repository is configured to initialize a Gitpod instance with all tools/software you need to start contributing right away.
117
-
118
-
Visit your fork of the GitHub project in your browser.
119
-
120
-
Install the [Gitpod Chrome Extension](https://chrome.google.com/webstore/detail/gitpod-always-ready-to-co/dodmmooeoklaejobgleioelladacbeki) which installs a Gitpod button in your GitHub projects.
121
-
122
-
If you do not want install the browser extension, you can also prefix the URL for your fork of the GitHub project with gitpod.io/# to open the project in Gitpod.
123
-
124
-
Either way, open the repository in Gitpod. The URL looks like this: https://gitpod.io/#github.com/ArmDeveloperEcosystem/arm-learning-paths (replace with the path to your fork).
125
-
126
-
You can use your GitHub credentials, or select another authentication method to login to Gitpod and use the Free plan which offers 500 credits (about 50 hours) per month.
127
-
128
-
A new project will open in the browser. This is VS Code with the project loaded in your browser.
129
-
130
-
All the required tools are installed automatically by Gitpod during the environment setup.
131
-
132
-
A view of the generated site is also opened automatically. The website view is not easy to see because it's in a sub-window of VS Code.
133
-
134
-
To move the website view into another browser tab, click on the top right corner. The tooltip for this click is “open in browser”.
135
-
136
-
This gives you a private version of the content in a new tab to review.
137
-
138
-
You are now ready to edit markdown files and view the results in the Gitpod environment.
139
-
140
-
## Option 3: Set up a remote Linux server
110
+
## Option 2: Set up a remote Linux server
141
111
142
112
The third option for Learning Path development is to use a remote Linux server, such as an AWS EC2 instance or other cloud virtual machine. The remote Linux server can also be on your local network.
143
113
@@ -184,41 +154,8 @@ You are now ready to edit markdown files and view the results on the Hugo server
184
154
185
155
{{% notice Note %}}
186
156
187
-
If your content is not updating/staging on your web browser after you save it correctly then please check the [Troubleshooting section](/learning-paths/cross-platform/_example-learning-path/appendix-5-troubleshooting/) for debugging instructions.
157
+
If your content is not updating/staging on your web browser after you save it correctly then please check the [Troubleshooting section](/learning-paths/cross-platform/_example-learning-path/appendix-5-troubleshooting/).
188
158
189
159
{{%/notice%}}
190
160
191
-
## Enable the search box on the home page {#search}
192
-
193
-
When you run `hugo server` you will not see the search box on the home page. You don't need to do anything for the search feature to find your content, but you may want to enable the search box and test it during your development.
194
-
195
-
The search feature requires search index data to be created. If the data is available, the search box will appear on the home page.
196
-
197
-
To see the search box run the following commands before you run `hugo server` as described above:
If you have `pagefind` installed on your computer, or if your computer is supported by one of the `pagefind` in the `bin/` directory, then you can run the `hugo-server.sh` script, located at the top of the repository, to create the search index and start the server. If no suitable `pagefind` is available for your computer, the server will still be launched, but without the search index.
The search index does not automatically update as you enter content. You can run `hugo` and `pagefind` again and restart `hugo server` to update the search index with your current content.
222
-
{{% /notice %}}
223
-
224
161
The next section will cover how to create and format Learning Paths.
0 commit comments