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)) 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 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 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