the _index.org homepage file just under content is pulling all the articles from the iwrters/author/article/index.org
eg the artichokle/index.org
(this behavior is undesirable for my purposes)
it is not pulling the buddha-stories/index.org though for some reason or anything i add to ibraries. it is pulling anything i add to iwrters though.
the pulling everything from iwrters started when i (thanks to the helpful instruction of @jmooring ), changed all directories to lowercase. (i had some more serious issues when i had caps and some things weren’t working.)
in fact, if i change iwrters to Iwrters, the behavior stops and nothing is pulled on the homepage (which is desirable).
i would like to understand what is happening here:
why capitalizing the toplevel directory to Iwrters stops the pulling behavior for iwrters
why when i hugo new into the ibrarys/books/ directory, the homepage doesn’t pull what i’ve just added.
i am using the zen theme (slightly customized) and the list.html has:
You need to supply the project repo or a repo with dummy content that reproduces the issue for us to see the full context of the project i.e. configuration, templates etc.
When we ask for a sample repo it is best that it is setup so that the issue can be reproduced straight away.
In the link that you shared, all content files, including the homepage _index.md were drafts, also you had omitted the theme setting from the project’s config.
After fixing the above I saw that in the homepage template there is the following statement:
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
You have not specified any mainSections in the config, therefore the Section with the most content files is picked up to populate the homepage list, in this case the ibrarys Section.
What do you want to display on your homepage?
Also have a look at the following page in the documentation:
thank you for your guidance!
i have been using hugo server -D -t prazen continuously and completely forgot that is an inconvenience for others. i have changed things in the repo.
i understand what the problem was thx to your instruction and after reading the text regarding mainSections.
i can stop the pulling of section files by putting the following in my config.toml:
[params]
mainSections = []
mainSections can be the above or [‘home’] or [‘anything-other-than-an-actual-section’]
i will follow-up on your where link further now that i have a much better idea of what to do.
Actually it is not a good idea to use empty parameters.
I suggest that instead that instead you remove the mainSections statement from the homepage template and instead filter the pages by the Section that you want to display by using where.
If the desired behavior is not to have any regular pages on the homepage then simply delete the entire code block for the Page Collection as well as the Pagination.
It’s not a good idea to include empty conditions because you introduce ambiguity in your project and you might encounter unexpected behavior further down the line.