branch: elpa/flycheck
commit bb5269c16a541f2e6be9b2ddc58c7f4c8507579d
Merge: a3e57b179a 45267157d3
Author: Bozhidar Batsov <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #2151 from flycheck/docs-furo-theme
Switch docs theme from alabaster to furo
---
doc/Makefile | 9 ---------
doc/_templates/about.html | 43 -------------------------------------------
doc/_templates/tables.html | 6 ------
doc/conf.py | 44 +++++---------------------------------------
doc/requirements.txt | 8 ++++----
5 files changed, 9 insertions(+), 101 deletions(-)
diff --git a/doc/Makefile b/doc/Makefile
index 53dcd7b70e..9fd04415a9 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -21,14 +21,7 @@ SPHINXAUTOBUILD = sphinx-autobuild
OPTIPNG = optipng
BUILDDIR = _build
-# Whether to build offline HTML that loads no external resources, for use in
3rd
-# party packages, see https://github.com/flycheck/flycheck/issues/999
-OFFLINE =
-
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) .
-ifdef OFFLINE
-ALLSPHINXOPTS += -Dflycheck_offline_html=1
-endif
IMAGES = images/*.png
@@ -54,8 +47,6 @@ help:
@echo 'For *-auto targets you also need $(SPHINXAUTOBUILD).'
@echo ''
@echo 'Available make variables:'
- @echo ' OFFLINE: If set build HTML that loads no external resources'
- @echo ''
@echo 'Available programs:'
@echo ' $(SPHINXBUILD): $(if $(HAVE_SPHINXBUILD),yes,no)'
@echo ' $(SPHINXAUTOBUILD): $(if $(HAVE_SPHINXAUTOBUILD),yes,no)'
diff --git a/doc/_templates/about.html b/doc/_templates/about.html
deleted file mode 100644
index a0e568825d..0000000000
--- a/doc/_templates/about.html
+++ /dev/null
@@ -1,43 +0,0 @@
-{% if theme_logo %}
-<p class="logo">
- <a href="{{ pathto(master_doc) }}">
- <img class="logo" src="{{ pathto('_static/' ~ theme_logo, 1) }}"
alt="Logo"/>
- {% if theme_logo_name|lower == 'true' %}
- <h1 class="logo logo-name">{{ project }}</h1>
- {% endif %}
- </a>
-</p>
-{% else %}
-<h1 class="logo"><a href="{{ pathto(master_doc) }}">{{ project }}</a></h1>
-{% endif %}
-
-{% if theme_description %}
-<p class="blurb">{{ theme_description }}</p>
-{% endif %}
-
-{% macro badge(badge, href) -%}
-<p><a href="{{href}}"><img src="https://img.shields.io/{{badge}}"/></a></p>
-{%- endmacro %}
-
-{% if theme_github_user and theme_github_repo and not flycheck_offline_html %}
-{% if theme_github_button|lower == 'true' %}
-<p>
- <iframe src="https://ghbtns.com/github-btn.html?user={{ theme_github_user
}}&repo={{ theme_github_repo }}&type={{ theme_github_type
}}&count={{ theme_github_count }}&v=2"
- allowtransparency="true" frameborder="0" scrolling="0"
width="170px" height="20px"></iframe>
-</p>
-{% endif %}
-{% endif %}
-
-{% if not flycheck_offline_html %}
-<p>
- <a href="https://gitter.im/flycheck/flycheck">
- <img
src="https://img.shields.io/gitter/room/flycheck/flycheck.svg?maxAge=2592000" />
- </a>
-</p>
-<p>
- <a href="https://stable.melpa.org/#/flycheck"><img alt="MELPA Stable"
src="https://stable.melpa.org/packages/flycheck-badge.svg"/></a>
-</p>
-<p>
- <a href="https://melpa.org/#/flycheck"><img alt="MELPA"
src="https://melpa.org/packages/flycheck-badge.svg"/></a>
-</p>
-{% endif %}
diff --git a/doc/_templates/tables.html b/doc/_templates/tables.html
deleted file mode 100644
index 76000415a8..0000000000
--- a/doc/_templates/tables.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<h4>Tables</h4>
-<ul>
- <li><a href="{{pathto('languages')}}">Supported languages</a></li>
- <li><a href="{{pathto('changes')}}">List of changes</a></li>
- <li><a href="{{pathto('genindex')}}">Index</a></li>
-</ul>
diff --git a/doc/conf.py b/doc/conf.py
index 10ce438d6e..7ffbdcbc49 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -96,7 +96,7 @@ rst_prolog = """\
exclude_patterns = ['_build']
default_role = 'any'
primary_domain = 'el'
-templates_path = ['_templates']
+templates_path = ['_templates'] # layout.html blocks Google Analytics
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
@@ -119,25 +119,11 @@ nitpick_ignore = [
]
# HTML settings
-html_theme = 'alabaster'
+html_theme = 'furo'
html_theme_options = {
- 'logo': 'logo.png',
- 'logo_name': False,
- 'description': 'Syntax checking for GNU Emacs',
- 'github_user': 'flycheck',
- 'github_repo': 'flycheck',
- 'github_type': 'star',
- 'github_banner': True,
- 'travis_button': False,
-}
-html_sidebars = {
- '**': [
- 'about.html',
- 'tables.html',
- 'navigation.html',
- 'relations.html',
- 'searchbox.html',
- ]
+ 'source_repository': 'https://github.com/flycheck/flycheck',
+ 'source_branch': 'master',
+ 'source_directory': 'doc/',
}
html_static_path = ['_static']
html_favicon = '_static/favicon.ico'
@@ -273,21 +259,6 @@ class IssueReferences(Transform):
parent.replace(node, new_nodes)
-def build_offline_html(app):
- from sphinx.builders.html import StandaloneHTMLBuilder
- build_standalone = isinstance(app.builder, StandaloneHTMLBuilder)
- if app.config.flycheck_offline_html and build_standalone:
- logger.info(
- 'Building offline documentation without external resources!')
- app.builder.theme_options['github_banner'] = 'false'
- app.builder.theme_options['github_button'] = 'false'
-
-
-def add_offline_to_context(app, _pagename, _templatename, context, _doctree):
- # Expose offline setting in HTML context
- context['flycheck_offline_html'] = app.config.flycheck_offline_html
-
-
def setup(app):
app.add_object_type('syntax-checker', 'checker',
'pair: %s; Syntax checker')
@@ -295,8 +266,3 @@ def setup(app):
app.add_directive('syntax-checker-config-file',
SyntaxCheckerConfigurationFile)
app.add_transform(IssueReferences)
- # Build offline HTML that loads no external resources, for use in 3rd party
- # packages, see https://github.com/flycheck/flycheck/issues/999
- app.add_config_value('flycheck_offline_html', False, 'html')
- app.connect('builder-inited', build_offline_html)
- app.connect('html-page-context', add_offline_to_context)
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 7c02c404f9..bfb6c67dd1 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -1,10 +1,10 @@
# Sphinx
-Sphinx~=5.3
+Sphinx>=7.0
# Automatically build documentation on changes
sphinx-autobuild
# Sphinx theme
-alabaster>=0.7.8
+furo
# Syntax highlighting
-Pygments>=2.1
+Pygments>=2.17
# Network access
-requests>=2.9
+requests>=2.30