25 Commits
Author SHA1 Message Date
Klagarge 6cd5ed61c4 Merge branch 'refactor: migrate to calepin'
Build site / build (push) Successful in 51s
Build site / deploy (push) Successful in 2s
Reviewed-on: #1
2026-10-11 18:06:17 +00:00
Klagarge 1adca36802 ci: publish to the pages branch on main pushes
Build site / build (push) Successful in 52s
Build site / deploy (push) Skipped
Assisted-by: Delta:zai-glm-5.3
2026-10-11 20:00:54 +02:00
Klagarge 3b1ef34bce feat: enable PDF output for pages
Assisted-by: Delta:zai-glm-5.3
2026-10-11 18:56:04 +02:00
Klagarge 6b33be6956 chore: add a recipe for local act runs
Assisted-by: Delta:zai-glm-5.3
2026-10-11 00:22:23 +02:00
Klagarge f94a5cbe17 ci: use upload-artifact v3 for gitea
Assisted-by: Delta:zai-glm-5.3
2026-10-11 00:22:23 +02:00
Klagarge af31b6165c chore: remove unused placeholder
Build site / build (push) Failing after 11s
2026-10-11 00:09:52 +02:00
Klagarge 946177a0b9 feat: style the landing page with the academic theme
Assisted-by: Delta:zai-glm-5.3
2026-10-11 00:00:42 +02:00
Klagarge 3361c9ee3d feat: scope the sidebar to the current category
Assisted-by: Delta:zai-glm-5.3
2026-10-10 23:53:55 +02:00
Klagarge ab802968ca chore: add custom placeholder and fine tune calepin-toml 2026-10-10 23:51:22 +02:00
Klagarge 096026a964 docs: describe the site menu in README
Assisted-by: Delta:zai-glm-5.3
2026-10-10 22:05:21 +02:00
Klagarge 6478741950 feat: add master categories to the site menu
Assisted-by: Delta:zai-glm-5.3
2026-10-10 22:05:08 +02:00
Klagarge eb995c7b69 feat: restructure content into master categories
Assisted-by: Delta:zai-glm-5.3
2026-10-10 22:04:31 +02:00
Klagarge 7207cfdbd0 docs: update README and AGENT.md for the scripts layout
Assisted-by: Delta:zai-glm-5.3
2026-10-10 21:02:59 +02:00
Klagarge 36b2fc4188 ci: build site via the toolchain scripts
Assisted-by: Delta:zai-glm-5.3
2026-10-10 21:02:41 +02:00
Klagarge 62c4619c5e docs: add example sub-pages
Assisted-by: Delta:zai-glm-5.3
2026-10-10 21:02:41 +02:00
Klagarge f7beeb5e15 fix: align site scaffold with calepin conventions
Assisted-by: Delta:zai-glm-5.3
2026-10-10 21:02:20 +02:00
Klagarge 99ceb89e48 refactor: move toolchain logic into scripts/
Assisted-by: Delta:zai-glm-5.3
2026-10-10 21:01:20 +02:00
Klagarge 7217702068 chore: ignore generated outputs and IDE files
Assisted-by: Delta:zai-glm-5.3
2026-10-10 20:39:55 +02:00
Klagarge 11bf721f21 fix: adjust Justfile and typst templates for calepin 0.0.61
Assisted-by: Delta:zai-glm-5.3
2026-10-10 20:39:46 +02:00
Klagarge 446c156338 docs: write README and AGENT.md
Assisted-by: Delta:zai-glm-5.3
2026-10-10 20:30:15 +02:00
Klagarge 909ea17f2f ci: add Gitea Actions workflow
Assisted-by: Delta:zai-glm-5.3
2026-10-10 20:30:08 +02:00
Klagarge 7a0df30ca1 docs: add example categories
Assisted-by: Delta:zai-glm-5.3
2026-10-10 20:30:00 +02:00
Klagarge a5f95bb6d7 feat: scaffold calepin website
Assisted-by: Delta:zai-glm-5.3
2026-10-10 20:29:53 +02:00
Klagarge f047389da9 chore: bootstrap pinned toolchain
Assisted-by: Delta:zai-glm-5.3
2026-10-10 20:29:36 +02:00
Klagarge b78f79e12e docs: move legacy docs to legacy_docs/
Assisted-by: Delta:zai-glm-5.3
2026-10-10 20:28:25 +02:00
212 changed files with 929 additions and 26 deletions

