Hugo 0.18 ignores index.md in the section

this one …
(.LinkTitle is set in the frontmatter of the pages)

I meant: The complete code, i.e. the Hugo project.

And, btw: If you want an /index.html in every folder, you should turn off those uglyURLs.

How do I do that? upload a zip somewhere?

Sort of. I think you mean _index.md and not index.md. The latter may work…for the time being, but the _ is important for 18+…or you might have some unpredictable behavior.

Note that @bep says single pages. _index.md is a section/list page. This is why I mentioned the .GetPage function.

Right. That’s what I’m talking about with unpredictable behavior. If you want index.md to render to sectionname/index.html, use _index.md. If you want to call information for that section’s _index.md specifically, use the .GetPage function.

Also, what’s in your site config for the uglyURLs value? It looks like you want ugly urls, which would be motorhome.html, no?

No, if I understand the docs right _index.md would be the frontmatter and content for the section list file, motorhome.html on root level in this case, see above structure.

but then the site will not be portable, e. g. on cd or usb stick etc. since all urls are “cut off”

I have three comments:

One. I appreciate this is confusing and am working on improving the docs to make the _index.md concept clearer. It took me a while to wrap my head around it as well.
Two. These two phrases are, quite literally, identical:

Three. I literally have no idea what this means:

I think your confusion in this case is regarding the difference between pretty and ugly URLS:

Pretty

Read as source content => pretty url => full file path:

  1. content/motorhome/_index.md => yoursite.com/motorhome/ => yoursite.com/motorhome/index.html
  2. content/motorhome/engine.md/ => yoursite.com/motorhome/engine/ => yoursite.com/motorhome/engine/index.html
  3. content/motorhome/solar.md => yoursite.com/motorhome/solar/ => yoursite.com/motorhome/solar/index.html

Ugly

…everything you put above.

Pointing me to source/a repo would make this a lot easier. Otherwise, I’m not sure how much more help I can provide you at this point.

A link to a source repo or a zip file either here (if possible) or attach it to an issue on GitHub.

ok, thanks.
I’ll work through setting up git - and once I survived I’ll upload an extract (the complete source with ALL pages and statics is way to large for my slow internet connection (upload)).

I’ll come back when finished.

@ominty If you have a slow connection, just worry about making the source providable and not necessarily the published website. Let me know if you run into any snags :smile:

Note that it is NOT my goal to collect as many index.html as I can and thus create a ridiculous number of folders.
It’s the other way round: IF I have a folder, I want to place an index file in it.
Depending on the server configuration it may result in a directory listing when you call an adress like http://www.domain.tld/folder/ and no index in it - this is regarded to be a security issue since the early days I started web publishing around 15 years ago.
For this reason I even place an index file in every static folder with either no content or redirecting to the homepage or some other convenient target.

Another reason: every file AND every folder causes a request when updating the site (the public folder) via ftp. This especially annoying when abroad and have slow connection with high roaming fees.

just put the public folder on a flash storage unit e. g., point your browser to the starting (home) page, let it load and then click on any link to any other page of the site and see what happens … or not.

A static web page MUST be running on any storage device since in a business environment an internal webserver may not be available while an internal shared drive almost always is.

try in config.yaml

relativeURLs:               true
canonifyURLs:               false

That is a bold statement. I understand the requirement, and Hugo supports it if you are careful with your URL generation, but if “your business environment” does not have a web server, then get one. It is a trivial task.

Gotcha. But the thing is this: the number of files will be the same. Yes, there are more folders, but do folders take up that much disk space?

Also, maybe my knowledge of routers/servers is lacking, but I don’t see how having pagename/index.html verses pagename.html has any measurable effect on the end user (ie, of your web site, not you the developer) trying to access your content from mobile, low-broadband, etc…

I don’t think pages “run” on a storage disk, do they? Also, if they’re on a local storage disk, I don’t think you need to worry about how long it takes to transmit the file when being opened from a local file system. I’m not interested in arguing with you. Just trying to help :smile: Just make sure you don’t include any AJAX in your pages, since this won’t work for your colleagues if not being run from an actual server. This can be changed, I believe, with certain flags in Chrome, but this leads me to my next point…

I get the feeling this is all for an internal-only website for your company and you’re using FTP to upload? @ArjenSchwarz put together an amazing tutorial on his site for combining Wercker with GitHub and S3 to create a “private” website. It works like a charm, although VPN can cause you some grief. I’m using this for two different Hugo sites at my company. This could also help you in multiple ways:

  1. If you have a slow connection, you’re only uploading source to Github (i.e., diffs/deltas rathe than the full site via FTP, which I empathize can be a total pain in the neck)
  2. It puts all your source in source control, which I hope you’re already doing for your own sanity.
  3. It lets you automate the build, which will save you developer time, which in a Unix-y world (and mine as well), is more important than machine time :smile:

If you’re interested and think it could help, feel free to PM me and maybe I can figure out a way to give you access to the source. HTH. Cheers.

sorry to say, but I’m working for a foreign subsidiary of an American company with outsourced IT infrastructure - they even stopped our sharepoint environment (which is a kind of web server) from delivering HTML files for that beeing a “security threat” (now it’s a shared drive - and being portable I just copied the files - and done) … no more comment on that, I fear - it’s fruitless discussing with those people.

@Mikhail: that’s what I have - pls. see above

@rdwatters: thanks for all your advice but I run several websites, some internal, some not - and not all of the issues I mentioned are related to every of the sites. The thing is that all of these had no issues for all the time - I simply used something like Bluefish to create them.

But having them all up and running for years and then have to change to responive design made me look for something like Hugo: being able to have the same static sites as output AND being able to use templates - so I thought.
(and hopefully having the same site structure so all external incoming links will still work :slight_smile: )

But please let me stop this discussions about all of the background here - I’d like to go on struggling through that repository git thing to provide you with some - I hope - useful input for the discussion on the issues I mentioned above.

I put a repo here, I hope I did things right :confused:

In the discussion about the issue 3102 @bep pointed me to a workaround of that bug:

use override url in frontmatter e. g. in /motorhome/index.md it would be
url = "/motorhome/index.html"

and this brings Hugo to work as expected for the time being:

/motorhome/index.md (without the underscore) is rendered as content and the link created in my sidenav also points to that content page (/motorhome/index.html)

while

/motorhome/_index.md (with the underscore) delivers frontmatter and content to /motorhome.html which is a list page. (But I have to filter this NOT to create an entry in the sidenav)

I have both index files in use and both do their specific job now :slight_smile: