summaryrefslogtreecommitdiffstats
path: root/Justfile
diff options
context:
space:
mode:
authorBenjamin Sago <ogham@bsago.me>2020-10-13 20:19:00 +0100
committerBenjamin Sago <ogham@bsago.me>2020-10-13 20:19:00 +0100
commit6eb5cee634b252687048c067be1e2126cd65de48 (patch)
tree2288380017ce8cc6572ec039793bd84504d252a8 /Justfile
parent002080cde8d2f727c5b1e12aff91c268922f59eb (diff)
Convert manual pages to Markdown
This removes the "raw" man pages and converts them to Markdown, adding a build step using pandoc that converts them. Having the man pages in Markdown makes them much, much easier to write and keep updated, at the cost of not having the raw formats easily available. Hopefully having the command to generate them in the Justfile will be enough. It also splits out the EXA_COLORS environment variable into its own page, because it took up just under half of the one for the exa binary.
Diffstat (limited to 'Justfile')
-rw-r--r--Justfile15
1 files changed, 15 insertions, 0 deletions
diff --git a/Justfile b/Justfile
index 63c631b..f7e5cc9 100644
--- a/Justfile
+++ b/Justfile
@@ -42,3 +42,18 @@ all-release: build-release test-release
@versions:
rustc --version
cargo --version
+
+
+# builds the man pages
+@man:
+ mkdir -p "${CARGO_TARGET_DIR:-target}/man"
+ pandoc --standalone -f markdown -t man man/exa.1.md > "${CARGO_TARGET_DIR:-target}/man/exa.1"
+ pandoc --standalone -f markdown -t man man/exa_colors.5.md > "${CARGO_TARGET_DIR:-target}/man/exa_colors.5"
+
+# builds and previews the main man page (exa.1)
+@man-1-preview: man
+ man "${CARGO_TARGET_DIR:-target}/man/exa.1"
+
+# builds and previews the colour configuration man page (exa_colors.5)
+@man-5-preview: man
+ man "${CARGO_TARGET_DIR:-target}/man/exa_colors.5"