and then created the about page hugo new about.md, but the page just shows
About
February 29, 2024
Is archetypes/default.md being applied instead? It seemed like it worked a few times, but if I reloaded or restarted the development server or deleted content/about/md and recreated it, it would go back to
You can create an archetype for one or more content types. For example, use one archetype for posts, and use the default archetype for everything else:
There seems to be some confusion about archetype vs. content vs. template.
An archetype is a template for new content. Archetypes go in the archetypes directory. Many sites have one archetype they use for everything (the default archetype), while other sites might have two or more archetypes if a particular content type requires additional front matter fields specific to that content type.
Content is created in the content directory. The default front matter is based on the archetype. To create an “about” page at the root of your site, do one of:
hugo new content content/about.md
OR
hugo new content content/about/index.md
Use the second one if you intend to add resources (e.g., images) specific to this content. For example:
Templates go in the layouts directory, and contain the HTML and template code required to render the page. To create a template that will only be used for the “about” page:
So the biggest difference between using content/about/index.md or layouts/default/about.html is that the latter allows you to use more HTML/CSS/etc? They’re both perfectly acceptable methods?
Sorry to keep pestering, but why is /content/about/index.md required? I see that I can create /layouts/_default/about.html and render my info without the content page. Not doubting or anything, just curious as to why it’s standard
just asking for the sake of understanding hugo Useless how? If I have the following in /layouts/_default/about.html, I see ‘hello’ when I visit https://localhost:1313/about.
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.