A content type is a way to organize your content. Hugo resolves the content type from either the type in front matter or, if not set, the first directory in the file path. E.g. content/blog/my-first-event.md will be of type blog if no type is set.
A content type is used to
Determine how the content is rendered. See Template Lookup Order and Content Views for more. Determine which archetype template to use for new content.
...
Overview # A content file consists of [front matter] and markup. The markup is typically Markdown, but Hugo also supports other [content formats]. Front matter can be TOML, YAML, or JSON.
The hugo new content command creates a new file in the content directory, using an archetype as a template. This is the default archetype:
archetypes/default.md yaml toml json --- date: '{{ .Date }}' draft: true title: '{{ replace .
...
What is a taxonomy? # Hugo includes support for user-defined groupings of content called taxonomies. Taxonomies are classifications of logical relationships between content.
Definitions # Taxonomy a categorization that can be used to classify content Term a key within the taxonomy Value a piece of content assigned to a term Example taxonomy: movie website # Let’s assume you are making a website about movies. You may want to include the following taxonomies:
...
...
The ref and relref shortcodes display the absolute and relative permalinks to a document, respectively.
Use of ref and relref # The ref and relref shortcodes require a single argument: the path to a content document, with or without a file extension, with or without an anchor. Paths without a leading / are first resolved relative to the current page, then to the remainder of the site.
. └── content ├── about | ├── _index.
...
Overview # By default, when Hugo renders a page, the resulting URL matches the file path within the content directory. For example:
content/posts/post-1.md → https://example.org/posts/post-1/ You can change the structure and appearance of URLs with front matter values and site configuration options.
Front matter # slug # Set the slug in front matter to override the last segment of the path. The slug value does not affect section pages.
...
Overview # To create a menu for your site:
Define the menu entries [Localize] each entry Render the menu with a [template] Create multiple menus, either flat or nested. For example, create a main menu for the header, and a separate menu for the footer.
There are three ways to define menu entries:
Automatically In front matter In site configuration Although you can use these methods in combination when defining a menu, the menu will be easier to conceptualize and maintain if you use one method throughout the site.
...
Hugo ships with support for Disqus, a third-party service that provides comment and community capabilities to websites via JavaScript.
Your theme may already support Disqus, but if not, it is easy to add to your templates via [Hugo’s built-in Disqus partial][disquspartial].
Add Disqus # Hugo comes with all the code you need to load Disqus into your templates. Before adding Disqus to your site, you’ll need to [set up an account][disqussetup].
...
Configure languages # This is the default language configuration:
hugo. yaml toml json languages: null { "languages": null } In the above, en is the language key.
Language keys must conform to the syntax described in [RFC 5646]. For example:
en en-US Artificial languages with private use subtags as defined in [RFC 5646 § 2.2.7] are also supported. Omit the art-x- prefix from the language key. For example:
...
Overview # Hugo supports Markdown attributes on images and block elements including blockquotes, fenced code blocks, headings, horizontal rules, lists, paragraphs, and tables.
For example:
This is a paragraph. {class="foo bar" id="baz"} With class and id you can use shorthand notation:
This is a paragraph. {.foo .bar #baz} Hugo renders both of these to:
<p class="foo bar" id="baz">This is a paragraph.</p> Block elements # Update your site configuration to enable Markdown attributes for block-level elements.
...