Closed phol closed 4 years ago
For an example of creating a folder for docs content named docs
see https://github.com/sourcethemes/academic-www/tree/master/content/en/docs
Yes, I also reviewed that possibility, but for my use-case, I am using folders per project and would like to have an overview of entries as is the case on the /courses
page on the exampleSite
.
This is why I was wondering if /docs
is a purposefully reserved folder name.
If that's the case then this is not a bug. If that's not the case, it is.
Refer to the Hugo docs/forums - Hugo has a feature where you can specify layout
or type
in the front matter of pages to use a layout or type other than the default.
I made a screencast describing the issue.
This is what happens when I run hugo server -D
and I go back and forth between courses
, documentation
and docs
.
https://imgur.com/qhcGUfu
You can see that it errors when I rename the folder docs
, but it doesn't error when renamed to anything else.
The issue appears related to the nuances of how Hugo handles content.
It appears that in your example, Hugo is no longer recognising the page as a Hugo section of sections, but as a Hugo list. Hence, it attempts to apply the wrong layout.
An easy workaround is just to name the folder as something other than docs
and change the URL in config.toml
using Hugo's permalink feature - see Hugo docs.
Alright, thanks for your suggestion, I will try that. If it would be useful, I can open an issue on the hugo repository?
This issue has been automatically marked as stale because it has not had any recent activity. The resources of the Academic team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master
branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically close soon if no further activity occurs. Thank you for your contributions.
Describe the bug
I wanted to create a documentation section for my blog. Therefore, I copied the
courses
folder fromthemes/acadamic/exampleSite/content
. Renaming this, as is suggested in the documentation, todocs
causes the following error:To Reproduce
Steps to reproduce the behavior:
academic-kickstart
exampleSite/content/courses folder
courses
todocs
.Expected behavior
It should not error. I should be able to successfully rename everything to
docs
. The problem has to be something with calling the folderdocs
, because if I instead call itdocumentation
and follow the exact same steps, it doesn't give this error.Technical details:
v4.8.0
Hugo Static Site Generator v0.69.2/extended darwin/amd64 BuildDate: unknown
macOS Catalina Version 10.15.4, Firefox 75.0.