Where does hugo get its landing page from?

I am new to hugo and wanting to learn at least a few basic things. So, I decided to Quick start and get things going.

However, my question is not on what file to edit to add new material (that information) is there, but on how a html file is created that takes the markdown file? What files do hugo look at, in a theme or elsewhere, to decide how to, for instance, format or lay out the different pieces to come up with as a landing page?

I found the following slow start: however, it does not really answer the question.

My question is not on the files to be edited for content, but where the “hugo renderer” ge its style from.

Any pointers here for my question? Many thanks!

In a simplistic implementation…

  1. Hugo grabs your text and metadata from the content file in the content directory.
  2. It picks a template from the layouts directory based on a predefined lookup order.
  3. It wraps that template inside a baseof.html shell.
  4. It processes related assets such as CSS, JS, and images.
  5. It compiles these pieces into a final HTML file saved in the public directory.

For foundational questions like this, AI assistants like Gemini or ChatGPT are actually great resources for getting quick, clear breakdowns.

Thank you! Assuming that the questons have been asked multiple times, AI tools are fine, no doubt, but they are also good at someimes making stuff up.

But my question was not really answered there,

From what I understood, the baseof.htmlinside the ananke theme (say) is what is looked at. But isn’t this file the base template for all files. How does it know where to get the landing page from?

Is the home the same as a landing page?

Template types

Introduction to templating I guess I should also look into this so see what the baseof file syntax stands for? It is not the usual html (or at least is more advanced than what I am used to).

Btw, I am just curious, but there is code here for TOML, YAML and JSON as examples, but the MD area appears to be missing: for example, Introduction to templating in contacts/annual-conference.md?

Thank you again!

content/_index.md

Hugo asks, “What is the page kind?” → home
Hugo asks, “Which template type should I use?” → home falling back to list
Hugo asks, “Based on the define actions in this template, should I wrap it in a base template?” → yes

Reference:

1 Like