summaryrefslogtreecommitdiffhomepage
path: root/web/README.md
blob: 3b5fadc476ca9277b7aa0ae60119c494d8720f3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# web

The zash website: a Hugo site in the project's `web/` directory, building to
`web/public/`. Nothing is generated into the repository, and Hugo itself is
not a build dependency of the shell.

## Local preview

```sh
hugo server --source web          # http://localhost:1313/
hugo --source web --minify        # -> web/public/
```

Hugo is a single Go binary; `go install github.com/gohugoio/hugo@latest` or a
release tarball from github.com/gohugoio/hugo/releases both do. No theme
module is used, so the site builds with no network access.

## Layout

```
web/
  hugo.toml            baseURL, title, menu, highlight style
  content/
    _index.md          home page
    docs/              the documentation pages, ordered by weight
  layouts/
    baseof.html        shell of every page
    home.html          hero and the terminal card
    single.html        a docs page, with the sidebar
    list.html          a section index
    404.html
    partials/          head, docs-nav
  assets/
    css/zash.css       the design
    css/chroma.css     `hugo gen chromastyles --style=tokyonight-night`
    js/copy.js         copy buttons on code blocks, optional
  static/              the logo
```

No theme module is used: the CSS is a few hundred lines, and the palette comes
from `packaging/zash-logo.svg` - mainframe navy, periwinkle and a signal blue.
The site is dark only, on purpose.

The code blocks are highlighted with classes rather than inline styles
(`markup.highlight.noClasses = false`), so `assets/css/chroma.css` has to match
the `style` in `hugo.toml`. Regenerate both together:

```sh
hugo gen chromastyles --style=tokyonight-night > web/assets/css/chroma.css
```

## Publishing

There is no deploy workflow yet: zash is a private repository and GitHub Pages
is not available for one on a free plan. The options when it comes to
publishing are a public repository, a paid plan with Pages enabled for this
one, or a separate public repository that carries only `web/` and its
workflow.