From 97847fa32e9d38339a52bbb33fa2b8cc8c993687 Mon Sep 17 00:00:00 2001 From: Rath Pascal Date: Sat, 7 Dec 2024 16:35:46 +0100 Subject: [PATCH] update docs-infra --- docs/html_infra.sh | 76 ++++++++++++++++++ docs/meta/robots.txt | 27 +++++++ docs/meta/sitemap.xml | 52 ++++++++++++ .../source/_static/img/savepoint_rollback.png | Bin 0 -> 3541 bytes docs/source/conf.py | 8 +- docs/source/modules/savepoint.rst | 2 +- docs/source/modules/unbound_dnsbl.rst | 6 +- docs/venv.sh | 12 +++ 8 files changed, 176 insertions(+), 7 deletions(-) create mode 100644 docs/html_infra.sh create mode 100644 docs/meta/robots.txt create mode 100644 docs/meta/sitemap.xml create mode 100644 docs/source/_static/img/savepoint_rollback.png create mode 100644 docs/venv.sh diff --git a/docs/html_infra.sh b/docs/html_infra.sh new file mode 100644 index 00000000..4db30391 --- /dev/null +++ b/docs/html_infra.sh @@ -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-opnsense-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="" +HTML_META="${HTML_META_SRC}" +HTML_META="${HTML_META}" +HTML_META_EN="${HTML_META}" # +# 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='Ansible Collection OPNSense documentation' +HTML_TITLE_OK='OPNSense Ansible Collection' +HTML_LANG_NONE=' + + https://opnsense.ansibleguy.net/en/latest/ + + https://opnsense.ansibleguy.net/en/latest/usage/1_install.html + https://opnsense.ansibleguy.net/en/latest/usage/2_basic.html + https://opnsense.ansibleguy.net/en/latest/usage/3_troubleshoot.html + https://opnsense.ansibleguy.net/en/latest/usage/4_develop.html + + https://opnsense.ansibleguy.net/en/latest/modules/1_basic.html + https://opnsense.ansibleguy.net/en/latest/modules/2_list.html + https://opnsense.ansibleguy.net/en/latest/modules/2_reload.html + + https://opnsense.ansibleguy.net/en/latest/modules/alias.html + https://opnsense.ansibleguy.net/en/latest/modules/alias_multi.html + https://opnsense.ansibleguy.net/en/latest/modules/bind.html + https://opnsense.ansibleguy.net/en/latest/modules/cron.html + https://opnsense.ansibleguy.net/en/latest/modules/dhcp.html + https://opnsense.ansibleguy.net/en/latest/modules/dhcrelay_relay.html + https://opnsense.ansibleguy.net/en/latest/modules/frr_bfd.html + https://opnsense.ansibleguy.net/en/latest/modules/frr_bgp.html + https://opnsense.ansibleguy.net/en/latest/modules/frr_diagnostic.html + https://opnsense.ansibleguy.net/en/latest/modules/frr_general.html + https://opnsense.ansibleguy.net/en/latest/modules/frr_ospf.html + https://opnsense.ansibleguy.net/en/latest/modules/frr_rip.html + https://opnsense.ansibleguy.net/en/latest/modules/ids.html + https://opnsense.ansibleguy.net/en/latest/modules/interface.html + https://opnsense.ansibleguy.net/en/latest/modules/ipsec.html + https://opnsense.ansibleguy.net/en/latest/modules/monit.html + https://opnsense.ansibleguy.net/en/latest/modules/nginx.html + https://opnsense.ansibleguy.net/en/latest/modules/openvpn.html + https://opnsense.ansibleguy.net/en/latest/modules/package.html + https://opnsense.ansibleguy.net/en/latest/modules/route.html + https://opnsense.ansibleguy.net/en/latest/modules/rule.html + https://opnsense.ansibleguy.net/en/latest/modules/rule_interface_group.html + https://opnsense.ansibleguy.net/en/latest/modules/rule_multi.html + https://opnsense.ansibleguy.net/en/latest/modules/savepoint.html + https://opnsense.ansibleguy.net/en/latest/modules/service.html + https://opnsense.ansibleguy.net/en/latest/modules/shaper.html + https://opnsense.ansibleguy.net/en/latest/modules/source_nat.html + https://opnsense.ansibleguy.net/en/latest/modules/syslog.html + https://opnsense.ansibleguy.net/en/latest/modules/system.html + https://opnsense.ansibleguy.net/en/latest/modules/unbound_acl.html + https://opnsense.ansibleguy.net/en/latest/modules/unbound_dnsbl.html + https://opnsense.ansibleguy.net/en/latest/modules/unbound_dot.html + https://opnsense.ansibleguy.net/en/latest/modules/unbound_forwarding.html + https://opnsense.ansibleguy.net/en/latest/modules/unbound_general.html + https://opnsense.ansibleguy.net/en/latest/modules/unbound_host.html + https://opnsense.ansibleguy.net/en/latest/modules/unbound_host_alias.html + https://opnsense.ansibleguy.net/en/latest/modules/webproxy.html + https://opnsense.ansibleguy.net/en/latest/modules/wireguard.html + \ No newline at end of file diff --git a/docs/source/_static/img/savepoint_rollback.png b/docs/source/_static/img/savepoint_rollback.png new file mode 100644 index 0000000000000000000000000000000000000000..ddee0a54184c3cd24d2ded1d87c10e62f5386e7e GIT binary patch literal 3541 zcmdT{X;f2L5`Lh#pb&eSrdbtfhq zSNGB(-+gALD@`E?GV|K+Nra$z?&$dJq6O$zbmzJ?$}jfv-2KDZV!2qHAbOv&;CGXZ zUj&B+aDrOgLN8oN*dBWaPS>iose87!$0Js@SqW~=%$quY$Y!O@?n{5crgb_DR{3N; zyEDx)Nsm4k5h$eGL`@s>JH_ZPLwE-=hM?9%kP!qO+nj-NzO`_NAot~_HV|a9)MOb1 zExTyE2!a;vF`5rS=ga;d)bq|bLD28Sh~U5yt{EdxShtvb@-Vu?+IJM1VpFlt%}80C zaY*rJldk0_Qoi$*-rla=hg|YOF4-j@&%buZUWvY+H5d_mbF{IeknZpOvDF5|3tII1 zHUXt|@RWXQ#v(Fqp0aClz4`nX8-eHhJP_3F7RFsZ!d>HwRnD-Xbx)^LLWikgk->o| zG4d<&iS>pR-yc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`~udgS|<8PV&0H(VdB>(^b literal 0 HcmV?d00001 diff --git a/docs/source/conf.py b/docs/source/conf.py index 78a28ff6..8440989a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -10,9 +10,10 @@ exclude_patterns = [] html_theme = 'piccolo_theme' html_static_path = ['_static'] -html_logo = 'https://opnsense.org/wp-content/themes/OPNsense/assets/img/opnsense.png' +html_logo = 'https://files.oxl.at/logos/opnsense.png' html_favicon = '_static/img/favicon.ico' -html_css_files = ['css/main.css'] +html_js_files = ['https://files.oxl.at/js/feedback.js'] +html_css_files = ['css/main.css', 'https://files.oxl.at/css/feedback.css'] master_doc = 'index' display_version = True sticky_navigation = True @@ -22,6 +23,7 @@ } html_theme_options = { 'banner_text': 'Repository on GitHub | ' - 'Report errors' + 'Report Errors | ' + 'Get Support' } html_short_title = 'Ansible OPNSense' diff --git a/docs/source/modules/savepoint.rst b/docs/source/modules/savepoint.rst index eff23944..a0f3aa47 100644 --- a/docs/source/modules/savepoint.rst +++ b/docs/source/modules/savepoint.rst @@ -2,7 +2,7 @@ .. include:: ../_include/head.rst -.. |rollback_process| image:: https://docs.opnsense.org/_images/blockdiag-43422f611798118832d099ed58decb1437fb76a0.png +.. |rollback_process| image:: ../../_static/img/savepoint_rollback.png ================== Firewall Savepoint diff --git a/docs/source/modules/unbound_dnsbl.rst b/docs/source/modules/unbound_dnsbl.rst index a75a931e..7908dba9 100644 --- a/docs/source/modules/unbound_dnsbl.rst +++ b/docs/source/modules/unbound_dnsbl.rst @@ -2,9 +2,9 @@ .. include:: ../_include/head.rst -====================== -Unbound DNS-Blocklists -====================== +========================== +DNS - Unbound - Blocklists +========================== **STATE**: unstable diff --git a/docs/venv.sh b/docs/venv.sh new file mode 100644 index 00000000..bf1240e3 --- /dev/null +++ b/docs/venv.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -euo pipefail + +cd "$(dirname "$0")" + +VENV_PATH='/tmp/.ag-opnsense-venv' + +python3 -m virtualenv "$VENV_PATH" +source "${VENV_PATH}/bin/activate" + +pip install -r requirements.txt >/dev/null \ No newline at end of file