From e877dafc32e48bf01c68b992202222252358b1ce Mon Sep 17 00:00:00 2001 From: Suzanne Soy Date: Mon, 20 Nov 2023 18:09:19 +0000 Subject: [PATCH] Separate template for index page --- flake.nix | 14 +++++++------- template-index.html | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 template-index.html diff --git a/flake.nix b/flake.nix index 9d3fffb..1fa4144 100644 --- a/flake.nix +++ b/flake.nix @@ -17,18 +17,18 @@ template() { # usage: template TITLE CONTENTS_FILE PATH_TO_OUTPUT_WWW_ROOT RELATIVE_PATH_TO_OUTPUT_HTML - cat template.html \ - | sed -e "/markdown-title-placeholder/a $1" \ + cat "$1" \ + | sed -e "/markdown-title-placeholder/a $2" \ -e '/markdown-title-placeholder/d' \ - | sed -e "/markdown-content-placeholder/r $2" \ + | sed -e "/markdown-content-placeholder/r $3" \ -e '/markdown-content-placeholder/d' \ - | sed -e "s~placeholder-filepath~$4~g" \ - > "$3/$4" + | sed -e "s~placeholder-filepath~$5~g" \ + > "$4/$5" } for bounty in bounties/*.md; do name="$(basename "$bounty" .md)" - template "LIGO Bounty $name" <(pandoc -f markdown -t html "$bounty") "$out/www/" "$name.html" + template "template.html" "LIGO Bounty $name" <(pandoc -f markdown -t html "$bounty") "$out/www/" "$name.html" done index_html_links() { @@ -39,7 +39,7 @@ done printf '%s\n' "" } - template "LIGO Bounties" <(index_html_links) "$out/www/" "index.html" + template "template-index.html" "LIGO Bounties" <(index_html_links) "$out/www/" "index.html" cp style.css sha256.js micro_ipfs.js "$out/www/" cp www-ipfsignore "$out/www/.ipfsignore" diff --git a/template-index.html b/template-index.html new file mode 100644 index 0000000..966ba59 --- /dev/null +++ b/template-index.html @@ -0,0 +1,27 @@ + + + + + Bounty + + + + +

LIGO bounty program

+

The following tasks are open for third-party developers to claim. Please see the description of each task to learn about the process, the completion criteria and the associated payment or reward.

+
+ + + + + +