From 6ff75104e28d00535392ebeaf66e2e50c57d0d64 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 10 Mar 2024 16:27:07 +0100 Subject: Added sample page to website --- docs/genstd.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 docs/genstd.sh (limited to 'docs/genstd.sh') diff --git a/docs/genstd.sh b/docs/genstd.sh new file mode 100755 index 0000000..e028da8 --- /dev/null +++ b/docs/genstd.sh @@ -0,0 +1,20 @@ +#!/bin/env bash + +set -e + +rm -rf std/ && mkdir -p std/ + +files=$(find ../std/ -type f -printf '%h\0%d\0%p\n' | sort -t '\0' -n | awk -F '\0' '{print $3}') +links="" + +for file in $files; do + name=$(echo "$file" | cut -c8-) + filename=$(sed s@/@_@g <<<"$name") + links="$links\n
  • :import $name
  • " + awk 'NR==FNR { gsub("<", "\\<", $0); gsub(">", "\\>", $0); a[n++]=$0; next } /CONTENT/ { for (i=0;i"std/$filename.html" + sed -i -e "s@NAME@$name@g" "std/$filename.html" +done + +sed -e "s@LINKS@$links@g" std.template >std/index.html + +cp res/* code.js content.css index.css code.css std/ -- cgit v1.2.3