How should I organize my source files/site?

I tried setting up a Hugo site a couple of years ago but failed. So I’m making a new attempt … but I seem to fail on the most basic stuff.

I better start with a description of the site as I imagine it. The site should have

  • navigation in two languages (Swedish/English)

  • the blog section will have posts in any of two languages but there will no translation of individual posts. In other words I expect to see a listing of posts in both languages.

  • a number of “standard pages” (about, work, etc), these will be in both languages

  • a number of sections with different types of content. I hope to be able to fix the layouts for these sometime in the future - when I hopefully have learned how Hugo works. The language of these sections will be mixed (some pages in Swedish, some in English)

I made an attempt to test my idea to see if everything worked as I hoped. I used this content (shortened to keep the listing short)

content:
	examplesection:
		_index.md
		test.md
	pages:
		en:
			about.md
		sv:
			about.md
	posts:
		_index.md
		test.md

Unfortunately, I didn’t get the expected result (from my point of view :smiley: ):

public:
	css:
	en:
		404.html
		about:
			index.html
	images:
		avatar.jpg
	index.html
	sitemap.xml
	sv:
		404.html
		about:
			index.html

I had expected to find a examplesection folder there somewhere, but I didn’t so I assume I’m doing something stupid. I should perhaps add that I have contentDir set to "content/pages/en" and "content/pages/sv" for respective language.

In short I’m stumbling around trying to figure out how to organize my content. I would be really grateful if someone could point me in the correct direction for how to do this - unfortunately I didn’t understand how to apply the info in the docs to this situation.

Played a bit more and was able to get a little bit further but after reading in the Issue tracker it looks like the functionality suggested in issue 5612 is something that would make things easier for me.

I feel your pain. That is, I was in your shoes a short while ago, and decided to write a step by step tutorial. Would you mind trying it and give me your feedback?

The tutorial is here:
https://vendelin.org/geeky/hugo/

You can check Academic Theme Source Code which has more than 15 multilingual support :globe_with_meridians:

Docs here
Theme Demo

Thanks, I’ve now got something that seem to work (except the blog part but I’m running that on another service so it’s not a problem). I’ve got a few comments of the tutorial, I’ll make a longer more detailed reply later and send it to you.

Yes, this was in fact what I first was looking at but decided to go with another theme instead - mostly because I probably want to extend the functionality later and need to learn how things work. But I really like the bibliography feature and hope that builtin support for this will be available some day.

Great. Good to know👍