From 5e8080a223d8414814032c7e3fde4e9547eacbc0 Mon Sep 17 00:00:00 2001 From: defanor Date: Sat, 3 Feb 2024 13:35:25 +0300 Subject: Treat .xsl files as sources, mirror to thunix Whenever the XSLTs change, the affected pages should be regenerated. --- tools/Makefile | 16 ++++++++-------- tools/publish.sh | 6 ++---- tools/xml-to-html.xsl | 19 +++++++++++++++---- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 0ea8525..c69df0a 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -2,23 +2,23 @@ all: $(patsubst src/%,%,$(wildcard src/notes/*.xhtml src/*.xhtml)) \ notes/atom.xml # Index page -index.xhtml: src/index.xhtml build/notes-by-modification-date.xml +index.xhtml: src/index.xhtml build/notes-by-modification-date.xml tools/xml-to-html.xsl xsltproc -o $@ tools/xml-to-html.xsl $< # Note index page -notes/index.xhtml: src/notes/index.xhtml build/notes-by-publication-date.xml +notes/index.xhtml: src/notes/index.xhtml build/notes-by-publication-date.xml tools/xml-to-html.xsl xsltproc -o $@ tools/xml-to-html.xsl $< # Notes -notes/%.xhtml: src/notes/%.xhtml +notes/%.xhtml: src/notes/%.xhtml tools/xml-to-html.xsl xsltproc -o $@ tools/xml-to-html.xsl $< # Other static pages -%.xhtml: src/%.xhtml +%.xhtml: src/%.xhtml tools/xml-to-html.xsl xsltproc -o $@ tools/xml-to-html.xsl $< # A single-file dump of all notes -build/notes-dump.xml: src/notes/*.xhtml +build/notes-dump.xml: src/notes/*.xhtml tools/xml-notes-dump.xsl (echo '' && \ echo '' && \ find src/notes -name '*.xhtml' | \ @@ -28,16 +28,16 @@ build/notes-dump.xml: src/notes/*.xhtml xsltproc -o $@ tools/xml-notes-dump.xsl - # Notes sorted by publication date -build/notes-by-publication-date.xml: build/notes-dump.xml +build/notes-by-publication-date.xml: build/notes-dump.xml tools/xml-notes-sort.xsl xsltproc -o $@ tools/xml-notes-sort.xsl build/notes-dump.xml # Notes sorted by modification date -build/notes-by-modification-date.xml: build/notes-dump.xml +build/notes-by-modification-date.xml: build/notes-dump.xml tools/xml-notes-sort.xsl xsltproc -o $@ --stringparam sortBy modified \ tools/xml-notes-sort.xsl build/notes-dump.xml # An Atom feed -notes/atom.xml: build/notes-by-modification-date.xml +notes/atom.xml: build/notes-by-modification-date.xml tools/xml-notes-limit.xsl tools/xml-notes-to-atom.xsl xsltproc --param number 10 tools/xml-notes-limit.xsl \ build/notes-by-modification-date.xml | \ xsltproc -o $@ tools/xml-notes-to-atom.xsl - diff --git a/tools/publish.sh b/tools/publish.sh index 987cf00..aa01628 100755 --- a/tools/publish.sh +++ b/tools/publish.sh @@ -2,7 +2,5 @@ make -f tools/Makefile -# upload -rsync --exclude '.*' --exclude '*.org' --exclude 'src/' \ - --exclude 'tools/' --exclude 'build/' \ - -avz . tart.uberspace.net:public_html/ +rsync -avz *.xhtml notes pictures files uberspace.net:public_html/ +rsync -avz *.xhtml notes pictures files thunix.net:public_html/ diff --git a/tools/xml-to-html.xsl b/tools/xml-to-html.xsl index ef950b2..5785c7e 100644 --- a/tools/xml-to-html.xsl +++ b/tools/xml-to-html.xsl @@ -68,10 +68,14 @@ + + @@ -79,10 +83,17 @@ -- cgit v1.2.3