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 00000000..ddee0a54 Binary files /dev/null and b/docs/source/_static/img/savepoint_rollback.png differ 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