pkgs/homepage: add config.html

This commit is contained in:
Astro 2022-10-23 00:03:23 +02:00
parent f7f4836430
commit 8e32678ee6
2 changed files with 12 additions and 0 deletions

View File

@ -3,11 +3,14 @@
, substituteAll
, stdenv
, pandoc
, bat
, ansi2html
}:
let
inherit (self.packages.${system})
export-config
gateway-report network-graphs
subnetplans vlan-report;
@ -20,11 +23,19 @@ stdenv.mkDerivation {
nativeBuildInputs = [
pandoc
bat
ansi2html
];
buildPhase = ''
pandoc -t html ${../../../doc/hello.md} > index.html
pandoc -t html ${vlan-report} > vlan-report.html
pandoc -t html ${gateway-report} > gateway-report.html
echo '<pre>' > config.html
bat --color=always --theme=GitHub -p ${export-config} | \
ansi2html -il >> config.html
echo '</pre>' >> config.html
ln -s ${substituteAll {
src = ./figure.html;
img = "physical.png";

View File

@ -25,6 +25,7 @@
<li><a href="vlan-report.html">VLAN-Belegungen</a></li>
<li><a href="logical.html">Logische Topologie</a></li>
<li><a href="physical.html">Physische Topologie</a></li>
<li><a href="config.html">Config</a></li>
</ul>
</nav>
</header>