From 7bfc9f9b4013656a9b413b8b940be7c189ec1b7b Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 12 Jun 2025 16:55:13 +0300 Subject: [PATCH 1/4] Configure build rules for Quarkdown --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6c10dd6..c46b94d 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ MAGICK ?= magick NPM ?= npm NPX ?= npx PAGEDJS ?= $(NPX) pagedjs-cli +QUARKDOWN ?= quarkdown SATYSFI ?= satysfi SED ?= sed SILE ?= sile @@ -34,8 +35,12 @@ ZOLA ?= zola BASE_URL = / GROFF_ARGS = -T pdf $< > $@ + +QUARKDOWN_ARGS = c --pdf --out . $< + PAGEDJS_ARGS = -i $< -o $@ +QUARKDOWN_ARGS = c --pdf --out $(@D) $< SATYSFI_ARGS = $< -o $@ SILE_ARGS = -o $@ $< @@ -66,7 +71,7 @@ define make_manifest ?= demosrc = "$(notdir $(basename $@)$(suffix $<))" demoout = "$(notdir $@)" preview = "$(notdir $(basename $@)).avif" - cmd = "$(subst $(NPX) ,,$(subst $<,$(notdir $(basename $@)$(suffix $<)),$(subst $@,$(notdir $@),$1)))" + cmd = "$(subst --out $(@D),,$(subst $(NPX) ,,$(subst $<,$(notdir $(basename $@)$(suffix $<)),$(subst $@,$(notdir $@),$1))))" EOF exec $1 endef @@ -121,6 +126,10 @@ fonts: .fonts/EgyptianOpenType.ttf local args="$(call get_typesetter_args,content/$(notdir $(basename $*)).md,$(notdir $(basename $<)))" $(call make_manifest,$(PAGEDJS) $(TYPESETTER_ARGS) $(PAGEDJS_ARGS)) +%-quarkdown.pdf %-quarkdown.toml: %/quarkdown.qd + local args="$(call get_typesetter_args,content/$(notdir $(basename $@)).md,$(notdir $(basename $<)))" + $(call make_manifest,$(QUARKDOWN) $(TYPESETTER_ARGS) $(QUARKDOWN_ARGS)) + %-satysfi.pdf %-saty.toml: %/satysfi.saty $(call make_manifest,$(SATYSFI) $(SATYSFI_ARGS)) From cb262221cf3034512cc92ad65f2412bc91741bae Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Tue, 24 Jun 2025 22:20:15 +0300 Subject: [PATCH 2/4] Link to Quarkdown from sidebar --- templates/menu.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/menu.html b/templates/menu.html index e72f3fe..0c5ce25 100644 --- a/templates/menu.html +++ b/templates/menu.html @@ -54,6 +54,9 @@
  • Patoline
  • +
  • + Quarkdown +
  • SATySFi
  • From e191ca39d9bf8e498a8dfb70e2cb9eb1e2c33371 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 12 Jun 2025 16:51:49 +0300 Subject: [PATCH 3/4] Add hello-world example using Quarkdown Co-authored-by: Giorgio Garofalo --- content/hello-world.md | 2 +- data/hello-world/quarkdown.qd | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 data/hello-world/quarkdown.qd diff --git a/content/hello-world.md b/content/hello-world.md index 2e6921f..cb29b62 100644 --- a/content/hello-world.md +++ b/content/hello-world.md @@ -1,7 +1,7 @@ +++ title = "Hello World!" description = "Your most basic greeting." -extra.typesetters = [ "sile", "typst", "xelatex", "groff", "satysfi", "pagedjs", "weasyprint" ] +extra.typesetters = [ "sile", "typst", "xelatex", "groff", "satysfi", "pagedjs", "weasyprint", "quarkdown" ] +++ Just the simplest way to get a phrase onto a numbered page. diff --git a/data/hello-world/quarkdown.qd b/data/hello-world/quarkdown.qd new file mode 100644 index 0000000..fde22e7 --- /dev/null +++ b/data/hello-world/quarkdown.qd @@ -0,0 +1,7 @@ +.docname {hello-world-quarkdown} +.doctype {paged} + +.pagemargin {bottomcenter} + .currentpage + +Hello World From efa143fc512b928ab35dad827c594615e9a483be Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 12 Jun 2025 17:00:03 +0300 Subject: [PATCH 4/4] Bring in Quarkdown via flake --- flake.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flake.nix b/flake.nix index 597ce21..e29d8e6 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,7 @@ url = "github:edolstra/flake-compat"; flake = false; }; + quarkdown.url = "github:iamgio/quarkdown"; teracli.url = "github:chevdor/tera-cli"; }; @@ -22,6 +23,7 @@ flake-utils, flake-compat, gitignore, + quarkdown, teracli, }: flake-utils.lib.eachDefaultSystem ( @@ -62,6 +64,7 @@ luajitPackages.luarocks mold nodejs + quarkdown.defaultPackage.${system} rustc satysfi sile