more improvements

This commit is contained in:
Pyrox 2024-07-10 14:30:58 -04:00
parent 07d338a19a
commit 3355ffcbf9
Signed by untrusted user: pyrox
GPG key ID: 8CDF3F7CAA53A0F5
3 changed files with 14 additions and 1 deletions

1
.gitignore vendored
View file

@ -6,3 +6,4 @@ docs
.cache/plugin/social
mkdocs-hooks/__pycache__
public
result-doc

View file

@ -1,10 +1,16 @@
{ stdenvNoCC, pkgs }:
{
stdenvNoCC,
pkgs,
perl,
}:
stdenvNoCC.mkDerivation {
pname = "md-manual";
version = "1.0.0";
src = ./.;
buildInputs = [ perl ];
installPhase = ''
mkdir $out
cp index.md $out/index.md
@ -12,5 +18,10 @@ stdenvNoCC.mkDerivation {
cp -r ${pkgs.amg.nixpkgs-manual} $out/Nixpkgs/
cp -r ${pkgs.amg.aux-wiki} $out/Aux
cp -r ${pkgs.lix-docs.doc}/manualMD $out/Lix
chmod -R u+w $out/Lix
pushd $out/Lix
find . -type f -exec perl -pi -e 's/\<div class="warning"\>\n\n/\?\?\? bug\n\n\ \ /g' {} \;
popd
chmod -R u-w $out/Lix
'';
}

View file

@ -90,6 +90,7 @@ stdenvNoCC.mkDerivation {
find . -type f -exec perl -pi -e 's/\s*:::{.tip}\n/!!! tip\n\ \ \ \ /' {} \;
find . -type f -exec perl -pi -e 's/\s*:::{.example}\n/!!! example\n\ \ \ \ /' {} \;
find . -type f -exec sed -i 's/\s*::://g' {} \;
find . -type f -exec sed -i 's/\n```nix/\ \ \ \ ```nix/g' {} \;
popd
'';