this repo has no description

add search to notes + switch to mise for tools

altagos.dev d3c2e72e f6497205

verified
+124 -64
+8 -13
.tangled/workflows/build.yml
··· 9 9 nixpkgs: 10 10 - curl 11 11 - dart-sass 12 - - jq 13 - - minisign 14 - - gnused 15 - - gnutar 16 - - xz 12 + - mise 17 13 - zip 18 14 19 15 environment: 20 16 ZIG_VERSION: "0.15.1" 21 17 22 18 steps: 23 - - name: Download Zig compiler 19 + - name: Setup Zig 24 20 command: | 25 - chmod +x zig/download.sh 26 - ./zig/download.sh 27 - ./zig/zig version 21 + mise trust 22 + mise exec zig -- zig version 28 23 - name: Download statichost cli 29 24 command: | 30 - curl -so shcli https://www.statichost.eu/shcli 31 - chmod +x shcli 25 + curl -so shcli https://www.statichost.eu/shcli 26 + chmod +x shcli 32 27 - name: Build website 33 28 command: | 34 - ./zig/zig build --summary all --verbose 29 + mise dist 35 30 - name: Upload 36 31 command: | 37 - ./shcli altagos-dev ./zig-out/website 32 + ./shcli altagos-dev ./zig-out/website
+2 -2
build.zig.zon
··· 5 5 .minimum_zig_version = "0.15.0-dev.1149+4e6a04929", 6 6 .dependencies = .{ 7 7 .zine = .{ 8 - .url = "git+https://github.com/Altagos/zine#98210f23736b6577ce46223e2deac602c53dd3cb", 9 - .hash = "zine-0.11.1-ou6nIMt6FgC6lZfe2NBfnWlwm3MzGitZFj0nrm5CwvAO", 8 + .url = "git+https://github.com/Altagos/zine?ref=main#d8a9e1eafda7e4befbf48e7ade8acf8fcaa14753", 9 + .hash = "zine-0.11.1-ou6nIEp7FgCzDLSKgGTACCWF3qijVsl_lAQyS6St2Ewa", 10 10 }, 11 11 }, 12 12 .paths = .{
+11
content/notes/index.smd
··· 1 + --- 2 + .title = "Notes", 3 + .author = "Jakob Speer", 4 + .date = @date("2025-07-20"), 5 + .layout = "index.shtml", 6 + .draft = false, 7 + .description = "", 8 + .custom = { 9 + .search = true, 10 + } 11 + ---
+2 -1
content/notes/markdown-overview.smd content/notes/markdown-overview/index.smd
··· 7 7 .description = "An overview over the supported Markdown features", 8 8 .custom = { 9 9 .latex = true, 10 - } 10 + }, 11 + .tags = ["markdown"], 11 12 --- 12 13 13 14 Source: [Obsidian](https://help.obsidian.md/syntax)
-8
content/snippets/index.smd
··· 1 - --- 2 - .title = "Snippets", 3 - .author = "Jakob Speer", 4 - .date = @date("2025-07-20"), 5 - .layout = "index.shtml", 6 - .draft = false, 7 - .description = "A list of snippets" 8 - ---
+2 -1
content/snippets/tex-side-by-side-figures/index.smd content/notes/tex-side-by-side-figures/index.smd
··· 4 4 .date = @date("2025-11-21"), 5 5 .layout = "snippet.shtml", 6 6 .draft = false, 7 - .description = "" 7 + .description = "", 8 + .tags = ["latex"] 8 9 --- 9 10 10 11 Source: [https://tex.stackexchange.com/a/6869](https://tex.stackexchange.com/a/6869)
content/snippets/tex-side-by-side-figures/result.png content/notes/tex-side-by-side-figures/result.png
content/snippets/tex-side-by-side-figures/side-by-side-figures.svg content/notes/tex-side-by-side-figures/side-by-side-figures.svg
-2
layouts/home.shtml
··· 2 2 3 3 <title id="title" :text="$page.title.suffix(' | ', $site.title)"></title> 4 4 5 - <nav id="nav"></nav> 6 - 7 5 <main id="main"> 8 6 <h1 :text="$page.title"></h1> 9 7 <div :html="$page.content()"></div>
+7 -2
layouts/index.shtml
··· 2 2 3 3 <title id="title" :text="$page.title.suffix(' | ', $site.title)"></title> 4 4 5 - <nav id="nav"></nav> 6 - 7 5 <main id="main"> 8 6 <h1 :text="$page.title"></h1> 9 7 <div :html="$page.content()"></div> 8 + 9 + <div id="search"></div> 10 + <script> 11 + window.addEventListener('DOMContentLoaded', (event) => { 12 + new PagefindUI({ element: "#search", showSubResults: true, openFilters: ['Tags','Type'], resetStyles: true }); 13 + }); 14 + </script> 10 15 11 16 <ul :loop="$page.subpages()"> 12 17 <li>
+23 -23
layouts/note.shtml
··· 2 2 3 3 <title id="title" :text="$page.title.suffix(' | ', $site.title)"></title> 4 4 5 - <nav id="nav"></nav> 6 - 7 5 <main id="main"> 8 - <h1 :text="$page.title"></h1> 9 - <h5> 10 - Created on: 11 - <span :text="$page.date.format('2006-01-02')"> 12 - </span> 13 - </h5> 14 - <div :html="$page.content()"></div> 15 - <ctx :if="$page.footnotes?()"> 16 - <div class="footnotes"> 17 - <ol :loop="$if"> 18 - <li id="$loop.it.def_id"> 19 - <div class="footnote"><ctx :html="$loop.it.html()"></ctx></div> 20 - <ctx :loop="$loop.it.ref_ids"> 21 - <div class="back"> 22 - <a href="$loop.it.prefix('#')"><i class="ph-bold ph-arrow-up"></i>Back</a> 23 - </div> 24 - </ctx> 25 - </li> 26 - </ol> 27 - </div> 28 - </ctx> 6 + <div class="note" data-pagefind-body> 7 + <h1 :text="$page.title" data-pagefind-meta="title"></h1> 8 + <h5 data-pagefind-meta="$page.date.format('2006-01-02').prefix('date:')"> 9 + Created on: 10 + <span :text="$page.date.format('2006-01-02')"> 11 + </span> 12 + </h5> 13 + <div :html="$page.content()" data-pagefind-body></div> 14 + <ctx :if="$page.footnotes?()"> 15 + <div class="footnotes" data-pagefind-body> 16 + <ol :loop="$if"> 17 + <li id="$loop.it.def_id"> 18 + <div class="footnote"><ctx :html="$loop.it.html()"></ctx></div> 19 + <ctx :loop="$loop.it.ref_ids"> 20 + <div class="back"> 21 + <a href="$loop.it.prefix('#')"><i class="ph-bold ph-arrow-up"></i>Back</a> 22 + </div> 23 + </ctx> 24 + </li> 25 + </ol> 26 + </div> 27 + </ctx> 28 + </div> 29 29 </main>
+3 -8
layouts/snippet.shtml
··· 2 2 3 3 <title id="title" :text="$page.title.suffix(' | ', $site.title)"></title> 4 4 5 - <nav id="nav"> 6 - <a href="/snippets" class="back"><i class="ph-bold ph-arrow-left"></i>Back</a> 7 - </nav> 8 - 9 5 <main id="main"> 10 - <div class="snippets"> 11 - 12 - <h1 :text="$page.title"></h1> 13 - <h5> 6 + <div class="snippets" data-pagefind-body> 7 + <h1 :text="$page.title" data-pagefind-meta="title"></h1> 8 + <h5 data-pagefind-meta="$page.date.format('2006-01-02').prefix('date:')"> 14 9 Created on: 15 10 <span :text="$page.date.format('2006-01-02')"> 16 11 </span>
+13 -2
layouts/templates/root.shtml
··· 16 16 <link rel="manifest" href="$site.asset('favicon/site.webmanifest').link()"> 17 17 <!-- Icons --> 18 18 <link rel="stylesheet" href="$site.asset('phosphor-icons/bold.css').link()"> 19 + <!-- Tags --> 20 + <ctx :loop="$page.tags"> 21 + <meta data-section="$loop.it" data-pagefind-filter="tag[data-section]"> 22 + </ctx> 19 23 </head> 20 - <body> 24 + <body class="dark"> 21 25 <header></header> 22 - <nav id="nav"><super></nav> 26 + <nav id="nav"></nav> 23 27 <content> 24 28 <main id="main"> 25 29 <super> ··· 56 60 <link rel="stylesheet" href="$site.asset('math/Temml-Local.css').link()"> 57 61 <script defer src="$site.asset('math/temml.min.js').link()"></script> 58 62 <script defer src="$site.asset('math/render-mathtex.js').link()"></script> 63 + </div> 64 + </ctx> 65 + <ctx :if="$page.custom.get?('search')"> 66 + <!-- Search - Pagefind --> 67 + <div :if="$if"> 68 + <link href="/pagefind/pagefind-ui.css" rel="stylesheet"> 69 + <script defer src="/pagefind/pagefind-ui.js"></script> 59 70 </div> 60 71 </ctx> 61 72 </body>
+15 -1
mise.toml
··· 1 1 [tools] 2 + bun = "latest" 2 3 watchexec = "latest" 3 4 zig = "0.15.2" 4 5 5 6 [tasks.watch] 6 - run = "watchexec -q -r -e scss,zig 'zig build serve -- --drafts'" 7 + run = "watchexec -q -r -e scss,zig,shtml,smd 'zig build -Ddrafts; and bunx -y pagefind --site zig-out/website --serve'" 8 + 9 + [tasks.dev] 10 + run = "zig build serve -- --drafts" 11 + 12 + [tasks.create-index] 13 + run = "bunx -y pagefind --site zig-out/website" 14 + 15 + [tasks.dist] 16 + run = "zig build --summary all --verbose" 17 + depends_post = "create-index" 18 + 19 + [tasks.clean] 20 + run = "rm -rf zig-out"
+1
style/base/theme.scss
··· 214 214 --selection-foreground: var(--palette0); 215 215 216 216 --text-color: var(--fg1); 217 + --primary: var(--palette10); 217 218 }
+6 -1
style/content/figures.scss
··· 2 2 max-width: var(--content-max-width); 3 3 overflow-y: auto; 4 4 text-align: center; 5 + 5 6 margin: 1em 0; 7 + padding: 0 5%; 8 + 9 + display: flex; 10 + flex-direction: column; 11 + gap: 10px; 6 12 7 13 > * { 8 14 max-width: var(--content-max-width); 9 - width: 90%; 10 15 height: auto; 11 16 } 12 17
+28
style/content/pagefind.scss
··· 1 + #search { 2 + --pagefind-ui-scale: 0.8; 3 + --pagefind-ui-primary: var(--primary); 4 + --pagefind-ui-text: var(--fg); 5 + --pagefind-ui-background: var(--bg-m3); 6 + --pagefind-ui-border: var(--bg-m3); 7 + --pagefind-ui-tag: var(--bg-m3); 8 + --pagefind-ui-border-width: 2px; 9 + --pagefind-ui-border-radius: 8px; 10 + --pagefind-ui-image-border-radius: 8px; 11 + --pagefind-ui-image-box-ratio: 3 / 2; 12 + --pagefind-ui-font: "Andada Pro"; 13 + 14 + margin-bottom: 1.5em; 15 + } 16 + 17 + .pagefind-ui__search-input { 18 + &:focus { 19 + outline: unset; 20 + } 21 + } 22 + 23 + .pagefind-ui__drawer { 24 + flex-direction: column !important; 25 + flex-wrap: unset !important; 26 + gap: 0 !important; 27 + justify-content: start !important; 28 + }
+3
style/index.scss
··· 16 16 @use "content/footer.scss"; 17 17 @use "content/navigation.scss"; 18 18 @use "content/table.scss"; 19 + 20 + // Pagefind 21 + @use "content/pagefind.scss";