-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-mkdocs
More file actions
executable file
·117 lines (106 loc) · 2.98 KB
/
setup-mkdocs
File metadata and controls
executable file
·117 lines (106 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/bin/bash
curdir=`pwd`
pybin=`which python`
py_bin_dir=$(dirname $pybin)
if [[ ! -f ${py_bin_dir}/activate ]]; then
source ${HOME}/.vpython/3/3.7.4/venv-3.7.4/bin/activate
fi
if [[ ! -f ${py_bin_dir}/activate ]]; then
echo "Tried virtualenv: ${HOME}/.vpython/3/3.7.4/venv-3.7.4"
echo "Could not use a predefined python virtual environment ..."
exit 1
fi
if [[ ! -f ${py_bin_dir}/mkdocs ]]; then
echo "This is not a python virtual environment which has mkdocs installed ..."
exit 1
fi
mkdir -p ${HOME}/works/docs
cd ${HOME}/works/docs
if [ ! -e ${HOME}/works/docs/mkdocs.yml ];then
echo "Initializing ..."
cd ${curdir}
mkdocs init .
echo "Updating file ${curdir}/mkdocs.yml ..."
cat > ${curdir}/mkdocs.yml <<EOL
site_name: Project Documents
theme:
name: 'material'
palette:
primary: 'indigo'
accent: 'indigo'
logo:
icon: 'cloud'
markdown_extensions:
- markdown.extensions.toc:
slugify: !!python/name:pymdownx.slugs.uslugify
permalink: "\ue157"
- markdown.extensions.admonition:
- markdown.extensions.smarty:
smart_quotes: false
- pymdownx.betterem:
- markdown.extensions.attr_list:
- markdown.extensions.def_list:
- markdown.extensions.tables:
- markdown.extensions.abbr:
- markdown.extensions.footnotes:
- pymdownx.extrarawhtml:
- pymdownx.superfences:
preserve_tabs: true
custom_fences:
- name: flow
class: uml-flowchart
format: !!python/name:pymdownx.superfences.fence_code_format
- name: sequence
class: uml-sequence-diagram
format: !!python/name:pymdownx.superfences.fence_code_format
- name: math
class: arithmatex
format: !!python/name:pymdownx.arithmatex.fence_mathjax_format
- pymdownx.highlight:
css_class: codehilite
extend_pygments_lang:
- name: php-inline
lang: php
options:
startinline: true
- name: pycon3
lang: pycon
options:
python3: true
linenums_style: pymdownx-inline
- pymdownx.inlinehilite:
custom_inline:
- name: math
class: arithmatex
format: !!python/name:pymdownx.arithmatex.inline_mathjax_format
- pymdownx.magiclink:
repo_url_shortener: true
repo_url_shorthand: true
social_url_shorthand: true
user: facelessuser
repo: pymdown-extensions
- pymdownx.tilde:
- pymdownx.caret:
- pymdownx.smartsymbols:
- pymdownx.emoji:
emoji_index: !!python/name:pymdownx.emoji.twemoji
emoji_generator: !!python/name:pymdownx.emoji.to_svg
- pymdownx.escapeall:
hardbreak: True
nbsp: True
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.progressbar:
- pymdownx.arithmatex:
- pymdownx.mark:
- pymdownx.striphtml:
- pymdownx.snippets:
base_path: docs/src/markdown/_snippets
- pymdownx.keys:
separator: "\uff0b"
- pymdownx.details:
EOL
fi
echo "Serving mkdocs from current directory ..."
mkdocs serve
cd ${curdir}