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
3 changes: 3 additions & 0 deletions .changes/unreleased/Added-20250929-130247.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Added
body: Click to copy on codeblocks
time: 2025-09-29T13:02:47.581202939+10:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Added-20250929-130255.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Added
body: Hightlight.js for code hightlighting
time: 2025-09-29T13:02:55.149029223+10:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Added-20250930-072149.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Added
body: Playwright testing init
time: 2025-09-30T07:21:49.847142979+10:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Added-20250930-182748.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Added
body: Typst code render
time: 2025-09-30T18:27:48.705433051+10:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Added-20250930-182758.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Added
body: Mermaid raw text display option
time: 2025-09-30T18:27:58.86821716+10:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Added-20250930-190005.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Added
body: Correctly rendering blockquotes
time: 2025-09-30T19:00:05.281956224+10:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Added-20251001-082427.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Added
body: Playwright testing suite added
time: 2025-10-01T08:24:27.186267905+10:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Changed-20250930-185943.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Changed
body: Colour correction for hyperlinks
time: 2025-09-30T18:59:43.054642843+10:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Changed-20250930-185951.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Changed
body: Hyperlinks now bold text
time: 2025-09-30T18:59:51.40831382+10:00
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
54 changes: 38 additions & 16 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Platform release to Pages

on:
Expand All @@ -8,24 +8,24 @@ on:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: true
# Default to bash
defaults:
run:
shell: bash

# Default to bash
defaults:
run:
shell: bash

jobs:
# Verify job (extra checks for platform releases)
verify:
Expand All @@ -44,6 +44,17 @@ jobs:
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Install Rust and Typst
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
cargo install --locked typst-cli
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Render Typst code blocks
run: |
if [ -f scripts/render-typst.sh ]; then
bash scripts/render-typst.sh
fi
- name: Build with Hugo (panic on warnings)
env:
HUGO_ENVIRONMENT: production
Expand All @@ -62,6 +73,12 @@ jobs:
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Install Rust and Typst
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
cargo install --locked typst-cli
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -72,6 +89,11 @@ jobs:
uses: actions/configure-pages@v5
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Render Typst code blocks
run: |
if [ -f scripts/render-typst.sh ]; then
bash scripts/render-typst.sh
fi
- name: Build with Hugo
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
27 changes: 26 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,29 @@ CLAUDE.md
GEMINI.md
AGENTS.md
.claude
.copilot
.copilot

# Playwright
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/playwright/.auth/

# Typst / LaTeX
*.pdf
*.aux
*.log
*.out
*.toc
*.synctex.gz
*.fdb_latexmk
*.fls
*.xdv

# Notes
*.txt# pixi environments
.pixi/*
!.pixi/config.toml
.typst-temp-*
70 changes: 69 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Use `hugo new` with the available archetypes to create new content:

### Blog Posts
```bash
# Structured blog post
# Structured blog post
hugo new content/blog/posts/your-post-title.md
# Creates a note
hugo new content/notes/posts/your-note-title.md
Expand All @@ -33,3 +33,71 @@ hugo new content/projects/your-project-name.md
# Add a publication
hugo new content/publications/your-publication-title.md
```

## Code Block Rendering

Control how code blocks are displayed vs rendered using attributes:

### Mermaid Diagrams
- ` ```mermaid ` - Default: render the diagram
- ` ```mermaid {.raw} ` - Show raw mermaid code (syntax highlighted)

### Typst Documents
- ` ```typst ` - Default: show raw typst code (syntax highlighted)
- ` ```typst {.render} ` - Compile and show output
- ` ```typst {.side-by-side} ` - Show code and output side by side

#### Rendering Typst Outputs

To generate PNG images for Typst code blocks marked with `{.render}` or `{.side-by-side}`:

```bash
bash scripts/render-typst.sh
```

This script will:
- Scan all markdown files for Typst code blocks that need rendering
- Compile them using the Typst CLI to PNG images
- Save outputs to `static/rendered/typst/{page-slug}/typst-{hash}.png`
- Cache previously rendered images (won't re-render if unchanged)

## Content Publishing Workflow

### For posts with Typst rendering:

1. **Create or edit your markdown file:**
```bash
hugo new content/notes/posts/my-new-post.md
# Edit the file, add Typst code blocks with {.render} or {.side-by-side}
```

2. **Generate Typst PNG outputs:**
```bash
bash scripts/render-typst.sh
```

3. **Test locally:**
```bash
hugo server -D
# Visit http://localhost:1313 and verify your content renders correctly
```

4. **Commit and push:**
```bash
git add content/notes/posts/my-new-post.md
git add static/rendered/typst/my-new-post/
git commit -m "Add new post with Typst rendering"
git push
```

### For posts without Typst rendering:

1. Create/edit markdown file
2. Test locally with `hugo server -D`
3. Commit and push

### Important Notes:
- **Always commit the generated PNG files** - They must be in the repository for GitHub Pages to serve them
- The render script uses caching - only re-renders changed content
- Raw Typst code blocks (` ```typst `) don't need the script, they just show syntax-highlighted code
- Mermaid diagrams work without scripts (rendered client-side)
Loading
Loading