forked from openwallet-foundation/acapy-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setupDocs.sh
executable file
·120 lines (114 loc) · 2.97 KB
/
setupDocs.sh
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
118
119
120
#! /bin/bash
MKDOCS=mkdocs.yml
# Clean up when not testing the docs
if [ "$1" == "clean" ]; then
rm ${MKDOCS}
rm -rf docs/f
exit 0
fi
# Generate everything that is needed for publishing the docs
mkdir -p docs
cp *.md docs
cp LICENSE docs/LICENSE.md
# Generate the main part of the mkdocs.yml file
cat <<-EOF >${MKDOCS}
site_name: ACA-Py Plugins
repo_name: openwallet-foundation/acapy-plugins
repo_url: https://github.com/openwallet-foundation/acapy-plugins
theme:
name: material
logo: https://raw.githubusercontent.com/hyperledger/aries-acapy-docs/main/assets/Hyperledger_Aries_Logo_White.png
favicon: https://raw.githubusercontent.com/hyperledger/aries-cloudagent-python/main/docs/assets/aries-favicon.png
icon:
repo: fontawesome/brands/github
palette:
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode
features:
- content.code.copy
- navigation.expand
- navigation.footer
- navigation.instant
- navigation.tabs
- navigation.tabs.sticky
- navigation.top
- navigation.tracking
- toc.follow
# - toc.integrate
markdown_extensions:
- abbr
- admonition
- attr_list
- def_list
- footnotes
- md_in_html
- toc:
permalink: true
toc_depth: 3
- pymdownx.arithmatex:
generic: true
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.details
- pymdownx.emoji:
emoji_generator: !!python/name:material.extensions.emoji.to_svg
emoji_index: !!python/name:material.extensions.emoji.twemoji
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.keys
- pymdownx.magiclink:
repo_url_shorthand: true
user: squidfunk
repo: mkdocs-material
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.tabbed:
alternate_style: true
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
plugins:
- search
- mike
extra:
version:
provider: mike
nav:
- Welcome!:
- ACA-Py Plugins: README.md
- Plugin Release Status: RELEASES.md
- Plugins:
EOF
# Generate the per-plugin navigation entries
for d in */ ; do
if [ ${d} != "docs/" ] && [ ${d} != "plugin_globals/" ]; then
echo " - " $(head -1 ${d}README.md | sed "s/^[# ]*//") ":" ${d}README.md >>${MKDOCS}
mkdir -p docs/${d}
cp ${d}README.md docs/${d}
fi
done
# Generate the contributing navigation entries
cat <<-EOF >>${MKDOCS}
- Contributing:
- How to Contribute: CONTRIBUTING.md
- Maintainers: MAINTAINERS.md
- Managing the Plugin Docs Site: DOCSITE.md
- License: LICENSE.md
EOF