AakLak
December 25, 2018, 1:00pm
1
I’m trying to get /architecture/anjees-chalet/ to point to my file.
I’ve got a setup like this
I’ve also tried:
Locally, the index.html pages work.
Oddly, when restarting the server, the index.html pages 404, but if I make an edit and save, they work OK. What’s up with that? (Same happens when I name them index.md)
The live site (hosted on Netlify) also 404’s on the two index.html pages
Wondering why this is, and what I can do to solve it.
Here’s the repo https://github.com/AakLak/rishul
Thank you, and happy holidays
bep
December 25, 2018, 1:31pm
2
You need to look in the documentation and understand the difference between leaf and branch bundles in Hugo.
The “now it works, now it doesn’t” effect you see is parallelism at play.
1 Like
AakLak
December 25, 2018, 2:32pm
3
Thanks for pointing me in the right direction.
Trying to digest this awesome writeup: https://scripter.co/hugo-leaf-and-branch-bundles/
Tried renaming the subfolder index files to _index.md, but that doesn’t seem to be right.
Also tried to accomplish /architecture/anjees-chalet/ by :
maiki
December 25, 2018, 5:11pm
4
Read all the docs. All of them. But first, read https://gohugo.io/getting-started/directory-structure/ .
If you want a page to render at example.org/architecture/anjees-chalet/
, you want one of the following:
/content/architecture/anjees-chalet.md
/content/architecture/anjees-chalet/_index.md
You should not have a theme folder in content
, or any HTML files (it is possible, but for advanced uses, and this is a very basic use).
AakLak
December 25, 2018, 5:23pm
5
@maiki No worries, Arthurs-Theme is not a theme (It’s the name of a restaurant).
Right, I am trying to have:
example.org/architecture/anjees-chalet/
and
example.org/architecture/arthurs-theme/
I’ve tried both of your suggested structures, but no luck
I do also have /content/architecture/index.md
to serve as the example.org/architecture
page, hope that’s OK.
Thanks for your help!
maiki
December 25, 2018, 6:09pm
6
Nope. Bjørn told ya to understand the difference between lead and branch bundles . I’m not sure you need an index.md
anywhere, since you are loading your galleries via shortcode.
When I move your files into place, and use the following for the architecture
directory, the site works as expected:
.
├── anjees-chalet.md
├── arthurs-theme.md
└── _index.md
You’d need a reason to not use this structure.
1 Like
AakLak
December 25, 2018, 6:49pm
7
Edit: Solved: I needed to create a template for my _index.md
I’m trying my best.
Read and read, but not clicking for me just yet.
My structure is now:
example.org/architecture/anjees-chalet/
and
example.org/architecture/arthurs-theme/
are loading now, awesome!
However example.org/architecture
is blank for me. Any advice?
Here’s what I see in the Chrome console if it’s of any use:
Appreciate the help.