Add nix build script to generate static files

This commit is contained in:
thiloho
2023-08-01 22:59:28 +00:00
parent 0017fcdfa7
commit a7a1570805
5 changed files with 918 additions and 854 deletions

3
.gitignore vendored
View File

@@ -19,3 +19,6 @@ pnpm-debug.log*
# macOS-specific files
.DS_Store
result
result-*

View File

@@ -1,4 +1,4 @@
import { defineConfig, sharpImageService } from "astro/config";
import { defineConfig } from "astro/config";
import { rehypeHeadingIds } from "@astrojs/markdown-remark";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import svelte from "@astrojs/svelte";
@@ -8,8 +8,7 @@ export default defineConfig({
site: "https://aurora.thilohohlt.com",
compressHTML: true,
experimental: {
assets: true,
inlineStylesheets: "auto",
assets: true
},
scopedStyleStrategy: "class",
markdown: {
@@ -26,8 +25,5 @@ export default defineConfig({
],
],
},
image: {
service: sharpImageService(),
},
integrations: [svelte()],
});

View File

@@ -20,11 +20,19 @@
});
in
{
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs # Node.js, plus npm, npx, and corepack
packages = forAllSystems ({ pkgs }: {
default = pkgs.buildNpmPackage {
name = "build-aurora-blog";
buildInputs = with pkgs; [
nodejs_18
];
src = ./.;
npmDepsHash = "sha256-K30UsMZ508XT1x/1eXY/xg7dfhLm55pdi9vOdDQHtWg=";
npmBuild = "npm run build";
installPhase = ''
mkdir $out
cp -r dist/* $out
'';
};
});
};

1742
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -17,7 +17,6 @@
"astro": "^2.5.3",
"open-props": "^1.5.8",
"rehype-autolink-headings": "^6.1.1",
"sharp": "^0.32.1",
"svelte": "^3.59.1"
}
}