I manage to make the index.html to render properly, turns out I needed to replace my layouts folder which is weird as it wasn’t instructed that I needed to replace my layouts folder or do I get Hugo set up wrong? The first theme I installed was the Strata theme and it has a slightly different way of doing things then Type. I followed this guide btw
Okay, so it seems it has something to do with index.md as when I create a new file called about.md and copy paste the content from index.md, the page renders correctly. Any idea why does it work this way? Cause the tutorials certainly didn’t say so.
You’ve posted a lot of information, but it’s not clear what steps you actually took and what the issue is. Are you trying to set up a site on Netlify and having problems? Is it not working on your local computer? Which version of Hugo are you using? How did you create your site? Is it possible for you to put a copy of your site up on GitHub and post a link to it?
I decided that the theme used wasn’t appropriate for what I wanted to do, so I ended up choosing this theme to replace it http://themes.gohugo.io/type/
I followed the instructions given
In order to get your site running, you need to copy config.toml and data/l10n.toml into the root folders.
But turns out my page ended up with the content not appearing (CSS and HTML seem to render fine). I tried copying the data folder since by default, the theme already has some content in it, as my logic was, if I were to copy and replaced my current data folder, it’ll surely show something.
After doing that, no change, content still not appearing
I found out that my current Layouts folder is very different from the one given in Type Theme, so I decided to replace my current Layout folder to the one given by Type Theme and the theme finally renders as expected (with content), however upon clicking my about page (about/index.md), it still has no content.
I managed to solve my about page issue by creating a new file in the same directory (about/about.md) and now the site worked as intended, with all contents and about page displayed correctly.
So those are the steps that I did, what I don’t understand was, why didn’t the theme worked as the instructions given? Since I had to do many workarounds and I still don’t understand why index.md won’t render the content but creating a new file with the same content and naming it differently will render the content?.
I come from Wordpress background, so replacing theme in Hugo has been a real surprise to me.
I’m the maintainer of the type theme. The instructions given in the README in combination with the exampleSite folder show the example posts on the homepage as expected.
With the given information, especially about the layout directory, it’s not possibe to determine why the templates aren’t rendered. Did you left templates from prior themes in this folder which might created a naming conflict? Nonetheless, it seems that fixed this issue on your own.
So those are the steps that I did, what I don’t understand was, why didn’t the theme worked as the instructions given? Since I had to do many workarounds and I still don’t understand why index.md won’t render the content but creating a new file with the same content and naming it differently will render the content?.
Hugo 0.18’s new thing is that now everything is a page. In prior versions index.md rendered as expected to index.html. Since about is also a section (like posts) it could contain multiple content files that usually would be listed at about/index.html.
The order of the template rendering in recent versions of Hugo made it possible that the content list of the about section was overwritten by about.md. The current version doesn’t guaranty this processing order.
The easiest option would to rename about/index.md (like you did) and to add url = "/about/" to the frontmatter. This should force Hugo to render the page under the given url.