No files matched your search

+71
View File
@@ -0,0 +1,71 @@
name: Build site
on:
- push
- workflow_dispatch
jobs:
build:
# NOTE: must match your act_runner labels (e.g. ubuntu-latest, ubuntu-24.04).
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Bootstrap pinned toolchain
run: ./scripts/bootstrap.sh
- name: Build site
run: ./scripts/calepin.sh compile site public
# The official upload-artifact@v4 refuses to run on Gitea (it detects a
# non-GitHub server and aborts with GHESNotSupportedError). v3 uses the
# artifact API that Gitea implements. On Gitea >= 1.22 with a current
# act_runner, christopherhx/gitea-upload-artifact@v4 is a drop-in
# replacement if you want the v4 API.
- name: Upload site artifact
uses: actions/upload-artifact@v3
with:
name: public
path: public/
deploy:
needs: build
# Publish only from main; move the gate to publish from another branch.
if: github.ref == 'refs/heads/main'
# Write access for the automatic Actions token to push the pages branch.
permissions:
contents: write
# NOTE: must match your act_runner labels (e.g. ubuntu-latest, ubuntu-24.04).
runs-on: ubuntu-latest
steps:
- name: Download site artifact
uses: actions/download-artifact@v3
with:
name: public
path: public
- name: Check artifact layout
run: test -f public/index.html
# Publishing interfaces with prod; it never runs under local act tests
# (act sets env.ACT, the Gitea runner does not). The force-push to the
# `pages` branch is what triggers the git-pages webhook.
- name: Publish to pages branch
if: ${{ !env.ACT }}
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
if [ -z "$GITEA_TOKEN" ]; then
echo "::error::Missing GITEA_TOKEN (the automatic Actions token)."
exit 1
fi
cd public
git init -q -b pages .
git config user.name "Yggdrasil CI"
git config user.email "ci@noreply.kb28.ch"
git add -A
git commit -q -m "Publish site from ${GITHUB_SHA}"
repo_host="${GITHUB_SERVER_URL#*://}"
repo_host="${repo_host%/}"
git push -q --force "https://${GITHUB_REPOSITORY_OWNER}:${GITEA_TOKEN}@${repo_host}/${GITHUB_REPOSITORY}.git" pages
+10
View File
@@ -0,0 +1,10 @@
# Generated site and pinned toolchain
public/
tools/
# Calepin build artifacts
.calepin/
.calepin-entry.*
# IDE
.idea/
+20
View File
@@ -0,0 +1,20 @@
# Agent Rules for Yggdrasil Migration
* **Commit Policy**: Small conventional commits. One logical change per
commit, committed only once that step is verified and working. End every
commit message with a blank line followed by an
`Assisted-by: Delta:zai-glm-5.3` footer.
* **Layout**: Sources live in `site/` (`calepin.toml` + `.typ` pages),
generated output in `public/` (gitignored), pinned binaries in `tools/`
(gitignored), helper scripts in `scripts/`, and the old Docsify
documentation stays untouched in `legacy_docs/`.
* **Toolchain**: `calepin` (0.0.61) and `typst` (0.15.1) are pinned in
`scripts/bootstrap.sh` and downloaded into `tools/` with checksum
verification. The build must never depend on global installs. CI installs
the same pinned versions by calling the same scripts.
* **Verification**: Before committing, run a fresh cycle: `rm -rf tools`,
then `just clean`, then `just build` — the build must succeed with no
calepin on `PATH`. Verify the served site (`just preview`): home 200,
category page 200, sub-page 200, missing page shows the 404 page,
`sitemap.xml` present. After every test/clean cycle `git status` must stay
clean.
+27
View File
@@ -0,0 +1,27 @@
# Show the available recipes
default:
@just --list
# Bootstrap the pinned calepin + typst binaries into tools/
tools:
./scripts/bootstrap.sh
# Compile the site into public/
build: tools
./scripts/calepin.sh compile site public
# Build, then serve the site locally
preview: build
./scripts/calepin.sh serve public
# Rebuild on change and serve the result
watch: tools
./scripts/calepin.sh watch site public --serve
# Remove generated output and build caches
clean:
./scripts/clean.sh
# Run the CI workflow locally with act (requires act + docker)
ci:
act push -W .gitea/workflows/build.yml -j build --artifact-server-path /tmp/act-artifacts
+81 -26
View File
@@ -1,33 +1,88 @@
<header>
<h1>Yggdrasil</h1>
</header>
Yggdrasil is a collections of notes around IT, OT and other geeks stuff
<br>
<br>
<br>
# Yggdrasil
# [Bachelor in embedded system](/infotro/)
Here notes I take during my bachelor in embedded systems
Personal knowledge base built as a static website with
[Calepin](https://vincentarelbundock.github.io/calepin/), a Typst-based static
site generator.
Mainly some topics:
- [PTR - Programmation Temps Réel](/infotro/PTR/)
- [SDi - Système Distribué](/infotro/SDi/)
- [Eln - Électronique](/infotro/Eln/)
- [SEm - Systèmes Embarqué](/infotro/SEm/)
## Layout
# [Master of science in engineering in embedded system](/MSE/)
Here note I take during my Master of science un engineering with embedded system as orientation
- `site/` — website sources: `calepin.toml` + `.typ` pages
- `site/themes/yggdrasil/` — local theme extending the bundled `calepin` theme (scoped sidebars, academic-styled landing)
- `public/` — generated site (gitignored)
- `tools/` — pinned `calepin` and `typst` binaries (gitignored, downloaded on demand)
- `scripts/` — helper scripts used by the Justfile and CI
- `legacy_docs/` — the old Docsify documentation, kept unmodified for reference
Mainly some topics:
- [SRE - Software Reverse Engineering](/MSE/SRE/)
## Quick start
# [Embedded Systems](/Embed/)
Here some note specific about some Embedded System
- [STM32](/Embed/STM32/)
- [nRF](/Embed/nRF/)
`just` is the only prerequisite — the toolchain is downloaded and
checksum-verified into `tools/` on first use (no global installs, no cargo):
# [Working environment at HES-SO](/HES-SO/)
Here some note about the working environment at HES-SO
just # list recipes
just tools # download the pinned toolchain into tools/
just build # compile site/ into public/
just preview # build, then serve the site locally
just watch # rebuild on change and serve
just clean # remove public/ and build caches
just ci # run the CI workflow locally with act (needs act + docker)
- [OneDrive - Linux](/HES-SO/OneDrive.md)
- [Teams - Linux](/HES-SO/Teams.md)
## Adding a page
Create `site/<category>/<page>.typ`:
```typst
#set document(title: [Page title])
#metadata((title: "Page title", translation_key: "category-page")) <website-metadata>
#title()
= Page title
Content…
```
and reference it in `site/calepin.toml`:
```toml
[[sidebar.section.item]]
target = "<category>/<page>.typ"
```
Sidebar labels come from the page's `#metadata(...)` line, not from the config.
Every page also renders a printable PDF twin (`pdf = true` in
`calepin.toml`, selectable in the page's view picker). Add `pdf: false` to a
page's `#metadata(...)` to skip its PDF, as `404.typ` does.
## Adding a category
1. Create `site/<category>/` with an `index.typ`, using
`#metadata((title: "Overview", ...))` for its sidebar label.
2. Add a `[[sidebar.section]]` named after the category in `calepin.toml`,
listing the index page and its sub-pages.
3. Add a `[[menus.main]]` entry with the category's `index.typ` as `target`
and the category name as `label` (e.g. `Home`, `IT`), so it appears in the
top navigation bar. The `label` is required here because the index page's
metadata title is `Overview`.
Pages inside a category show only that category's sidebar section — the
local theme (`site/themes/yggdrasil/partials/site-nav-sidebar.html`) filters
the sidebar to the section containing the current page. Pages outside every
category (landing page, `404`, standalone pages) fall back to the full
sidebar.
## Deployment
`just build` produces a fully static site in `public/`: HTML pages with
printable PDF twins, plus `sitemap.xml`, `robots.txt`, and `llms.txt`. The
Gitea Actions workflow in
`.gitea/workflows/build.yml` builds the site on every push with the same
pinned toolchain and uploads `public/` as an artifact.
Pushes to `main` are also published: the `deploy` job force-pushes `public/`
to the repo's `pages` branch using the automatic Actions token (no secrets to
configure). A Gitea webhook on the repo then notifies the self-hosted
[git-pages](https://codeberg.org/git-pages/git-pages) server, which clones
the `pages` branch and serves the site. The push step is gated with
`if: ${{ !env.ACT }}` so local `act` runs never publish, and
`workflow_dispatch` enables manual publishes from the Gitea UI.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 212 files, more files were not shown because too many files have changed in this diff. Show more