Skip to content

Commit

Permalink
Improvements to plutus-metatheory site
Browse files Browse the repository at this point in the history
  • Loading branch information
zeme-wana committed May 6, 2024
1 parent 067e74f commit f545b46
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 4 deletions.
8 changes: 6 additions & 2 deletions nix/plutus-metatheory-site.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ let
name = "plutus-metatheory-doc";
src = inputs.self + /plutus-metatheory;
buildInputs = [ repoRoot.nix.agda-with-stdlib ];

# Because of a quirk with jekyll, the _layouts folder must be in the same
# directory as the source folder.
buildPhase = ''
mkdir "$out"
mkdir $out
cp -R ${inputs.self + /plutus-metatheory/html/_layouts} $out
agda --html --html-highlight=auto --html-dir="$out" "src/index.lagda.md"
'';
dontInstall = true;
Expand All @@ -21,7 +25,7 @@ let
}
''
mkdir "$out"
# disable the disk cache otherwise it tries to write to the source
# Disable the disk cache otherwise it tries to write to the source
jekyll build \
--disable-disk-cache \
-s ${plutus-metatheory-agda-html} \
Expand Down
2 changes: 2 additions & 0 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ in
pkgs.bzip2
pkgs.gawk
pkgs.scriv
pkgs.fswatch

# Needed to make building things work, not for commands
pkgs.zlib
Expand Down Expand Up @@ -79,6 +80,7 @@ in
group = "changelog";
};


shellHook = ''
${builtins.readFile certEnv}
'';
Expand Down
5 changes: 5 additions & 0 deletions plutus-metatheory/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
*.lagda~
*.agda~
src/MAlonzo
html/_site
html/.jekyll-cache
html/*.html
html/*.md
html/*.css
4 changes: 2 additions & 2 deletions plutus-metatheory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ $ cabal test plutus-metatheory
To build the documentation as a static site:

```
$ agda --html --html-highlight=auto --html-dir html src/index.lagda.md
$ jekyll -s html -d site
$ agda --html --html-highlight=auto --html-dir=html src/index.lagda.md
$ jekyll build -s html -d html/_site
```

## Features:
Expand Down
14 changes: 14 additions & 0 deletions plutus-metatheory/html/_layouts/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ page.title }}</title>
<link rel="stylesheet" href="./Agda.css">
</head>
<body>
<h1>{{ page.title }}</h1>
<section>
{{ content }}
</section>
</body>
</html>

0 comments on commit f545b46

Please sign in to comment.