File tree 8 files changed +92
-31
lines changed
8 files changed +92
-31
lines changed Original file line number Diff line number Diff line change @@ -32,23 +32,12 @@ jobs:
32
32
build :
33
33
runs-on : ubuntu-latest
34
34
env :
35
- MDBOOK_VERSION : 0.4.30
35
+ MDBOOK_VERSION : 0.4.45
36
+ MDBOOK_ADMONISH_VERSION : 1.19.0 # need to re-run mdbook-admonish install if updating version
36
37
steps :
37
38
- uses : actions/checkout@v4
38
- - name : Install mdBook and mdbook-cmdrun
39
- run : |
40
- curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
41
- rustup update
42
- cargo install --version ${MDBOOK_VERSION} mdbook --locked
43
- cargo install --git https://github.com/tomeichlersmith/mdbook-cmdrun --branch 18-check-exit-status mdbook-cmdrun --locked
44
- - name : Install aha
45
- run : sudo apt install aha
46
- - name : Check Necessities
47
- run : |
48
- aha --version
49
- ul --version
50
- man --version
51
- mdbook --version
39
+ - name : Install mdBook
40
+ run : ./ci/install-mdbook
52
41
- name : Setup Pages
53
42
id : pages
54
43
uses : actions/configure-pages@v5
57
46
working-directory : docs
58
47
- name : Copy install script to website
59
48
run : cp install uninstall ./docs/book/
49
+ - name : Check Links
50
+ id : lychee
51
+ uses : lycheeverse/lychee-action@v2
52
+ with :
53
+ fail : true
54
+ args : ./docs/book
60
55
- name : Upload artifact
61
56
uses : actions/upload-pages-artifact@v3
62
57
with :
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # build the docs website
3
+ # DEPENDENCIES
4
+ # mdbook
5
+ # man
6
+ # ul
7
+ # aha
8
+
9
+ set -o nounset
10
+ set -o errexit
11
+
12
+ # convert a man page into a corresponding html page
13
+ #
14
+ # We use the '.md' suffix rather than '.html' so that mdbook still
15
+ # processes the html into its own style with the side bar and header.
16
+ mkdir -p docs/src/manual
17
+ for man_page in man/man1/* ; do
18
+ page_name=" $( basename " ${man_page} " ) "
19
+ output_file=" docs/src/manual/${page_name} .md"
20
+ echo " <pre>" > " ${output_file} "
21
+ MAN_KEEP_FORMATTING=1 COLUMNS=80 man " ${man_page} " | ul | aha --no-header >> " ${output_file} "
22
+ echo " </pre>" >> " ${output_file} "
23
+ done
24
+
25
+ cd docs
26
+ mdbook build
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -o errexit
4
+ set -o nounset
5
+
6
+ # Assume the environment variables MDBOOK_VERSION and MDBOOK_ADMONISH_VERSION are set
7
+
8
+ # Download a tar ball and then unpack it into a destination
9
+ # Arguments
10
+ # 1 - URL for the .tar.gz to download
11
+ # 2 - target directory to unpack into
12
+ download () {
13
+ wget -q -O - " ${1} " | tar -xz --directory " ${2} "
14
+ }
15
+
16
+ help () {
17
+ cat << \HELP
18
+
19
+ USAGE:
20
+ ./.github/install-mdbook [target]
21
+
22
+ ARGUMENTS:
23
+ target : directory to download mdbook and mdbook-admonish into
24
+
25
+ ENVIRONMENT:
26
+ We assume that MDBOOK_VERSION and MDBOOK_ADMONISH_VERSION are set
27
+ to the desired versions like how it is done in the CI workflow.
28
+
29
+ HELP
30
+ }
31
+
32
+ target=" ${HOME} /.local/bin"
33
+ while [ " ${# } " -gt 0 ]; do
34
+ case " ${1} " in
35
+ -h|--help)
36
+ help
37
+ exit 0
38
+ ;;
39
+ * )
40
+ target=" ${1} "
41
+ ;;
42
+ esac
43
+ shift
44
+ done
45
+
46
+ mkdir -p " ${target} "
47
+ download \
48
+ https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION} /mdbook-v${MDBOOK_VERSION} -x86_64-unknown-linux-gnu.tar.gz \
49
+ " ${target} "
50
+ download \
51
+ https://github.com/tommilligan/mdbook-admonish/releases/download/v${MDBOOK_ADMONISH_VERSION} /mdbook-admonish-v${MDBOOK_ADMONISH_VERSION} -x86_64-unknown-linux-gnu.tar.gz \
52
+ " ${target} "
Original file line number Diff line number Diff line change 8
8
- [ Sidebar on Operating Systems] ( ./os-sidebar.md )
9
9
- [ Tuning the denv] ( ./tune.md )
10
10
- [ Command Reference Manual] ( ./manual.md )
11
- - [ denv] ( ./manual/denv.md )
12
- - [ denv-init] ( ./manual/denv-init.md )
13
- - [ denv-config] ( ./manual/denv-config.md )
14
- - [ denv-check] ( ./manual/denv-check.md )
11
+ - [ denv] ( ./manual/denv.1. md )
12
+ - [ denv-init] ( ./manual/denv-init.1. md )
13
+ - [ denv-config] ( ./manual/denv-config.1. md )
14
+ - [ denv-check] ( ./manual/denv-check.1. md )
15
15
- [ Developing the Environment] ( ./env_dev.md )
16
16
17
17
# Contributing
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments