From 4e036ed653e4f5ae35b172afc23860c425ea1a0d Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Fri, 13 Oct 2023 18:03:08 +0900 Subject: Use XSLT for gemtext --- Makefile | 10 ++++---- README.md | 2 +- gmi.xslt | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ shell.nix | 2 +- 4 files changed, 95 insertions(+), 7 deletions(-) create mode 100644 gmi.xslt diff --git a/Makefile b/Makefile index d865ae7..ae906eb 100644 --- a/Makefile +++ b/Makefile @@ -9,15 +9,15 @@ all: gemini www %/: mkdir $@ -gemini/%.gmi: %.md - md2gemini --links=paragraph < $< > $@ +gemini/%.gmi: www/%.xhtml gemini/ + xsltproc gmi.xslt $< > $@ -gemini: gemini/ $(GMI) +gemini: $(GMI) -www/%.xhtml: %.md +www/%.xhtml: %.md www/ makepage < $< | xsltproc xhtml.xslt - > $@ -www: www/ $(XHTML) +www: $(XHTML) clean: rm -f $(GMI) $(XHTML) diff --git a/README.md b/README.md index a7faf30..19a4288 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ data input by users are stored in as-is; is strongly recommended admins neither parse nor read user data, -but they have no power regarding physical access +but they are not the one with physical access ## joining diff --git a/gmi.xslt b/gmi.xslt new file mode 100644 index 0000000..d52fab1 --- /dev/null +++ b/gmi.xslt @@ -0,0 +1,88 @@ + + + + https://loang.net + + + + + + + => + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # + + + + + ## + + + + + ### + + + + + + + + + + + + * + + + + + + + + + + + + + diff --git a/shell.nix b/shell.nix index bbadc58..715cd8c 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,4 @@ with import {}; mkShell { - nativeBuildInputs = [ discount libxslt md2gemini ]; + nativeBuildInputs = [ discount libxslt ]; } -- cgit 1.4.1