Skip to content

Commit 6eb5cee

Browse files
committed
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.
1 parent 002080c commit 6eb5cee

File tree

7 files changed

+541
-501
lines changed

7 files changed

+541
-501
lines changed

Justfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,18 @@ all-release: build-release test-release
4242
@versions:
4343
rustc --version
4444
cargo --version
45+
46+
47+
# builds the man pages
48+
@man:
49+
mkdir -p "${CARGO_TARGET_DIR:-target}/man"
50+
pandoc --standalone -f markdown -t man man/exa.1.md > "${CARGO_TARGET_DIR:-target}/man/exa.1"
51+
pandoc --standalone -f markdown -t man man/exa_colors.5.md > "${CARGO_TARGET_DIR:-target}/man/exa_colors.5"
52+
53+
# builds and previews the main man page (exa.1)
54+
@man-1-preview: man
55+
man "${CARGO_TARGET_DIR:-target}/man/exa.1"
56+
57+
# builds and previews the colour configuration man page (exa_colors.5)
58+
@man-5-preview: man
59+
man "${CARGO_TARGET_DIR:-target}/man/exa_colors.5"

0 commit comments

Comments
 (0)