-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
159 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ __pychache__.py | |
**/aw*.db.*bak* | ||
**/aw*.db-shm | ||
**/aw*.db-wal | ||
VERSION | ||
VERSION | ||
docs/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$1" ] | ||
then | ||
DEST_DIR='build' | ||
else | ||
DEST_DIR="$1" | ||
fi | ||
|
||
set -euo pipefail | ||
|
||
function log() { | ||
msg="$1" | ||
echo '' | ||
echo "### ${msg} ###" | ||
echo '' | ||
} | ||
|
||
cd "$(dirname "$0")" | ||
|
||
SRC_DIR="$(pwd)" | ||
|
||
TS="$(date +%s)" | ||
TMP_DIR="/tmp/${TS}" | ||
mkdir -p "${TMP_DIR}" | ||
|
||
VENV_BIN='/tmp/.ag-docs-venv/bin/activate' | ||
if [ -f "$VENV_BIN" ] | ||
then | ||
source "$VENV_BIN" | ||
fi | ||
|
||
log 'BUILDING DOCS' | ||
export PYTHONWARNINGS='ignore' | ||
sphinx-build -b html source/ "${TMP_DIR}/" >/dev/null | ||
|
||
log 'PATCHING METADATA' | ||
cp "${SRC_DIR}/meta/"* "${TMP_DIR}/" | ||
|
||
HTML_META_SRC="<meta charset=\"utf-8\" />" | ||
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';\">" | ||
HTML_META="${HTML_META}<link rel=\"icon\" type=\"image/webp\" href=\"https://files.oxl.at/img/oxl3_sm.webp\">" | ||
HTML_META_EN="${HTML_META}" # <link rel=\"alternate\" href=\"https://docs.o-x-l.at\" hreflang=\"de\"> | ||
# HTML_LOGO_LINK_SRC='href=".*Go to homepage"' | ||
# HTML_LOGO_LINK_EN='href="https://www.o-x-l.com" class="oxl-nav-logo" title="OXL IT Services Website"' | ||
HTML_TITLE_BAD_EN='AnsibleGuy WebUI documentation' | ||
HTML_TITLE_OK='Simple Ansible WebUI' | ||
HTML_LANG_NONE='<html' | ||
HTML_LANG_EN='html lang="en"' | ||
|
||
cd "${TMP_DIR}/" | ||
|
||
sed -i "s|$HTML_META_SRC|$HTML_META_EN|g" *.html | ||
sed -i "s|$HTML_META_SRC|$HTML_META_EN|g" */*.html | ||
# sed -i "s|$HTML_LOGO_LINK_SRC|$HTML_LOGO_LINK_EN|g" *.html | ||
# sed -i "s|$HTML_LOGO_LINK_SRC|$HTML_LOGO_LINK_EN|g" */*.html | ||
sed -i "s|$HTML_LANG_NONE|<$HTML_LANG_EN|g" *.html | ||
sed -i "s|$HTML_LANG_NONE|<$HTML_LANG_EN|g" */*.html | ||
sed -i "s|$HTML_TITLE_BAD_EN|$HTML_TITLE_OK|g" *.html | ||
sed -i "s|$HTML_TITLE_BAD_EN|$HTML_TITLE_OK|g" */*.html | ||
|
||
log 'ACTIVATING' | ||
cd "$SRC_DIR" | ||
if [ -d "$DEST_DIR" ] | ||
then | ||
rm -r "$DEST_DIR" | ||
fi | ||
mkdir -p "${DEST_DIR}/" | ||
|
||
mv "${TMP_DIR}/"* "${DEST_DIR}/" | ||
|
||
touch "${DEST_DIR}/${TS}" | ||
|
||
rm -rf "$TMP_DIR" | ||
|
||
log 'FINISHED' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
User-agent: anthropic-ai | ||
Disallow: / | ||
|
||
User-agent: Claude-Web | ||
Disallow: / | ||
|
||
User-agent: ClaudeBot | ||
Disallow: / | ||
|
||
User-agent: PerplexityBot | ||
Disallow: / | ||
|
||
User-agent: CCBot | ||
Disallow: / | ||
|
||
User-agent: Google-Extended | ||
Disallow: / | ||
|
||
User-agent: GPTBot | ||
Disallow: / | ||
|
||
User-agent: ChatGPT-User | ||
Disallow: / | ||
|
||
User-agent: * | ||
Disallow: | ||
Sitemap: sitemap.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/</loc></url> | ||
|
||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/1_intro.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/2_install.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/3_run.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/4_config.html</loc></url> | ||
|
||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/alerts.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/api.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/authentication.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/backup.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/credentials.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/development.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/docker.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/integrations.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/jobs.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/privileges.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/repositories.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/security.html</loc></url> | ||
<url><loc>https://webui.ansibleguy.net/en/latest/usage/troubleshooting.html</loc></url> | ||
</urlset> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.