Skip to content

Commit 51eef8a

Browse files
Merge pull request #2866 from mohamed-ismail99/main
Added a troubleshooting section for hugo
2 parents ae120ba + eaa1e8d commit 51eef8a

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
# User change
3+
title: "Troubleshooting"
4+
5+
weight: 12 # 1 is first, 2 is second, etc.
6+
7+
# Do not modify these elements
8+
layout: "learningpathall"
9+
---
10+
## Hugo Server Issues
11+
12+
### Hugo server is not staging or detecting my content updates when I publish the server, How to fix it?
13+
14+
There could be multiple reasons for the Hugo server not detecting your content updates. Please try the following steps in order:
15+
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).
17+
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.
19+
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.
22+
2. Rerun the server using the following options:
23+
```bash
24+
hugo server --buildDrafts=false
25+
```
26+
or
27+
```bash
28+
hugo server -D
29+
```

content/learning-paths/cross-platform/_example-learning-path/setup.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ Open a browser and go to [http://localhost:1313](http://localhost:1313)
182182

183183
You are now ready to edit markdown files and view the results on the Hugo server.
184184

185+
{{% notice Note %}}
186+
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.
188+
189+
{{%/notice%}}
190+
185191
## Enable the search box on the home page {#search}
186192

187193
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.

0 commit comments

Comments
 (0)