Slash pages in Hugo

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 the content/ 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 the single.html template from the layouts/_default/ folder to render pages by default. However, you can create custom templates in the layouts/page/ folder to format specific pages as needed.
//layouts/page/about.html

<h1>{{ .Title }}</h1>
<div class="content">
  {{ .Content }}
</div>
References

Hugo Docs


Read More


Create a feed page to view all the posts

This website contains various types of blogs, both technical and non-technical, that can be accessed through the following links: blog, notes, and desk. I wanted to have a single page where I could see all the posts I have written on this website and track my blogging progress. That’s why I created this feed page, where you can find all my blogs from this website.