mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-15 01:48:34 -07:00
feat(adoc): create asciidoctor function
This commit is contained in:
parent
aa55e892e0
commit
6e474e8161
13
plugins/adoc/adoc.plugin.zsh
Normal file
13
plugins/adoc/adoc.plugin.zsh
Normal file
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user