This commit is contained in:
2026-10-16 17:00:37 +02:00
commit 38e1e404fc
16 changed files with 15801 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
{
"features": {
"ghcr.io/khannurien/devcontainer-features/claude-code:1": {
"version": "1.2.0",
"resolved": "ghcr.io/khannurien/devcontainer-features/claude-code@sha256:17eb69bfd15ff5206c0bff2945935a4349f7423cabee461a0ba2681d52205db9",
"integrity": "sha256:17eb69bfd15ff5206c0bff2945935a4349f7423cabee461a0ba2681d52205db9"
},
"ghcr.io/khannurien/devcontainer-features/opencode:1": {
"version": "1.1.0",
"resolved": "ghcr.io/khannurien/devcontainer-features/opencode@sha256:8df3f8c98a104ce7e089ba3e8df39e0d3890753c8dc92e03deb54527d30d3574",
"integrity": "sha256:8df3f8c98a104ce7e089ba3e8df39e0d3890753c8dc92e03deb54527d30d3574"
},
"ghcr.io/khannurien/devcontainer-features/rtk:1": {
"version": "1.1.0",
"resolved": "ghcr.io/khannurien/devcontainer-features/rtk@sha256:4a60b3a1d1b64904de3d856c61cdf7e5943e3c74d114609787dc88d9db7c788f",
"integrity": "sha256:4a60b3a1d1b64904de3d856c61cdf7e5943e3c74d114609787dc88d9db7c788f"
}
}
}

View File

@@ -0,0 +1,38 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/markdown
{
"name": "Markdown Editing",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:bookworm",
// Features to add to the dev container. More info: https://containers.dev/features.
// typst is installed by .devcontainer/setup.sh, not by the devcontainers-extra
// feature: 1.0.6 resolves "latest" to the legacy v23-03-28 tag.
"features": {},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"yzhang.markdown-all-in-one",
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-cspell-bundled-dictionaries",
"DavidAnson.vscode-markdownlint",
"shd101wyy.markdown-preview-enhanced",
"bierner.github-markdown-preview",
"myriad-dreamin.tinymist"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Installs the colour emoji font typst needs: see .devcontainer/setup.sh.
"postCreateCommand": "bash .devcontainer/setup.sh"
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

33
.devcontainer/setup.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# noto color emoji, colrv1 flavour.
#
# typst >= 0.14 exports colr colour glyphs to pdf, but it does not load the cbdt
# bitmap font that debian's fonts-noto-color-emoji package installs (`typst fonts`
# does not even list it), so emoji used in source.md silently disappear from the
# pdf. the colrv1 build is picked up by font fallback, no markup needed.
set -euo pipefail
# noto-emoji only tags releases sporadically, so pin the font by commit
EMOJI_FONT_COMMIT=f3ae03f5e9b3b8516fa151f7168159ca1a3e7515
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
# typst, static musl build: x86_64 releases no longer ship a gnu build
TYPST_VERSION=0.15.1
case "$(uname -m)" in
x86_64 | amd64) typst_arch=x86_64 ;;
aarch64 | arm64) typst_arch=aarch64 ;;
*) echo "unsupported architecture: $(uname -m)" >&2; exit 1 ;;
esac
curl -fsSL "https://github.com/typst/typst/releases/download/v${TYPST_VERSION}/typst-${typst_arch}-unknown-linux-musl.tar.xz" \
| tar -xJ -C "$tmp"
sudo install -m 755 "$tmp/typst-${typst_arch}-unknown-linux-musl/typst" /usr/local/bin/typst
curl -fsSL -o "$tmp/Noto-COLRv1.ttf" \
"https://raw.githubusercontent.com/googlefonts/noto-emoji/${EMOJI_FONT_COMMIT}/fonts/Noto-COLRv1.ttf"
sudo install -D -m 644 "$tmp/Noto-COLRv1.ttf" /usr/local/share/fonts/Noto-COLRv1.ttf
command -v fc-cache > /dev/null && fc-cache -f > /dev/null
typst fonts | grep -i emoji