Chapter 1

Basics

This is a new chapter.

Introduction

This page was initially created with the command

hugo new --kind chapter basics/_index.md

The kind parameter tells Hugo to start with the templated archetypes/chapter.md which has the contents

+++
archetype = "chapter"
title = "{{ replace .Name "-" " " | title }}"
weight = 1
+++

This is a new chapter.

This just gets us started, we can copy this file out of the theme into our own archetypes directory and add whatever we want. For example I added tags = "chapter" to the chapter pages.

Content Pages

The next steps in the Installation instructions for the Relearn theme is to create content pages 3 different ways. You can click on the tag icon above or go to the tags main page.

hugo new basics/first-content/_index.md
hugo new basics/second-content/index.md
hugo new basics/third-content.md
  • The first creates a directory that can contain more pages (note the underscore index).
  • The second one creates a directory but it can not contain more pages, just images and the like.
  • The last one creates a single page (so not children are possible)

Children

The Relearn theme has a short code to allow me to automatically get a list of the children pages.