Commit 36848f20 authored by Anton Smirnov's avatar Anton Smirnov
Browse files

Merge branch '1.x' into 2.x

parents 3f38025b bf8c906a
Loading
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
# template
/docs/*.py          export-ignore
/docs/*.txt         export-ignore
/docs/_*            export-ignore
/tests              export-ignore
/.git*              export-ignore
/*.yml              export-ignore
/*.yaml             export-ignore
/*.xml              export-ignore
/*.xml.dist         export-ignore

# project
+4 −0
Original line number Diff line number Diff line
@@ -9,7 +9,11 @@
# docs
/docs/*.html
/docs/build
/venv

# tests
/reports
/.phpunit.result.cache

# dev
/debug
+7 −2
Original line number Diff line number Diff line
version: 2

build:
  os: 'ubuntu-24.04'
  tools:
    python: '3.12'

sphinx:
  configuration: docs/conf.py
  configuration: 'docs/conf.py'

python:
  install:
    - requirements: docs/requirements.txt
  - requirements: 'docs/requirements.txt'
+5 −0
Original line number Diff line number Diff line
<div class="navbar-brand">{{ current_version }}</div>

{#- hack scroll issue -#}

<style>#rtd-footer-container{display:none}</style>
+61 −3
Original line number Diff line number Diff line
from datetime import datetime

project = 'Bencode'
# import specific project config
import os, sys
sys.path.append(os.curdir)
from conf_project import *

author = 'Anton Smirnov'
copyright = '{} {}'.format(datetime.now().year, author)
copyright = '{}'.format(datetime.now().year)
language = 'en'

html_title = project
html_theme = 'furo'
html_theme = 'sphinx_book_theme'
templates_path = ["_templates"]
html_sidebars = {
    "**": [
        "navbar-logo.html",
        "icon-links.html",
        "rtd-version.html",
        "search-button-field.html",
        "sbt-sidebar-nav.html",
    ]
}
html_theme_options = {
    'use_edit_page_button': True,
    'icon_links': [
        {
            "name": "GitLab",
            "url": "https://gitlab.com/sandfox/" + repo,
            "icon": "fa-brands fa-square-gitlab",
            "type": "fontawesome",
        },
        {
            "name": "GitHub",
            "url": "https://github.com/arokettu/" + repo,
            "icon": "fa-brands fa-square-github",
            "type": "fontawesome",
        },
        {
            "name": "BitBucket",
            "url": "https://bitbucket.org/sandfox/" + repo,
            "icon": "fa-brands fa-bitbucket",
            "type": "fontawesome",
        },
        {
            "name": "Gitea",
            "url": "https://sandfox.org/sandfox/" + repo,
            "icon": "fa-solid fa-mug-hot",
            "type": "fontawesome",
        },
   ]
}
if packagist:
    html_theme_options['icon_links'].append({
        "name": "Packagist",
        "url": "https://packagist.org/packages/" + packagist,
        "icon": "https://img.shields.io/packagist/dm/" + packagist + "?style=flat-square",
        "type": "url",
    })
html_context = {
    'current_version': os.environ.get("READTHEDOCS_VERSION_NAME"),
    'gitlab_user': "sandfox",
    'gitlab_repo': repo,
    'gitlab_version': "master",
    'doc_path': "docs",
}

exclude_patterns = ['venv/*']
Loading