Almost Ready to Write

Published: (February 8, 2026 at 07:09 AM EST)
2 min read
Source: Dev.to

Source: Dev.to

Delete skeleton posts

git rm -r theme/content/posts
git add -u
git commit -m 'delete skeleton posts'

Convert front matter to YAML

The default Hugo site and theme skeletons use TOML front matter, but YAML is often preferred (e.g., for better GitHub rendering).

cd site/
hugo convert toYAML --unsafe
cd ..

Note: The --unsafe flag is required; otherwise Hugo returns:

ERROR command error: Unsafe operation not allowed, use --unsafe or set a different output path

Update archetypes to use YAML front matter

--- a/theme/archetypes/default.md
+++ b/theme/archetypes/default.md
@@ -1,5 +1,5 @@
-+++
-date = '{{ .Date }}'
-draft = true
-title = '{{ replace .File.ContentBaseName "-" " " | title }}'
-+++
+---
+title: "{{ replace .File.ContentBaseName `-` ` ` | title }}"
+date: "{{ .Date }}"
+draft: true
+---

Add the first section (Devlog)

Create the section folder and index file:

mkdir theme/content/devlog
touch theme/content/devlog/_index.md

Add front matter to theme/content/devlog/_index.md:

---
title: "Devlog"
---

Show it in the menu

Update theme/hugo.toml to replace the default “Posts” menu entry with “Devlog”:

--- a/theme/hugo.toml
+++ b/theme/hugo.toml
@@ -9,8 +9,8 @@ title = 'My New Hugo Site'
     weight = 10

   [[menus.main]]
-    name = 'Posts'
-    pageRef = '/posts'
+    name = 'Devlog'
+    pageRef = '/devlog'
     weight = 20

   [[menus.main]]

Final touch

Clean up site/content/_index.md, which contains the home page content.
You are now ready to write and publish your Hugo site.

0 views
Back to Blog

Related posts

Read more »

Use Git Alias To Become Pro

!Cover image for Use Git Alias To Become Prohttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-up...