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:
Vigilio Desto 2026-04-10 18:38:31 +02:00
parent 4f2b0a67e1
commit 267a7b1bc8
Signed by: vigilio
GPG key ID: 159D6AD58C8E55E9
8 changed files with 353 additions and 7 deletions

42
content/_index.md Normal file
View file

@ -0,0 +1,42 @@
---
title: "Agentic Semantic Web"
description: "Semantic HTML, data-* attributes, and CSS-only styling for the agentic era."
date: 2026-04-10
tags: ["asw", "semantic-web", "html"]
---
# Agentic Semantic Web
**ASW** is a vocabulary and design system for the agentic era — semantic HTML with `data-*` attributes, CSS-only styling, no JavaScript required where a browser element already does the job.
Built for sites generated by agents and read by agents. Navigable by humans.
## What this is
- [Docs](/docs/) — the ASW HTML vocabulary, layout system, and components
- [Vault](/vault/) — live ASW notation: task lists, sessions, diffs, wikilinks
- [Posts](/posts/) — writing and vocabulary reference
- [Papers](/papers/) — longer-form thinking on the semantic web
## The design principle
No invented CSS classes. Every style target is either a semantic HTML element or a `data-*` attribute:
```html
<aside data-callout="note">This is a note.</aside>
<section data-layout="grid">...</section>
<a data-wikilink href="/vault/session/">session log</a>
```
Agents read the attributes. Humans read the content. The CSS connects them.
## Try the shortcodes
{{< callout note >}}
This is a **note callout** rendered via the `callout` shortcode. Output: `<aside data-callout="note">`.
{{< /callout >}}
{{< callout tip >}}
See the [Getting Started](/posts/getting-started/) post to wire ASW into your Hugo project.
{{< /callout >}}

View file

@ -0,0 +1,74 @@
---
title: "ASW Data-Attribute Vocabulary"
description: "The data-* attributes emitted by the ASW-Hugo pack."
date: 2026-04-08
tags: [asw, html, reference]
ai-disclosure: "generated"
ai-model: "claude-sonnet-4-5"
ai-provider: "Anthropic"
---
# ASW Data-Attribute Vocabulary
The ASW-Hugo pack emits these `data-*` attributes in its HTML output.
| Attribute | Element | Meaning |
|-----------|---------|---------|
| `data-callout="note"` | `<aside>` | Note callout block |
| `data-callout="warning"` | `<aside>` | Warning callout |
| `data-callout="tip"` | `<aside>` | Tip callout |
| `data-callout="info"` | `<aside>` | Info callout |
| `data-wikilink` | `<a>` | Internal vault-style link |
| `data-role="tag-cloud"` | `<nav>` | Tag navigation |
| `data-layout="grid"` | `<section>` | Grid layout for list pages |
| `data-tag` | `<a>` | Tag label on links |
All styling comes from `asw.css` targeting these attributes — no CSS classes required.
## Example: Full Page Skeleton
A complete ASW page emitted by the Hugo pack looks like this:
```html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Session Log · Vault</title>
<link rel="stylesheet" href="/css/asw.css">
</head>
<body>
<header>
<nav>
<ul><li><strong>Vault</strong></li></ul>
<ul>
<li><a href="/posts/">Posts</a></li>
<li><a href="/vault/">Vault</a></li>
</ul>
</nav>
</header>
<div data-layout="docs">
<aside>
<nav aria-label="Vault documentation" data-nav="sidebar">
<ul>
<li><a href="/vault/tasks/" aria-current="page">Tasks</a></li>
<li><a href="/vault/wikilinks/">Wikilinks</a></li>
</ul>
</nav>
</aside>
<article>
<hgroup>
<h1>Tasks</h1>
<p>Render task lists with semantic state.</p>
</hgroup>
<!-- page content -->
</article>
</div>
</body>
</html>
```
Notice: no `class` attributes anywhere. The layout, sidebar, and navigation styles are all driven by element semantics and `data-*` attributes.

View file

