In Hugo, creating different slash pages (like /about/, /uses/, etc.) involves creating specific content files for each page and customizing templates as needed.
- Create individual markdown files for each slash page under
content/.
If you want to create an/about/page in your blog, add a markdown page with below front matter in thecontent/page.
//content/about.md
---
title: "About"
date: 2024-10-16
---
This is the About page content.
- Optionally create a template for the page.
Hugo uses thesingle.htmltemplate from thelayouts/_default/folder to render pages by default. However, you can create custom templates in thelayouts/page/ folderto format specific pages as needed.
//layouts/page/about.html
<h1>{{ .Title }}</h1>
<div class="content">
{{ .Content }}
</div>
You can check my slash pages like uses, credits, and changelog.