Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ indent_style = "space"
indent_size = 4
max_line_length = 88

[*.{yml,yaml,html}]
[*.{yml,yaml,html,js}]
indent_size = 2
max_line_length = 120
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Generated files by hugo
/public/
# Search index for `hugo server`, see README
/static/pagefind/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json
Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
static/**
/static/**
!/static/main.js
*.md
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ hugo server -D
```

Site search is powered by [Pagefind](https://pagefind.app/), which indexes the built HTML rather than the content files, so `hugo server` alone has no index and the search dialog will say so.
To try it locally, build and index the site, then serve `public/`:
To search on the dev server, build the index into `static/` (gitignored, and stale until you rebuild it):

```sh
hugo && npx pagefind --site public && python3 -m http.server -d public
hugo -d /tmp/pagefind-build && npx pagefind --site /tmp/pagefind-build --output-path static/pagefind
```

Stop `hugo server` first — a `hugo` build takes the build lock out from under it.
13 changes: 10 additions & 3 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{ $styles := resources.Get "main.scss" | toCSS | minify }}
<link rel="preload" as="font" type="font/woff2" href="/fonts/Inter/Inter-VariableFont_slnt,wght.woff2" crossorigin />
<link rel="stylesheet" type="text/css" href="/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="/bootstrap/icons/bootstrap-icons.css" />
<link rel="stylesheet" type="text/css" href="/bootstrap/icons/bootstrap-icons.min.css" />
<link rel="stylesheet" type="text/css" href="{{ $styles.RelPermalink }}" />

<link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-touch-icon.png" />
Expand Down Expand Up @@ -41,6 +41,13 @@
{{ template "_internal/twitter_cards.html" . }}
{{ template "_internal/opengraph.html" . }}

<script src="/bootstrap/js/bootstrap.bundle.min.js" defer></script>
<script src="/main.js" defer></script>
<script type="importmap">
{
"imports": {
"@popperjs/core": "/bootstrap/js/popper.esm.min.js",
"bootstrap": "/bootstrap/js/bootstrap.esm.min.js"
}
}
</script>
<script type="module" src="/main.js"></script>
<script data-goatcounter="https://scverse.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
8 changes: 4 additions & 4 deletions static/bootstrap/css/bootstrap.min.css

Large diffs are not rendered by default.

1,704 changes: 0 additions & 1,704 deletions static/bootstrap/icons/bootstrap-icons.css

This file was deleted.

5 changes: 5 additions & 0 deletions static/bootstrap/icons/bootstrap-icons.min.css

Large diffs are not rendered by default.

Binary file modified static/bootstrap/icons/fonts/bootstrap-icons.woff
Binary file not shown.
Binary file modified static/bootstrap/icons/fonts/bootstrap-icons.woff2
Binary file not shown.
6 changes: 0 additions & 6 deletions static/bootstrap/js/bootstrap.bundle.min.js

This file was deleted.

7 changes: 7 additions & 0 deletions static/bootstrap/js/bootstrap.esm.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions static/bootstrap/js/popper.esm.min.js

Large diffs are not rendered by default.

Loading