mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 02:14:13 -05:00
proxy cgit website assets instead of redir, add diff highlight
This commit is contained in:
Generated
+3
-3
@@ -529,11 +529,11 @@
|
||||
"utils": "utils_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1661058364,
|
||||
"narHash": "sha256-KRjLoxlrznRkbsJ3ciPg/uQG/+x0JcE60+W/RYXgcHU=",
|
||||
"lastModified": 1661062745,
|
||||
"narHash": "sha256-1Sl10D3u9W+Vj4309d3qwEV/GjCj9ej6qz0UOdoanyg=",
|
||||
"owner": "~misterio",
|
||||
"repo": "website",
|
||||
"rev": "bd2aa820d87579851ff0e613921c15c290df9a9b",
|
||||
"rev": "79cc5e46888fcc05ed6a11d1d3845a1ad21a1285",
|
||||
"type": "sourcehut"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
td.linenos {
|
||||
width: 2em;
|
||||
}
|
||||
code span.head {
|
||||
color: var(--highlight);
|
||||
}
|
||||
code span.hunk {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
code span.ctx {
|
||||
color: var(--text-main);
|
||||
}
|
||||
code span.add {
|
||||
color: var(--positive);
|
||||
}
|
||||
code span.del {
|
||||
color: var(--negative);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
{ pkgs, lib, persistence, ... }:
|
||||
{ inputs, pkgs, lib, persistence, ... }:
|
||||
let
|
||||
cgit = "${pkgs.semanticgit}";
|
||||
toDateTime = timestamp: builtins.readFile (
|
||||
pkgs.runCommandLocal "datetime" { } ''
|
||||
dt="$(date -Ru -d @${toString timestamp})"
|
||||
echo -n ''${dt/+0000/GMT} > $out
|
||||
''
|
||||
);
|
||||
in
|
||||
{
|
||||
services = {
|
||||
@@ -12,8 +18,13 @@ in
|
||||
"=/cgit.css" = {
|
||||
alias = "${./cgit.css}";
|
||||
};
|
||||
# Get assets from main website
|
||||
"/assets" = {
|
||||
return = "301 https://fontes.dev.br$request_uri";
|
||||
root = "${pkgs.website.main}/public";
|
||||
extraConfig = ''
|
||||
add_header Last-Modified "${toDateTime inputs.website.lastModified}";
|
||||
add_header Cache-Control max-age="${toString (60 * 60 * 24 /* One day */)}";
|
||||
'';
|
||||
};
|
||||
"/" = {
|
||||
root = "${cgit}/cgit";
|
||||
|
||||
@@ -38,7 +38,6 @@ in
|
||||
extraConfig = ''
|
||||
add_header Last-Modified "${toDateTime inputs.website.lastModified}";
|
||||
add_header Cache-Control max-age="${toString (60 * 60 * 24 /* One day */)}";
|
||||
add_header Access-Control-Allow-Origin https://git.fontes.dev.br;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user