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
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on:
pull_request:
branches: [release]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- uses: pnpm/action-setup@v6

- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm

- run: pnpm install --frozen-lockfile

- run: pnpm build
17 changes: 7 additions & 10 deletions .github/workflows/hugo.yml → .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Deploy to GitHub Pages
on:
push:
branches: [release]
pull_request:
types: [closed]
workflow_dispatch:

permissions:
Expand All @@ -21,39 +19,38 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v6

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version: 22
node-version: 24
cache: pnpm

- run: pnpm install --frozen-lockfile

- name: Configure Pages
id: pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@v6
with:
enablement: true

- run: pnpm build
env:
BASE_PATH: ${{ steps.pages.outputs.base_path }}

- uses: actions/upload-pages-artifact@v3
- uses: actions/upload-pages-artifact@v5
with:
path: dist

deploy:
name: Deploy
if: github.event_name != 'pull_request' || github.event.pull_request.merged == true
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
59 changes: 33 additions & 26 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import fs from "node:fs";
import mdx from "@astrojs/mdx";
import { unified } from "@astrojs/markdown-remark";
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import expressiveCode from "astro-expressive-code";
import tailwindcss from "@tailwindcss/vite";
import icon from "astro-icon";
import robotsTxt from "astro-robots-txt";
import webmanifest from "astro-webmanifest";
import { defineConfig } from "astro/config";
import { expressiveCodeOptions } from "./src/site.config";
import { siteConfig } from "./src/site.config";
import partytown from "@astrojs/partytown";

Expand Down Expand Up @@ -42,11 +41,7 @@ export default defineConfig({
forward: ["dataLayer.push"],
},
}),
expressiveCode(expressiveCodeOptions),
icon(),
tailwind({
applyBaseStyles: false,
}),
sitemap({
changefreq: "weekly",
priority: 0.7,
Expand Down Expand Up @@ -90,34 +85,46 @@ export default defineConfig({
(await import("@playform/compress")).default(),
],
markdown: {
rehypePlugins: [
rehypeUnwrapImages,
[rehypeBasePath, { base: BASE_PATH }],
// rehype-katex must run before rehype-external-links so the latter
// doesn't rewrite anchors inside katex's emitted DOM.
rehypeKatex,
[
rehypeExternalLinks,
{
rel: ["nofollow, noreferrer"],
target: "_blank",
},
],
],
remarkPlugins: [remarkReadingTime, remarkDirective, remarkAdmonitions, remarkMath],
remarkRehype: {
footnoteLabelProperties: {
className: [""],
shikiConfig: {
themes: {
light: "min-light",
dark: "min-dark",
},
// defaultColor: false lets us control colors entirely via CSS vars
// tied to the site's [data-theme] toggle.
defaultColor: false,
wrap: false,
},
processor: unified({
remarkPlugins: [remarkReadingTime, remarkDirective, remarkAdmonitions, remarkMath],
rehypePlugins: [
rehypeUnwrapImages,
[rehypeBasePath, { base: BASE_PATH }],
// rehype-katex must run before rehype-external-links so the latter
// doesn't rewrite anchors inside katex's emitted DOM.
rehypeKatex,
[
rehypeExternalLinks,
{
rel: ["nofollow, noreferrer"],
target: "_blank",
},
],
],
remarkRehype: {
footnoteLabelProperties: {
className: [""],
},
},
}),
},
// https://docs.astro.build/en/guides/prefetch/
prefetch: true,
vite: {
optimizeDeps: {
exclude: ["@resvg/resvg-js"],
},
plugins: [rawFonts([".ttf", ".woff"])],
plugins: [tailwindcss(), rawFonts([".ttf", ".woff"])],
},
});

Expand Down
30 changes: 12 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,23 @@
"check": "astro check"
},
"dependencies": {
"@astrojs/mdx": "5.0.4",
"@astrojs/markdown-remark": "^7.2.0",
"@astrojs/mdx": "7.0.0",
"@astrojs/partytown": "^2.1.7",
"@astrojs/rss": "4.0.18",
"@astrojs/sitemap": "3.7.2",
"@astrojs/tailwind": "6.0.2",
"@astrojs/sitemap": "3.7.3",
"@fontsource-variable/inter": "^5.2.8",
"@fontsource-variable/jetbrains-mono": "^5.2.8",
"@fontsource-variable/newsreader": "^5.2.10",
"@playform/compress": "^0.2.3",
"astro": "6.3.1",
"astro-expressive-code": "^0.41.7",
"@tailwindcss/vite": "^4.3.1",
"astro": "7.0.0",
"astro-icon": "^1.1.5",
"astro-robots-txt": "^1.0.0",
"astro-seo-schema": "^5.2.0",
"astro-seo-schema": "^7.0.0",
"astro-webmanifest": "^1.0.0",
"cssnano": "^7.1.9",
"hastscript": "^9.0.1",
"katex": "^0.16.45",
"katex": "^0.17.0",
"mdast-util-directive": "^3.1.0",
"mdast-util-to-markdown": "^2.1.2",
"mdast-util-to-string": "^4.0.0",
Expand All @@ -40,9 +39,10 @@
"satori": "0.15.2",
"satori-html": "^0.3.2",
"schema-dts": "^1.1.5",
"sharp": "^0.34.5",
"sharp": "^0.35.2",
"unified": "^11.0.5",
"unist-util-visit": "^5.1.0"
"unist-util-visit": "^5.1.0",
"zod": "^4.4.3"
},
"devDependencies": {
"@astrojs/check": "^0.9.9",
Expand All @@ -53,17 +53,11 @@
"@types/mdast": "^4.0.4",
"autoprefixer": "^10.5.0",
"pagefind": "^1.5.2",
"prettier": "^3.8.3",
"prettier": "^3.8.4",
"prettier-plugin-astro": "0.14.1",
"prettier-plugin-tailwindcss": "^0.6.14",
"reading-time": "^1.5.0",
"rehype-unwrap-images": "^1.0.0",
"tailwindcss": "^3.4.19",
"tailwindcss": "^4.3.1",
"typescript": "^5.9.3"
},
"pnpm": {
"overrides": {
"sharp": "^0.34.5"
}
}
}
Loading