refactor: rename menu explorer
This commit is contained in:
@@ -4,7 +4,7 @@ summary = "The short version of what Starless gives you and what it skips."
|
||||
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.
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
+++
|
||||
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
|
||||
+++
|
||||
|
||||
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`.
|
||||
|
||||
|
||||
@@ -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.
|
||||
- `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/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.
|
||||
|
||||
If you are trying to understand the theme, read those files in that order. There is not much else hiding off to the side.
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
{{- if .IsSection -}}
|
||||
{{- 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">
|
||||
{{ partial "menu-tree.html" (dict "nodes" . "level" (add $.level 1)) }}
|
||||
{{ partial "explorer-tree.html" (dict "nodes" . "level" (add $.level 1)) }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -22,7 +22,7 @@
|
||||
</a>
|
||||
{{- with .Pages.ByWeight -}}
|
||||
<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>
|
||||
{{- end -}}
|
||||
</div>
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<nav class="flex flex-col gap-1 text-sm" aria-label="Primary">
|
||||
{{ with site.Sections }}
|
||||
{{ partial "menu-tree.html" (dict "nodes" . "level" 0) }}
|
||||
{{ partial "explorer-tree.html" (dict "nodes" . "level" 0) }}
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user