File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ markdown_extensions:
6565 - admonition
6666 - pymdownx.snippets :
6767 check_paths : true
68+ base_path : !relative $config_dir
6869 - pymdownx.highlight :
6970 anchor_linenums : true
7071 line_spans : __span
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ usage () { echo " Usage: $0 -v version -p path-to-github-io-dir [-d] " 1>&2 ; exit 1; }
4+
5+ opt_version=" "
6+ opt_path_to_remote=" "
7+ opt_default=' false'
8+ script_dir=$( dirname -- " ${BASH_SOURCE[0]} " )
9+ path_to_mkdocs_config=" $( realpath -- " $script_dir " ; ) /../mkdocs.yml"
10+
11+ while getopts " :v:p:d" o; do
12+ case " ${o} " in
13+ v)
14+ opt_version=${OPTARG}
15+ ;;
16+ p)
17+ opt_path_to_remote=${OPTARG}
18+ ;;
19+ d)
20+ opt_default=' true'
21+ ;;
22+ * )
23+ usage
24+ ;;
25+ esac
26+ done
27+
28+ shift $(( OPTIND- 1 ))
29+
30+ if [[ -z " ${opt_version} " ]]
31+ then
32+ echo " Error: -v is required"
33+ usage
34+ fi
35+
36+ if [[ -z " ${opt_path_to_remote} " ]]
37+ then
38+ echo " Error: -p is required"
39+ usage
40+ fi
41+
42+ cd " $opt_path_to_remote "
43+
44+ if ${opt_default}
45+ then
46+ mike set-default -b main -F " $path_to_mkdocs_config " " $opt_version "
47+ exit 0
48+ fi
49+
50+ mike deploy -b main -F " $path_to_mkdocs_config " " $opt_version "
You can’t perform that action at this time.
0 commit comments