Port homepage, posts section, shortcodes; update hugo.toml menus
- content/_index.md: homepage with site description and callout examples - content/posts/asw-vocabulary.md: ASW data-* attribute vocabulary reference - content/posts/getting-started.md: ASW-Hugo setup guide (updated URLs) - hugo.toml: add params, taxonomies, menus (main + docs sidebar), ToC settings - layouts/partials/nav.html: dynamic Hugo menu rendering (was hardcoded) - layouts/shortcodes/callout.html, wikilink.html: ported from asw-hugo theme Closes: asw#17, asw#13, asw#11, asw#16 28 pages build clean, deploy confirmed at port 8000.
This commit is contained in:
parent
4f2b0a67e1
commit
267a7b1bc8
8 changed files with 353 additions and 7 deletions
20
layouts/shortcodes/wikilink.html
Normal file
20
layouts/shortcodes/wikilink.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{{- /*
|
||||
wikilink shortcode — renders an internal link with ASW data-wikilink attribute.
|
||||
|
||||
Usage:
|
||||
{{< wikilink "Display Text" "/path/to/page/" >}}
|
||||
|
||||
Param 0 (required): display text
|
||||
Param 1 (optional): href path. Defaults to /display-text-slugified/
|
||||
|
||||
Examples:
|
||||
{{< wikilink "My Note" >}}
|
||||
→ <a href="/my-note/" data-wikilink>My Note</a>
|
||||
|
||||
{{< wikilink "My Note" "/vault/my-note/" >}}
|
||||
→ <a href="/vault/my-note/" data-wikilink>My Note</a>
|
||||
*/ -}}
|
||||
{{- $text := .Get 0 -}}
|
||||
{{- $slug := $text | lower | replace " " "-" -}}
|
||||
{{- $href := .Get 1 | default (printf "/%s/" $slug) -}}
|
||||
<a href="{{ $href | relURL }}" data-wikilink>{{ $text }}</a>
|
||||
Loading…
Add table
Add a link
Reference in a new issue