File tree Expand file tree Collapse file tree 6 files changed +129
-3
lines changed Expand file tree Collapse file tree 6 files changed +129
-3
lines changed Original file line number Diff line number Diff line change
1
+ docs /build /
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [ -z " $1 " ]
4
+ then
5
+ DEST_DIR=' build'
6
+ else
7
+ DEST_DIR=" $1 "
8
+ fi
9
+
10
+ set -euo pipefail
11
+
12
+ function log() {
13
+ msg=" $1 "
14
+ echo ' '
15
+ echo " ### ${msg} ###"
16
+ echo ' '
17
+ }
18
+
19
+ cd " $( dirname " $0 " ) "
20
+
21
+ SRC_DIR=" $( pwd) "
22
+
23
+ TS=" $( date +%s) "
24
+ TMP_DIR=" /tmp/${TS} "
25
+ mkdir -p " ${TMP_DIR} "
26
+
27
+ VENV_BIN=' /tmp/.ag-docs-venv/bin/activate'
28
+ if [ -f " $VENV_BIN " ]
29
+ then
30
+ source " $VENV_BIN "
31
+ fi
32
+
33
+ log ' BUILDING DOCS'
34
+ export PYTHONWARNINGS=' ignore'
35
+ sphinx-build -b html source/ " ${TMP_DIR} /" > /dev/null
36
+
37
+ log ' PATCHING METADATA'
38
+ cp " ${SRC_DIR} /meta/" * " ${TMP_DIR} /"
39
+
40
+ HTML_META_SRC=" <meta charset=\" utf-8\" />"
41
+ HTML_META=" ${HTML_META_SRC} <meta http-equiv=\" Content-Security-Policy\" content=\" default-src 'self'; img-src 'self' https://files.oxl.at; style-src 'self' https://files.oxl.at 'unsafe-inline'; script-src 'self' https://files.oxl.at 'unsafe-inline' 'unsafe-eval'; connect-src 'self';\" >"
42
+ HTML_META=" ${HTML_META} <link rel=\" icon\" type=\" image/webp\" href=\" https://files.oxl.at/img/oxl3_sm.webp\" >"
43
+ HTML_META_EN=" ${HTML_META} " # <link rel=\"alternate\" href=\"https://docs.o-x-l.at\" hreflang=\"de\">
44
+ # HTML_LOGO_LINK_SRC='href=".*Go to homepage"'
45
+ # HTML_LOGO_LINK_EN='href="https://www.o-x-l.com" class="oxl-nav-logo" title="OXL IT Services Website"'
46
+ HTML_TITLE_BAD_EN=' Ansible Collection - Systemd documentation'
47
+ HTML_TITLE_OK=' Systemd Ansible Collection'
48
+ HTML_LANG_NONE=' <html'
49
+ HTML_LANG_EN=' html lang="en"'
50
+
51
+ cd " ${TMP_DIR} /"
52
+
53
+ sed -i " s|$HTML_META_SRC |$HTML_META_EN |g" * .html
54
+ sed -i " s|$HTML_META_SRC |$HTML_META_EN |g" * /* .html
55
+ # sed -i "s|$HTML_LOGO_LINK_SRC|$HTML_LOGO_LINK_EN|g" *.html
56
+ # sed -i "s|$HTML_LOGO_LINK_SRC|$HTML_LOGO_LINK_EN|g" */*.html
57
+ sed -i " s|$HTML_LANG_NONE |<$HTML_LANG_EN |g" * .html
58
+ sed -i " s|$HTML_LANG_NONE |<$HTML_LANG_EN |g" * /* .html
59
+ sed -i " s|$HTML_TITLE_BAD_EN |$HTML_TITLE_OK |g" * .html
60
+ sed -i " s|$HTML_TITLE_BAD_EN |$HTML_TITLE_OK |g" * /* .html
61
+
62
+ log ' ACTIVATING'
63
+ cd " $SRC_DIR "
64
+ if [ -d " $DEST_DIR " ]
65
+ then
66
+ rm -r " $DEST_DIR "
67
+ fi
68
+ mkdir -p " ${DEST_DIR} /"
69
+
70
+ mv " ${TMP_DIR} /" * " ${DEST_DIR} /"
71
+
72
+ touch " ${DEST_DIR} /${TS} "
73
+
74
+ rm -rf " $TMP_DIR "
75
+
76
+ log ' FINISHED'
Original file line number Diff line number Diff line change
1
+ User-agent: anthropic-ai
2
+ Disallow: /
3
+
4
+ User-agent: Claude-Web
5
+ Disallow: /
6
+
7
+ User-agent: ClaudeBot
8
+ Disallow: /
9
+
10
+ User-agent: PerplexityBot
11
+ Disallow: /
12
+
13
+ User-agent: CCBot
14
+ Disallow: /
15
+
16
+ User-agent: Google-Extended
17
+ Disallow: /
18
+
19
+ User-agent: GPTBot
20
+ Disallow: /
21
+
22
+ User-agent: ChatGPT-User
23
+ Disallow: /
24
+
25
+ User-agent: *
26
+ Disallow:
27
+ Sitemap: sitemap .xml
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <urlset xmlns =" http://www.sitemaps.org/schemas/sitemap/0.9" >
3
+ <url ><loc >https://systemd.ansibleguy.net/en/latest/</loc ></url >
4
+
5
+ <url ><loc >https://systemd.ansibleguy.net/en/latest/usage/install.html</loc ></url >
6
+
7
+ <url ><loc >https://systemd.ansibleguy.net/en/latest/modules/journal.html</loc ></url >
8
+ </urlset >
Original file line number Diff line number Diff line change 10
10
exclude_patterns = []
11
11
html_theme = 'piccolo_theme'
12
12
html_static_path = ['_static' ]
13
- html_logo = 'https://brand.systemd.io/assets/svg/systemd-dark .svg'
13
+ html_logo = 'https://files.oxl.at/logos/systemd_dark .svg'
14
14
html_favicon = '_static/img/favicon.png'
15
- html_css_files = ['css/main.css' ]
15
+ html_js_files = ['https://files.oxl.at/js/feedback.js' ]
16
+ html_css_files = ['css/main.css' , 'https://files.oxl.at/css/feedback.css' ]
16
17
master_doc = 'index'
17
18
display_version = True
18
19
sticky_navigation = True
21
22
}
22
23
html_theme_options = {
23
24
'banner_text' : '<a href="https://github.com/ansibleguy/collection_systemd">Repository on GitHub</a> | '
24
- '<a href="https://github.com/ansibleguy/collection_systemd/issues/new/choose">Report errors</a>'
25
+ '<a href="https://github.com/ansibleguy/collection_systemd/issues/new/choose">Report Errors</a> | '
26
+ '<a href="https://www.o-x-l.com">Get Support</a>'
25
27
}
26
28
html_short_title = 'Ansible Systemd'
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -euo pipefail
4
+
5
+ cd " $( dirname " $0 " ) "
6
+
7
+ VENV_PATH=' /tmp/.ag-docs-venv'
8
+
9
+ python3 -m virtualenv " $VENV_PATH "
10
+ source " ${VENV_PATH} /bin/activate"
11
+
12
+ pip install -r requirements.txt > /dev/null
You can’t perform that action at this time.
0 commit comments