diff --git a/.gitignore b/.gitignore index 474022f..95757f2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,4 @@ css/code.css pgvv/ all_chars.txt **/fonts/**/*-Subset.* -woff2/ -**/serve_* +woff2/ \ No newline at end of file diff --git a/acl.cool/site/assets/EasySalsa.pdf.draft b/acl.cool/site/assets/EasySalsa.pdf.draft deleted file mode 100644 index 060b56d..0000000 Binary files a/acl.cool/site/assets/EasySalsa.pdf.draft and /dev/null differ diff --git a/build.sh b/build.sh index b637f49..675d5f4 100755 --- a/build.sh +++ b/build.sh @@ -1,14 +1,8 @@ -#! /usr/bin/env nix-shell -#! nix-shell -i bash --pure -#! nix-shell -p bash harfbuzz soupault woff2 jotdown python3 --pure +#!/bin/bash -if ! [[ -d pgvv/ ]]; then - python3 -m venv pgvv - source ./pgvv/bin/activate - python3 -m pip install --upgrade pip - pip install --upgrade pygments - deactivate -fi +./deps.sh || exit $? + +find acl.cool/serve/ ytheleus.org/serve/ -type f -mmin +11 -delete function soup_config { rm soupault.toml @@ -22,7 +16,7 @@ find acl.cool/site/ ytheleus.org/site/ -type f \( -name '*.dj' -o -name '*.html' cat common_chars.txt >>all_chars.txt for font in fonts/JuliaMono/*{-Light,-Regular,-SemiBold}{,Italic}.woff2; do - woff2_decompress "$font" + ./woff2/woff2_decompress "$font" ttf_font="${font%.woff2}.ttf" subset_ttf="${ttf_font%.ttf}-Subset.ttf" @@ -32,7 +26,7 @@ for font in fonts/JuliaMono/*{-Light,-Regular,-SemiBold}{,Italic}.woff2; do --layout-features='*' \ --passthrough-tables - woff2_compress "$subset_ttf" + ./woff2/woff2_compress "$subset_ttf" rm "$subset_ttf" "$ttf_font" done @@ -47,7 +41,7 @@ for font in \ --layout-features='*' \ --passthrough-tables - woff2_compress "$subset_ttf" + ./woff2/woff2_compress "$subset_ttf" rm "$subset_ttf" done @@ -58,20 +52,10 @@ pygmentize -f html -S algol_nu | grep -v 'line-height' >css/code.css builtin pushd acl.cool soup_config soupault - -NEXT_DIR="serve_$(date +%s)" -cp -a serve "$NEXT_DIR" -ln -sfn "$NEXT_DIR" serve_ - popd builtin pushd ytheleus.org soup_config soupault - -NEXT_DIR="serve_$(date +%s)" -cp -a serve "$NEXT_DIR" -ln -sfn "$NEXT_DIR" serve_ - popd deactivate diff --git a/css/index.css b/css/index.css new file mode 100644 index 0000000..753f81a --- /dev/null +++ b/css/index.css @@ -0,0 +1,7 @@ +@import url(fonts.css); + +@import url(looks.css); + +@import url(layout.css); + +@import url(code.css); \ No newline at end of file diff --git a/deps.sh b/deps.sh new file mode 100755 index 0000000..8401ea6 --- /dev/null +++ b/deps.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +if ! [[ -d pgvv/ ]]; then + python3 -m venv pgvv + source ./pgvv/bin/activate + python3 -m pip install --upgrade pip + pip install --upgrade pygments + # pip install --upgrade fonttools + # pip install --upgrade brotli + deactivate +fi + +which hb-subset +if ! [[ $? == 0 ]]; then + echo 'please install hb-subset (provided by harfbuzz-devel on RedHat)' + exit 6 +fi + +which opam 2> /dev/null +if [[ $? == 0 ]]; then + opam install -y soupault +else + echo 'failed to install soupault with opam' >&2 + exit 2 +fi + +which cargo 2> /dev/null +if [[ $? == 0 ]]; then + cargo install jotdown +else + echo 'failed to install jotdown with cargo' + exit 3 +fi + +which git 2> /dev/null +if ! [[ $? == 0 ]]; then + echo 'you need git' + exit 4 +fi + +which cc 2> /dev/null +if ! [[ $? == 0 ]]; then + echo 'you need a C compiler' + exit 5 +fi + +if ! [[ -d woff2/ ]]; then + git clone https://github.com/mobotsar/woff2.git --recursive || exit 7 + builtin pushd woff2 + make clean all || exit 8 + popd +fi \ No newline at end of file diff --git a/shared_templates/main.html b/shared_templates/main.html index 8303b84..ac13523 100644 --- a/shared_templates/main.html +++ b/shared_templates/main.html @@ -4,10 +4,7 @@ <!-- set automatically, see soupault.conf --> - - - - +