@ -0,0 +1,51 @@
---
title: "Getting Started with ASW-Hugo"
description: "How to set up the ASW-Hugo pack in your Hugo project."
date: 2026-04-08
tags: [setup, hugo, asw]
ai-disclosure: "generated"
ai-model: "claude-sonnet-4-5"
ai-provider: "Anthropic"
---
# Getting Started with ASW-Hugo
The ASW-Hugo pack is a theme that outputs [Agentic Semantic Web](https://asw.trentuna.com/) semantic HTML from your Hugo Markdown content.
## Installation
1. Copy or symlink `packs/hugo/` from the ASW repo:
```bash
ln -s /path/to/agentic-semantic-web/packs/hugo/ themes/asw-hugo
```
2. Set `theme = "asw-hugo"` in your `hugo.toml`.
3. Add tag taxonomy:
```toml
[taxonomies]
tag = "tags"
```
4. Wire ASW CSS:
```bash
cp /path/to/agentic-semantic-web/agentic.css \
themes/asw-hugo/static/css/asw.css
```
5. Build:
```bash
hugo
```
## What you get
- Semantic HTML output: `<article>`, `<section data-layout="grid">`, `<aside data-callout>`
- Tag navigation at `/tags/`
- Callout blocks: `{{</* callout note */>}} ... {{</* /callout */>}}`
- Wikilinks: `{{</* wikilink "Text" "/path/" */>}}`
{{< callout tip >}}
The ASW-Hugo pack uses **system font stacks** by default — no external font loading required.
{{< /callout >}}

139
hugo.toml
View file

@ -2,13 +2,146 @@ baseURL = 'https://asw.trentuna.com/'
languageCode = 'en'
title = 'ASW — Agentic Semantic Web'
[params]
description = "Agentic Semantic Web — semantic HTML, data-* attributes, and CSS-only styling for the agentic era."
[taxonomies]
tag = "tags"
# ── Navigation menus ──────────────────────────────────────────────────
[[menus.main]]
name = "Home"
url = "/"
weight = 1
[[menus.main]]
name = "Docs"
url = "/docs/"
weight = 2
[[menus.main]]
name = "Vault"
url = "/vault/"
weight = 3
[[menus.main]]
name = "Papers"
url = "/papers/"
weight = 4
[[menus.main]]
name = "Posts"
url = "/posts/"
weight = 5
[[menus.main]]
name = "Tags"
url = "/tags/"
weight = 6
# ── Docs sidebar menu ─────────────────────────────────────────────────
# Parent entries (identifier set, no url) render as <small> section labels.
# Child entries (parent set) render as sidebar nav links.
[[menus.docs]]
name = "Getting Started"
identifier = "docs-getting-started"
weight = 10
[[menus.docs]]
name = "Introduction"
url = "/docs/introduction/"
parent = "docs-getting-started"
weight = 11
[[menus.docs]]
name = "Core"
identifier = "docs-core"
weight = 20
[[menus.docs]]
name = "Reset"
url = "/docs/reset/"
parent = "docs-core"
weight = 21
[[menus.docs]]
name = "Semantic HTML"
url = "/docs/on-semantic-html/"
parent = "docs-core"
weight = 22
[[menus.docs]]
name = "Data Attributes"
url = "/docs/data-attributes/"
parent = "docs-core"
weight = 23
[[menus.docs]]
name = "Components"
identifier = "docs-components"
weight = 30
[[menus.docs]]
name = "Layouts"
url = "/docs/layouts/"
parent = "docs-components"
weight = 31
[[menus.docs]]
name = "Components"
url = "/docs/components/"
parent = "docs-components"
weight = 32
[[menus.docs]]
name = "Accordion & Dialog"
url = "/docs/accordion-dialog/"
parent = "docs-components"
weight = 33
[[menus.docs]]
name = "Navigation"
url = "/docs/navigation/"
parent = "docs-components"
weight = 34
[[menus.docs]]
name = "Reference"
identifier = "docs-reference"
weight = 40
[[menus.docs]]
name = "Charts"
url = "/docs/charts/"
parent = "docs-reference"
weight = 41
[[menus.docs]]
name = "Syntax Highlighting"
url = "/docs/chroma/"
parent = "docs-reference"
weight = 42
[[menus.docs]]
name = "ASW Vocabulary"
url = "/posts/asw-vocabulary/"
parent = "docs-reference"
weight = 43
# ── Markup settings ───────────────────────────────────────────────────
[markup.goldmark.renderer]
unsafe = true # allow inline HTML in markdown (<mark>, <time>, etc.)
[markup.tableOfContents]
startLevel = 2
endLevel = 3
ordered = false
[markup.highlight]
noClasses = true
noClasses = true
codeFences = true
guessSyntax = true
[build.buildStats]
enable = true
# build pipeline wired
# e2e test 15:37:53Z

View file

@ -3,8 +3,10 @@
"tags": [
"a",
"article",
"aside",
"blockquote",
"body",
"code",
"dd",
"div",
"dl",
@ -29,6 +31,7 @@
"nav",
"ol",
"p",
"pre",
"script",
"section",
"small",
@ -47,23 +50,29 @@
"classes": [
"footnote-backref",
"footnote-ref",
"footnotes"
"footnotes",
"highlight"
],
"ids": [
"a-taxonomy-of-agency",
"asw-data-attribute-vocabulary",
"coda",
"craft-as-methodology",
"example-full-page-skeleton",
"fn:1",
"fn:2",
"fn:3",
"fnref:1",
"fnref:2",
"fnref:3",
"getting-started-with-asw-hugo",
"installation",
"principles-of-invisible-design",
"the-dorveille-principle",
"the-economics-of-attention",
"the-table-of-hours",
"what-we-subtract"
"what-we-subtract",
"what-you-get"
]
}
}

View file

@ -1,7 +1,8 @@
<nav>
<ul><li><a href="/"><strong>{{ .Site.Title }}</strong></a></li></ul>
<ul>
<li><a href="/docs/">Docs</a></li>
<li><a href="/examples/">Examples</a></li>
{{- range .Site.Menus.main }}
<li><a href="{{ .URL }}"{{ if $.IsMenuCurrent "main" . }} aria-current="page"{{ end }}>{{ .Name }}</a></li>
{{- end }}
</ul>
</nav>

View file

@ -0,0 +1,16 @@
{{- /*
callout shortcode — wraps content in an ASW callout block.
Usage:
{{< callout note >}}
Content here. Markdown is rendered.
{{< /callout >}}
First positional param: callout type.
Valid types: note, warning, tip, info (maps to ASW data-callout attribute).
Default: note
*/ -}}
{{- $type := .Get 0 | default "note" -}}
<aside data-callout="{{ $type }}">
{{ .Inner | markdownify }}
</aside>

View 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>