refactor: rename menu explorer

This commit is contained in:
2026-06-21 18:02:58 +00:00
parent f8af9035e8
commit 1ac16f10a5
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ summary = "The short version of what Starless gives you and what it skips."
weight = 10 weight = 10
+++ +++
Starless gives you a homepage, section pages, single pages, and a sidebar menu. That is the whole pitch. Starless gives you a homepage, section pages, single pages, and a sidebar explorer. That is the whole pitch.
It is meant for people who want a dark shell and plain content, not a huge pile of options. If you want every part configurable from front matter, you will outgrow this fast. It is meant for people who want a dark shell and plain content, not a huge pile of options. If you want every part configurable from front matter, you will outgrow this fast.
+2 -2
View File
@@ -1,12 +1,12 @@
+++ +++
title = "Customize" title = "Customize"
summary = "Change the title, menu, and footer strings first. Leave the rest alone until it bothers you." summary = "Change the title, explorer, and footer strings first. Leave the rest alone until it bothers you."
weight = 12 weight = 12
+++ +++
The fast path is to change four things in `hugo.toml`: `baseURL`, `title`, `params.sidebarFooter`, and `params.homeFooter`. The fast path is to change four things in `hugo.toml`: `baseURL`, `title`, `params.sidebarFooter`, and `params.homeFooter`.
Then adjust `title` and `weight` in your content files. The sidebar shape comes from the section tree, so you do not need a special data file or a menu block for each page. Then adjust `title` and `weight` in your content files. The sidebar explorer follows the section tree, so you do not need a special data file or a block for each page.
If you want a different voice on the homepage, edit `content/_index.md`. If you want layout changes, start in `themes/starless/layouts/_default/baseof.html`. If you want a different voice on the homepage, edit `content/_index.md`. If you want layout changes, start in `themes/starless/layouts/_default/baseof.html`.
+1 -1
View File
@@ -10,7 +10,7 @@ The files that matter are not hard to find.
- `content/` holds the homepage and this short guide. Its section tree also drives the sidebar. - `content/` holds the homepage and this short guide. Its section tree also drives the sidebar.
- `themes/starless/layouts/_default/baseof.html` builds the page shell and the shared styling. - `themes/starless/layouts/_default/baseof.html` builds the page shell and the shared styling.
- `themes/starless/layouts/partials/sidebar.html` renders the left rail. - `themes/starless/layouts/partials/sidebar.html` renders the left rail.
- `themes/starless/layouts/partials/menu-tree.html` renders the nested section and page links. - `themes/starless/layouts/partials/explorer-tree.html` renders the nested section and page links.
- `themes/starless/layouts/_default/home.html`, `list.html`, and `single.html` handle the main content area. - `themes/starless/layouts/_default/home.html`, `list.html`, and `single.html` handle the main content area.
If you are trying to understand the theme, read those files in that order. There is not much else hiding off to the side. If you are trying to understand the theme, read those files in that order. There is not much else hiding off to the side.
@@ -8,7 +8,7 @@
{{- if .IsSection -}} {{- if .IsSection -}}
{{- with .Pages.ByWeight -}} {{- with .Pages.ByWeight -}}
<div class="ml-6 flex flex-col gap-1 text-on-surface-variant text-label-sm tree-item mt-1 mb-2"> <div class="ml-6 flex flex-col gap-1 text-on-surface-variant text-label-sm tree-item mt-1 mb-2">
{{ partial "menu-tree.html" (dict "nodes" . "level" (add $.level 1)) }} {{ partial "explorer-tree.html" (dict "nodes" . "level" (add $.level 1)) }}
</div> </div>
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
@@ -22,7 +22,7 @@
</a> </a>
{{- with .Pages.ByWeight -}} {{- with .Pages.ByWeight -}}
<div class="ml-5 flex flex-col gap-1 text-on-surface-variant text-label-sm tree-item mt-1 italic"> <div class="ml-5 flex flex-col gap-1 text-on-surface-variant text-label-sm tree-item mt-1 italic">
{{ partial "menu-tree.html" (dict "nodes" . "level" (add $.level 1)) }} {{ partial "explorer-tree.html" (dict "nodes" . "level" (add $.level 1)) }}
</div> </div>
{{- end -}} {{- end -}}
</div> </div>
@@ -10,7 +10,7 @@
<nav class="flex flex-col gap-1 text-sm" aria-label="Primary"> <nav class="flex flex-col gap-1 text-sm" aria-label="Primary">
{{ with site.Sections }} {{ with site.Sections }}
{{ partial "menu-tree.html" (dict "nodes" . "level" 0) }} {{ partial "explorer-tree.html" (dict "nodes" . "level" 0) }}
{{ end }} {{ end }}
</nav> </nav>