]> danix's work - danix2-hugo-theme.git/commitdiff
docs: add comprehensive menu configuration guide
authorDanilo M. <redacted>
Sun, 5 Apr 2026 08:15:12 +0000 (10:15 +0200)
committerDanilo M. <redacted>
Sun, 5 Apr 2026 08:15:12 +0000 (10:15 +0200)
Added documentation explaining how to configure navigation menu via hugo.toml:
- Explains menu item parameters (name, pageRef, weight)
- Shows how to add new menu items
- Demonstrates external links
- Provides examples of creating pages for menu items

Also updated hugo.toml with better comments explaining menu configuration.

Co-Authored-By: Claude Haiku 4.5 <redacted>
CONTENT_GUIDE.md
hugo.toml

index 1c74a00ffaca4565689e5c9f1bd71deb860a2d42..cdc2733764010ac03a2675d9b21d0646b0637302 100644 (file)
@@ -42,6 +42,71 @@ content/
 
 ---
 
+## Navigation Menu Configuration
+
+The top navigation menu is configured in `hugo.toml`. You can easily add, remove, or reorder menu items.
+
+### How to Add Menu Items
+
+Edit your `hugo.toml` file and add a new `[[menu.main]]` block:
+
+```toml
+[[menu.main]]
+  name = 'Articles'
+  pageRef = '/articles'
+  weight = 10
+
+[[menu.main]]
+  name = 'About'
+  pageRef = '/is'
+  weight = 20
+
+[[menu.main]]
+  name = 'Contact'
+  pageRef = '/is/here'
+  weight = 30
+
+# Add a new page to the menu:
+[[menu.main]]
+  name = 'Uses'
+  pageRef = '/is/uses'
+  weight = 40
+```
+
+### Parameters
+
+- `name` — Text displayed in the navigation menu
+- `pageRef` — Path to your page (e.g., `/articles`, `/is/about`). Must match your content folder structure
+- `weight` — Controls menu order. Lower numbers appear first (leftmost), higher numbers appear last (rightmost)
+
+### External Links
+
+To link to external websites, use `url` instead of `pageRef`:
+
+```toml
+[[menu.main]]
+  name = 'GitHub'
+  url = 'https://github.com/danix2'
+  weight = 50
+```
+
+### Creating Pages for Menu Items
+
+Before adding a menu item, create the corresponding page in `content/`:
+
+```bash
+# Create a new static page
+hugo new is/uses.md
+
+# Then add it to the menu in hugo.toml
+[[menu.main]]
+  name = 'Uses'
+  pageRef = '/is/uses'
+  weight = 40
+```
+
+---
+
 ## Content Types
 
 Your blog supports five content types for articles. Each type is visually distinct in the feed with its own badge color.
index c84f52bceed2e82a62c7b2abfb74a0b5129e84de..50c004340b92ec3a9e192ef63952f62d928bd7c7 100644 (file)
--- a/hugo.toml
+++ b/hugo.toml
@@ -21,7 +21,16 @@ locale = 'en-US'
     ordered = false
     startLevel = 2
 
-# Menus
+# Navigation Menu
+# Add menu items below. Items are displayed left-to-right in order of weight.
+# Parameters:
+#   name    = Text displayed in menu (visible to users)
+#   pageRef = Path to your page (e.g., /articles, /is/about)
+#   weight  = Order (lower numbers = leftmost, higher = rightmost)
+#
+# For external links, use 'url' instead of 'pageRef':
+#   url = 'https://example.com'
+
 [[menu.main]]
   name = 'articles'
   pageRef = '/articles'
@@ -37,6 +46,12 @@ locale = 'en-US'
   pageRef = '/is/here'
   weight = 30
 
+# Example: Add a new page to the menu
+# [[menu.main]]
+#   name = 'uses'
+#   pageRef = '/is/uses'
+#   weight = 40
+
 # Content sections
 [params]
   description = 'Writing about IT, life, and the things that matter.'