feat(docs): new docs build logic
- remove nix - use docker container - install latest google analytics
This commit is contained in:
parent
95a81d966d
commit
42606f970b
16 changed files with 506 additions and 651 deletions
117
docs/_templates/base.html
vendored
Normal file
117
docs/_templates/base.html
vendored
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
<!doctype html>
|
||||
<html class="no-js"{% if language is not none %} lang="{{ language }}"{% endif %} data-content_root="{{ content_root }}">
|
||||
<head>
|
||||
<!-- Google Tag Manager -->
|
||||
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','GTM-M2TSG36B');</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
|
||||
{%- block site_meta -%}
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||
<meta name="color-scheme" content="light dark">
|
||||
|
||||
{%- if metatags %}{{ metatags }}{% endif -%}
|
||||
|
||||
{%- block linktags %}
|
||||
{%- if hasdoc('about') -%}
|
||||
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
|
||||
{%- endif -%}
|
||||
{%- if hasdoc('genindex') -%}
|
||||
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
|
||||
{%- endif -%}
|
||||
{%- if hasdoc('search') -%}
|
||||
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
|
||||
{%- endif -%}
|
||||
{%- if hasdoc('copyright') -%}
|
||||
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
|
||||
{%- endif -%}
|
||||
{%- if next -%}
|
||||
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
|
||||
{%- endif -%}
|
||||
{%- if prev -%}
|
||||
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
|
||||
{%- endif -%}
|
||||
{#- rel="canonical" (set by html_baseurl) -#}
|
||||
{%- if pageurl %}
|
||||
<link rel="canonical" href="{{ pageurl|e }}" />
|
||||
{%- endif %}
|
||||
{%- endblock linktags %}
|
||||
|
||||
{# Favicon #}
|
||||
{%- if favicon_url -%}
|
||||
<link rel="shortcut icon" href="{{ favicon_url }}"/>
|
||||
{%- endif -%}
|
||||
|
||||
<!-- Generated with Sphinx {{ sphinx_version }} and Furo {{ furo_version }} -->
|
||||
|
||||
{%- endblock site_meta -%}
|
||||
|
||||
{#- Site title -#}
|
||||
{%- block htmltitle -%}
|
||||
{% if not docstitle %}
|
||||
<title>{{ title|striptags|e }}</title>
|
||||
{% elif pagename == master_doc %}
|
||||
<title>{{ docstitle|striptags|e }}</title>
|
||||
{% else %}
|
||||
<title>{{ title|striptags|e }} - {{ docstitle|striptags|e }}</title>
|
||||
{% endif %}
|
||||
{%- endblock -%}
|
||||
|
||||
{%- block styles -%}
|
||||
|
||||
{# Custom stylesheets #}
|
||||
{%- block regular_styles -%}
|
||||
{%- for css in css_files -%}
|
||||
{% if css|attr("filename") -%}
|
||||
{{ css_tag(css) }}
|
||||
{%- else -%}
|
||||
<link rel="stylesheet" href="{{ pathto(css, 1)|e }}" type="text/css" />
|
||||
{%- endif %}
|
||||
{% endfor -%}
|
||||
{%- endblock regular_styles -%}
|
||||
|
||||
{#- Theme-related stylesheets -#}
|
||||
{%- block theme_styles %}
|
||||
{% include "partials/_head_css_variables.html" with context %}
|
||||
{%- endblock -%}
|
||||
|
||||
{%- block extra_styles %}
|
||||
{%- endblock -%}
|
||||
|
||||
{%- endblock styles -%}
|
||||
|
||||
{#- Custom front matter #}
|
||||
{%- block extrahead -%}{%- endblock -%}
|
||||
</head>
|
||||
<body>
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M2TSG36B"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
|
||||
{% block body %}
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{%- block scripts -%}
|
||||
|
||||
{# Custom JS #}
|
||||
{%- block regular_scripts -%}
|
||||
{% for path in script_files -%}
|
||||
{{ js_tag(path) }}
|
||||
{% endfor -%}
|
||||
{%- endblock regular_scripts -%}
|
||||
|
||||
{# Theme-related JavaScript code #}
|
||||
{%- block theme_scripts -%}
|
||||
{%- endblock -%}
|
||||
|
||||
{%- endblock scripts -%}
|
||||
</body>
|
||||
</html>
|
||||
6
docs/_templates/footer.html
vendored
6
docs/_templates/footer.html
vendored
|
|
@ -1,6 +0,0 @@
|
|||
{% extends "!footer.html" %}
|
||||
|
||||
{% block extrafooter %}
|
||||
<br/>
|
||||
Documentation defects and suggestions can be submitted <a href="https://issues.rhodecode.com/projects/documentation">here</a>
|
||||
{% endblock %}
|
||||
18
docs/_templates/layout.html
vendored
18
docs/_templates/layout.html
vendored
|
|
@ -1,18 +0,0 @@
|
|||
{% extends "!layout.html" %}
|
||||
{% set css_files = css_files + ['_static/add.css'] %}
|
||||
|
||||
{% block footer %}
|
||||
{{ super() }}
|
||||
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-55639800-3', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
204
docs/_templates/page.html
vendored
Normal file
204
docs/_templates/page.html
vendored
Normal file
|
|
@ -0,0 +1,204 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block body -%}
|
||||
{{ super() }}
|
||||
{% include "partials/icons.html" %}
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||||
<label class="overlay sidebar-overlay" for="__navigation">
|
||||
<div class="visually-hidden">Hide navigation sidebar</div>
|
||||
</label>
|
||||
<label class="overlay toc-overlay" for="__toc">
|
||||
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||||
</label>
|
||||
|
||||
{% if theme_announcement -%}
|
||||
<div class="announcement">
|
||||
<aside class="announcement-content">
|
||||
{% block announcement %} {{ theme_announcement }} {% endblock announcement %}
|
||||
</aside>
|
||||
</div>
|
||||
{%- endif %}
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||||
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="{{ pathto(master_doc) }}"><div class="brand">{{ docstitle if docstitle else project }}</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle">
|
||||
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon{% if furo_hide_toc %} no-toc{% endif %}" for="__toc">
|
||||
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
{% block left_sidebar %}
|
||||
<div class="sidebar-sticky">
|
||||
{%- for sidebar_section in sidebars %}
|
||||
{%- include sidebar_section %}
|
||||
{%- endfor %}
|
||||
</div>
|
||||
{% endblock left_sidebar %}
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>{% trans %}Back to top{% endtrans %}</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
{% if theme_top_of_page_button == "edit" -%}
|
||||
{%- include "components/edit-this-page.html" with context -%}
|
||||
{%- elif theme_top_of_page_button != None -%}
|
||||
{{ warning("Got an unsupported value for 'top_of_page_button'") }}
|
||||
{%- endif -%}
|
||||
{#- Theme toggle -#}
|
||||
<div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle">
|
||||
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon{% if furo_hide_toc %} no-toc{% endif %}" for="__toc">
|
||||
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main">
|
||||
{% block content %}{{ body }}{% endblock %}
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
{% block footer %}
|
||||
<div class="related-pages">
|
||||
{% if next -%}
|
||||
<a class="next-page" href="{{ next.link }}">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>{{ _("Next") }}</span>
|
||||
</div>
|
||||
<div class="title">{{ next.title }}</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
{%- endif %}
|
||||
{% if prev -%}
|
||||
<a class="prev-page" href="{{ prev.link }}">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>{{ _("Previous") }}</span>
|
||||
</div>
|
||||
{% if prev.link == pathto(master_doc) %}
|
||||
<div class="title">{{ _("Home") }}</div>
|
||||
{% else %}
|
||||
<div class="title">{{ prev.title }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</a>
|
||||
{%- endif %}
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
{%- if show_copyright %}
|
||||
<div class="copyright">
|
||||
{%- if hasdoc('copyright') %}
|
||||
{% trans path=pathto('copyright'), copyright=copyright|e -%}
|
||||
<a href="{{ path }}">Copyright</a> © {{ copyright }}
|
||||
{%- endtrans %}
|
||||
{%- else %}
|
||||
{% trans copyright=copyright|e -%}
|
||||
Copyright © {{ copyright }}
|
||||
{%- endtrans %}
|
||||
{%- endif %}
|
||||
</div>
|
||||
{%- endif %}
|
||||
|
||||
{%- if show_sphinx -%}
|
||||
{% trans %}<a href="https://www.sphinx-doc.org/">Sphinx</a> and {% endtrans -%}
|
||||
<a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
|
||||
{% endif -%}
|
||||
{%- if last_updated -%}
|
||||
<div class="last-updated">
|
||||
{% trans last_updated=last_updated|e -%}
|
||||
Last updated on {{ last_updated }}
|
||||
{%- endtrans -%}
|
||||
</div>
|
||||
|
||||
<div style="border-top: 0">
|
||||
Got documentation defects and suggestions? <a href="https://community.rhodecode.com">Submit docs issues</a>
|
||||
</div>
|
||||
|
||||
{%- endif %}
|
||||
</div>
|
||||
<div class="right-details">
|
||||
{% if theme_footer_icons or READTHEDOCS -%}
|
||||
<div class="icons">
|
||||
{% if theme_footer_icons -%}
|
||||
{% for icon_dict in theme_footer_icons -%}
|
||||
<a class="muted-link {{ icon_dict.class }}" href="{{ icon_dict.url }}" aria-label="{{ icon_dict.name }}">
|
||||
{{- icon_dict.html -}}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{%- else -%}
|
||||
{#- Show Read the Docs project -#}
|
||||
{%- if READTHEDOCS and slug -%}
|
||||
<a class="muted-link" href="https://readthedocs.org/projects/{{ slug }}" aria-label="On Read the Docs">
|
||||
<svg x="0px" y="0px" viewBox="-125 217 360 360" xml:space="preserve">
|
||||
<path fill="currentColor" d="M39.2,391.3c-4.2,0.6-7.1,4.4-6.5,8.5c0.4,3,2.6,5.5,5.5,6.3 c0,0,18.5,6.1,50,8.7c25.3,2.1,54-1.8,54-1.8c4.2-0.1,7.5-3.6,7.4-7.8c-0.1-4.2-3.6-7.5-7.8-7.4c-0.5,0-1,0.1-1.5,0.2 c0,0-28.1,3.5-50.9,1.6c-30.1-2.4-46.5-7.9-46.5-7.9C41.7,391.3,40.4,391.1,39.2,391.3z M39.2,353.6c-4.2,0.6-7.1,4.4-6.5,8.5 c0.4,3,2.6,5.5,5.5,6.3c0,0,18.5,6.1,50,8.7c25.3,2.1,54-1.8,54-1.8c4.2-0.1,7.5-3.6,7.4-7.8c-0.1-4.2-3.6-7.5-7.8-7.4 c-0.5,0-1,0.1-1.5,0.2c0,0-28.1,3.5-50.9,1.6c-30.1-2.4-46.5-7.9-46.5-7.9C41.7,353.6,40.4,353.4,39.2,353.6z M39.2,315.9 c-4.2,0.6-7.1,4.4-6.5,8.5c0.4,3,2.6,5.5,5.5,6.3c0,0,18.5,6.1,50,8.7c25.3,2.1,54-1.8,54-1.8c4.2-0.1,7.5-3.6,7.4-7.8 c-0.1-4.2-3.6-7.5-7.8-7.4c-0.5,0-1,0.1-1.5,0.2c0,0-28.1,3.5-50.9,1.6c-30.1-2.4-46.5-7.9-46.5-7.9 C41.7,315.9,40.4,315.8,39.2,315.9z M39.2,278.3c-4.2,0.6-7.1,4.4-6.5,8.5c0.4,3,2.6,5.5,5.5,6.3c0,0,18.5,6.1,50,8.7 c25.3,2.1,54-1.8,54-1.8c4.2-0.1,7.5-3.6,7.4-7.8c-0.1-4.2-3.6-7.5-7.8-7.4c-0.5,0-1,0.1-1.5,0.2c0,0-28.1,3.5-50.9,1.6 c-30.1-2.4-46.5-7.9-46.5-7.9C41.7,278.2,40.4,278.1,39.2,278.3z M-13.6,238.5c-39.6,0.3-54.3,12.5-54.3,12.5v295.7 c0,0,14.4-12.4,60.8-10.5s55.9,18.2,112.9,19.3s71.3-8.8,71.3-8.8l0.8-301.4c0,0-25.6,7.3-75.6,7.7c-49.9,0.4-61.9-12.7-107.7-14.2 C-8.2,238.6-10.9,238.5-13.6,238.5z M19.5,257.8c0,0,24,7.9,68.3,10.1c37.5,1.9,75-3.7,75-3.7v267.9c0,0-19,10-66.5,6.6 C59.5,536.1,19,522.1,19,522.1L19.5,257.8z M-3.6,264.8c4.2,0,7.7,3.4,7.7,7.7c0,4.2-3.4,7.7-7.7,7.7c0,0-12.4,0.1-20,0.8 c-12.7,1.3-21.4,5.9-21.4,5.9c-3.7,2-8.4,0.5-10.3-3.2c-2-3.7-0.5-8.4,3.2-10.3c0,0,0,0,0,0c0,0,11.3-6,27-7.5 C-16,264.9-3.6,264.8-3.6,264.8z M-11,302.6c4.2-0.1,7.4,0,7.4,0c4.2,0.5,7.2,4.3,6.7,8.5c-0.4,3.5-3.2,6.3-6.7,6.7 c0,0-12.4,0.1-20,0.8c-12.7,1.3-21.4,5.9-21.4,5.9c-3.7,2-8.4,0.5-10.3-3.2c-2-3.7-0.5-8.4,3.2-10.3c0,0,11.3-6,27-7.5 C-20.5,302.9-15.2,302.7-11,302.6z M-3.6,340.2c4.2,0,7.7,3.4,7.7,7.7s-3.4,7.7-7.7,7.7c0,0-12.4-0.1-20,0.7 c-12.7,1.3-21.4,5.9-21.4,5.9c-3.7,2-8.4,0.5-10.3-3.2c-2-3.7-0.5-8.4,3.2-10.3c0,0,11.3-6,27-7.5C-16,340.1-3.6,340.2-3.6,340.2z" />
|
||||
</svg>
|
||||
</a>
|
||||
{%- endif -%}
|
||||
{%- endif %}
|
||||
</div>
|
||||
{%- endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock footer %}
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer{% if furo_hide_toc %} no-toc{% endif %}">
|
||||
{% block right_sidebar %}
|
||||
{% if not furo_hide_toc %}
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
{{ _("On this page") }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
{{ toc }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock right_sidebar %}
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{%- endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue