Compare commits
52 Commits
1af36f4ab9
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 92caeb4d99 | |||
| b469d78d1a | |||
| 73daac3ea8 | |||
| ff8fe17cde | |||
| 2cc6cadb8c | |||
| 098bc74008 | |||
| a6e9a2498f | |||
| 41fea82c93 | |||
| ce09d9d7a4 | |||
| eed8febf6e | |||
| cbe766ea2d | |||
| 1f3a8b9447 | |||
| 386062a6a6 | |||
| dc96021ba1 | |||
| 7814ee7ae2 | |||
| 4febf06c5c | |||
| c5f6c4a8fa | |||
| 37d5bac9d0 | |||
| ef8369e26a | |||
| d25e8219f2 | |||
| b0ca0f3916 | |||
| 6b4208003c | |||
| 15af4fd7cb | |||
| 5243e4dffd | |||
| 0b5e18dc74 | |||
| 03aa7ab07a | |||
| 479c5bccae | |||
| 57186ed3b4 | |||
| 582566cc33 | |||
| 86b8966290 | |||
| fe2a356510 | |||
| 96ff06fd8b | |||
| 90e4e35230 | |||
| fc1d8d5a86 | |||
| 338ff7540c | |||
| 0d3ac91a55 | |||
| b41d106186 | |||
| cc79adb0d2 | |||
| dd5f160246 | |||
| 08246ed696 | |||
| 4001c236f2 | |||
| 68406e3947 | |||
| 8546a16acd | |||
| c32e922940 | |||
| eb1710b902 | |||
| d4d627889a | |||
| 507a8fa0ea | |||
| 0ebeb2f4ff | |||
| 3ccd612c87 | |||
| e80bb5010e | |||
| 9ea34ddf5f | |||
| 6ad81dae17 |
@@ -34,11 +34,18 @@ cp -r $agdaHtml/* code/
|
||||
# Static folder changed, re-run Hugo
|
||||
hugo $hugoFlags --config=config.toml,config-urls.toml
|
||||
|
||||
# Output result
|
||||
mkdir $out
|
||||
cp -r public/$publicPath/* $out/
|
||||
|
||||
# Do post-processing of HTML files: render math and link up Agda code
|
||||
htmlfiles=$(find $out/ -regex "$out/.*\.html")
|
||||
# Do post-processing of HTML files: render math, link up Agda code, subset fonts and icons
|
||||
gendir="public/$publicPath"
|
||||
htmlfiles=$(find $gendir/ -regex "$gendir/.*\.html")
|
||||
chmod -R u+w $gendir
|
||||
echo $htmlfiles | xargs ${gems}/bin/bundle exec ${ruby}/bin/ruby ./convert.rb --katex-js-file static/katex/katex.min.js
|
||||
echo $htmlfiles | xargs ${gems}/bin/bundle exec ${ruby}/bin/ruby ./agda.rb
|
||||
|
||||
if [ "$subset" = "true" ]; then
|
||||
echo $htmlfiles | xargs ${gems}/bin/bundle exec ${ruby}/bin/ruby ./chatgpt-subset-feather-icon.rb $gendir/feather-sprite.svg
|
||||
echo $htmlfiles | xargs python3 chatgpt-subset-one-go.py $gendir/fonts
|
||||
fi
|
||||
|
||||
# Output result
|
||||
mkdir $out
|
||||
cp -r $gendir/* $out/
|
||||
|
||||
166
flake.lock
generated
166
flake.lock
generated
@@ -3,14 +3,17 @@
|
||||
"bergamot-elm": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
"nixpkgs": [
|
||||
"web-files",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703837234,
|
||||
"narHash": "sha256-ZenaFYxXmVXu6vmPnZOGjw4cZb8VpnxrRZlqmQCPKrU=",
|
||||
"lastModified": 1766788208,
|
||||
"narHash": "sha256-/P3uz+VNeNOFzI2qSIijy53MpnejO1sWgB+gMqcI2z0=",
|
||||
"ref": "main",
|
||||
"rev": "f35a8d17e8e8b23641ffd2ab9e9a7e1dd2370e54",
|
||||
"revCount": 81,
|
||||
"rev": "ceca48840efe668fb033b47bc6e415ea4cf9ae85",
|
||||
"revCount": 97,
|
||||
"type": "git",
|
||||
"url": "https://dev.danilafe.com/Everything-I-Know-About-Types/bergamot-elm.git"
|
||||
},
|
||||
@@ -23,11 +26,11 @@
|
||||
"blog-source": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1724015649,
|
||||
"narHash": "sha256-0ju+91LsfNwH3pIaKx6VhNc8ojaA3gTqgcXO8Nv0aYM=",
|
||||
"lastModified": 1767573223,
|
||||
"narHash": "sha256-cm7P5geANPTE4d0V8eMuqUvRO1CfSjoGlUVs2nr0AyE=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "6bf7659b19ac7b701abec401234dc67479f3a8ec",
|
||||
"revCount": 835,
|
||||
"rev": "5e117e3f485c305ee7a297c2e95cd53d8f52e248",
|
||||
"revCount": 926,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://dev.danilafe.com/Web-Projects/blog-static.git"
|
||||
@@ -39,12 +42,15 @@
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1648297722,
|
||||
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -54,12 +60,15 @@
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1676283394,
|
||||
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -70,14 +79,14 @@
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -88,14 +97,14 @@
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -106,63 +115,16 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1715534503,
|
||||
"narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=",
|
||||
"lastModified": 1766736597,
|
||||
"narHash": "sha256-BASnpCLodmgiVn0M1MU2Pqyoz0aHwar/0qLkp7CjvSQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2057814051972fa1453ddfb0d98badbea9b83c06",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1676718858,
|
||||
"narHash": "sha256-giQecvcifVLNHCC9lMfTGP09tNxXhOMw+d/aql7MhRw=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e6d5772f3515b8518d50122471381feae7cbae36",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1701068326,
|
||||
"narHash": "sha256-vmMceA+q6hG1yrjb+MP8T0YFDQIrW3bl45e7z24IEts=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8cfef6986adfb599ba379ae53c9f5631ecd2fd9c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1701319520,
|
||||
"narHash": "sha256-xVghb4ELbEtJUdEmB4PR+sq/aoNP0VEcM6GczDh+Zss=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "db77de49336382a33b9490a88ba3fe483e2b605f",
|
||||
"rev": "f560ccec6b1116b22e6ed15f4c510997d99d5852",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -170,14 +132,16 @@
|
||||
"resume": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1691357458,
|
||||
"narHash": "sha256-kFdV5FUPCW7xNS8xonzHb8MgVjwu0PR5rZNuAQQE7Yw=",
|
||||
"ref": "master",
|
||||
"rev": "c756fd5efaeb7d4484d535cd2fe3038491fc2550",
|
||||
"revCount": 57,
|
||||
"lastModified": 1766794825,
|
||||
"narHash": "sha256-+Fabo0uQF9srEXdi9TB1wjB+PHaU9htXj/fjnvUFNAs=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "f22cb5b79580020079ba7223346e612b41eb7d42",
|
||||
"revCount": 74,
|
||||
"type": "git",
|
||||
"url": "https://dev.danilafe.com/DanilaFe/resume"
|
||||
},
|
||||
@@ -225,18 +189,50 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"web-files": {
|
||||
"inputs": {
|
||||
"bergamot-elm": "bergamot-elm",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703994569,
|
||||
"narHash": "sha256-t5F83bqCyCBQch7WrB5KdlR48MHtfjYpUeXZc+OUuH4=",
|
||||
"lastModified": 1766788330,
|
||||
"narHash": "sha256-7Dx1g0fM/glKCBzo2ZgIwXyp5ASyG/Y7S5OPcltb3Os=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "2af465fb8ecfc0ecb5cdcfab76d2356e6a3398e9",
|
||||
"revCount": 8,
|
||||
"rev": "407b087a1d0042e04bbcc9333097decd9e776270",
|
||||
"revCount": 14,
|
||||
"type": "git",
|
||||
"url": "https://dev.danilafe.com/Nix-Configs/web-files.git"
|
||||
},
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
resume.url = "git+https://dev.danilafe.com/DanilaFe/resume";
|
||||
resume.inputs.nixpkgs.follows = "nixpkgs";
|
||||
blog-source = {
|
||||
flake = false;
|
||||
url = "https://dev.danilafe.com/Web-Projects/blog-static.git";
|
||||
@@ -10,6 +11,7 @@
|
||||
submodules = true;
|
||||
};
|
||||
web-files.url = "git+https://dev.danilafe.com/Nix-Configs/web-files.git";
|
||||
web-files.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, blog-source, nixpkgs, flake-utils, resume, web-files }:
|
||||
|
||||
12
gemset.nix
12
gemset.nix
@@ -24,10 +24,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "149r94xi6b3jbp6bv72f8383b95ndn0p5sxnq11gs1j9jadv0ajf";
|
||||
sha256 = "0x8asxl83msn815lwmb2d7q5p29p7drhjv5va0byhk60v9n16iwf";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.8.6";
|
||||
version = "2.8.8";
|
||||
};
|
||||
nokogiri = {
|
||||
dependencies = ["mini_portile2" "racc"];
|
||||
@@ -35,19 +35,19 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "023f2j0q8makgmmfj4pv2fhwgcbh9y8s678za1cb68ry9fdpkkkh";
|
||||
sha256 = "0npx535cs8qc33n0lpbbwl0p9fi3a5bczn6ayqhxvknh9yqw77vb";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.15.6";
|
||||
version = "1.18.3";
|
||||
};
|
||||
racc = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "021s7maw0c4d9a6s07vbmllrzqsj2sgmrwimlh8ffkvwqdjrld09";
|
||||
sha256 = "0byn0c9nkahsl93y9ln5bysq4j31q8xkf2ws42swighxd4lnjzsa";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.8.0";
|
||||
version = "1.8.1";
|
||||
};
|
||||
}
|
||||
|
||||
13
lib.nix
13
lib.nix
@@ -14,6 +14,13 @@ let
|
||||
gemset = ./gemset.nix;
|
||||
};
|
||||
|
||||
pythonEnv = python3.withPackages (python-pkgs: [
|
||||
python-pkgs.beautifulsoup4
|
||||
python-pkgs.lxml
|
||||
python-pkgs.fonttools
|
||||
python-pkgs.brotli
|
||||
]);
|
||||
|
||||
# --- Building Agda HTML ---
|
||||
agdaEnv = agda.withPackages [ agdaPackages.standard-library ];
|
||||
agdaHtml = settings:
|
||||
@@ -23,7 +30,7 @@ let
|
||||
agdaBuildScript = builtins.toFile "build-agda-html.rb" (builtins.readFile "${settings.src}/build-agda-html.rb");
|
||||
submoduleDataFile = builtins.toFile "submodules.json" (builtins.readFile "${settings.src}/data/submodules.json");
|
||||
codeRoot = pkgs.lib.cleanSource "${settings.src}/code";
|
||||
agdaCommand = pkgs.lib.escapeShellArg "agda -l standard-library -i . ";
|
||||
agdaCommand = pkgs.lib.escapeShellArg "agda --transliterate -l standard-library -i . ";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "blog-static-agda-html";
|
||||
@@ -52,8 +59,9 @@ let
|
||||
gems = gems settings;
|
||||
agdaHtml = agdaHtml settings;
|
||||
buildInputs = [
|
||||
hugo ruby stork agdaEnv
|
||||
hugo ruby stork agdaEnv pythonEnv
|
||||
];
|
||||
subset = lib.boolToString settings.subset;
|
||||
};
|
||||
in
|
||||
{
|
||||
@@ -61,6 +69,7 @@ in
|
||||
inherit (settings) host;
|
||||
ssl = settings.ssl or false;
|
||||
drafts = settings.drafts or false;
|
||||
subset = settings.subset or true;
|
||||
src = blog-source;
|
||||
path = ".";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user