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 .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
#
# treewide: nixfmt
475ec1b3eb17b29c7254ad20aec9ee9cb81d18b8

# site: format with prettier
ea43182509a9c6591c04ace80418cbc8e9e94b96
35 changes: 35 additions & 0 deletions .github/workflows/site-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Check site formatting"

on:
push:
branches:
- master
merge_group:
pull_request:

permissions:
contents: read

jobs:
prettier:
runs-on: ubuntu-latest
defaults:
run:
working-directory: site
steps:
- uses: actions/checkout@v7

- uses: actions/setup-node@v7
with:
cache: npm
cache-dependency-path: site/package-lock.json

- name: Install dependencies
run: npm ci

- name: Check formatting
run: npm run format:check

- if: ${{ failure() }}
run: |
echo "::error :: Hey! It looks like the site is not formatted. Run 'npm run format' in site/ to fix it."
1 change: 1 addition & 0 deletions site/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock.json
3 changes: 3 additions & 0 deletions site/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["prettier-plugin-astro"]
}
9 changes: 6 additions & 3 deletions site/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
// @ts-check
import { defineConfig } from "astro/config";
import { satteri } from '@astrojs/markdown-satteri';
import { satteri } from "@astrojs/markdown-satteri";
import netlify from "@astrojs/netlify";
import expressiveCode, { ExpressiveCodeTheme } from "astro-expressive-code";
import icon from "astro-iconset";

import { light as nixCodeLight, dark as nixCodeDark } from "./src/assets/nixCodeTheme.ts";
import {
light as nixCodeLight,
dark as nixCodeDark,
} from "./src/assets/nixCodeTheme.ts";

import tailwindcss from "@tailwindcss/vite";

Expand All @@ -26,7 +29,7 @@ export default defineConfig({
defaultProps: {
wrap: true,
},
})
}),
],

markdown: {
Expand Down
47 changes: 45 additions & 2 deletions site/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
"astro": "astro",
"format": "prettier --write .",
Comment thread
friedow marked this conversation as resolved.
"format:check": "prettier --check ."
},
"dependencies": {
"@astrojs/check": "^0.9.10",
Expand All @@ -23,6 +25,8 @@
},
"devDependencies": {
"@iconify-json/mdi": "^1.2.3",
"astro-iconset": "^0.0.6"
"astro-iconset": "^0.0.6",
"prettier": "^3.9.6",
"prettier-plugin-astro": "^0.14.1"
}
}
Loading
Loading