From 6e474e816155ac849bf160d93555c2f8c2fc0fe2 Mon Sep 17 00:00:00 2001 From: "@" <@> Date: Thu, 14 Nov 2024 23:07:45 +0100 Subject: [PATCH] feat(adoc): create asciidoctor function --- plugins/adoc/adoc.plugin.zsh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plugins/adoc/adoc.plugin.zsh diff --git a/plugins/adoc/adoc.plugin.zsh b/plugins/adoc/adoc.plugin.zsh new file mode 100644 index 000000000..5d3ce1991 --- /dev/null +++ b/plugins/adoc/adoc.plugin.zsh @@ -0,0 +1,13 @@ +adoc() { + if [ -e "docs/index.html" ] && [ "docs/index.html" -nt "README.adoc" ] ; then + echo "adoc: 'docs/index.html' is up to date." + else + asciidoctor README.adoc -o docs/index.html \ + --require=asciidoctor-diagram \ + --attribute nofooter \ + --attribute toc=left \ + --attribute source-highlighter=highlight.js \ + --attribute sectnums \ + --attribute sectnumlevels=2 + fi +}