mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
migrate configuration to PEP621 compatible config
- adapt documentation - add wheel tests to check wheel contents. - adapt pipeline to use pdm - adapt autopub config - add scripts as shortcuts to invoke tasks
This commit is contained in:
parent
c18f1a7308
commit
8b6d215934
13 changed files with 113 additions and 1495 deletions
82
docs/conf.py
82
docs/conf.py
|
|
@ -2,48 +2,58 @@ import datetime
|
|||
import os
|
||||
import sys
|
||||
|
||||
from pelican import __version__
|
||||
if sys.version_info >= (3, 11):
|
||||
import tomllib
|
||||
else:
|
||||
import tomli as tomllib
|
||||
|
||||
|
||||
sys.path.append(os.path.abspath(os.pardir))
|
||||
|
||||
|
||||
with open("../pyproject.toml", "rb") as f:
|
||||
project_data = tomllib.load(f).get("project")
|
||||
if project_data is None:
|
||||
raise KeyError("project data is not found")
|
||||
|
||||
|
||||
# -- General configuration ----------------------------------------------------
|
||||
templates_path = ['_templates']
|
||||
templates_path = ["_templates"]
|
||||
extensions = [
|
||||
"sphinx.ext.autodoc",
|
||||
"sphinx.ext.ifconfig",
|
||||
"sphinx.ext.extlinks",
|
||||
"sphinxext.opengraph",
|
||||
]
|
||||
source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
project = 'Pelican'
|
||||
source_suffix = ".rst"
|
||||
master_doc = "index"
|
||||
project = project_data.get("name").upper()
|
||||
year = datetime.datetime.now().date().year
|
||||
copyright = f'2010–{year}'
|
||||
exclude_patterns = ['_build']
|
||||
release = __version__
|
||||
version = '.'.join(release.split('.')[:1])
|
||||
last_stable = __version__
|
||||
rst_prolog = '''
|
||||
.. |last_stable| replace:: :pelican-doc:`{}`
|
||||
'''.format(last_stable)
|
||||
copyright = f"2010–{year}"
|
||||
exclude_patterns = ["_build"]
|
||||
release = project_data.get("version")
|
||||
version = ".".join(release.split(".")[:1])
|
||||
last_stable = project_data.get("version")
|
||||
rst_prolog = f"""
|
||||
.. |last_stable| replace:: :pelican-doc:`{last_stable}`
|
||||
.. |min_python| replace:: {project_data.get('requires-python').split(",")[0]}
|
||||
"""
|
||||
|
||||
extlinks = {
|
||||
'pelican-doc': ('https://docs.getpelican.com/en/latest/%s.html', '%s')
|
||||
}
|
||||
extlinks = {"pelican-doc": ("https://docs.getpelican.com/en/latest/%s.html", "%s")}
|
||||
|
||||
# -- Options for HTML output --------------------------------------------------
|
||||
|
||||
html_theme = 'furo'
|
||||
html_title = f'<strong>{project}</strong> <i>{release}</i>'
|
||||
html_static_path = ['_static']
|
||||
html_theme = "furo"
|
||||
html_title = f"<strong>{project}</strong> <i>{release}</i>"
|
||||
html_static_path = ["_static"]
|
||||
html_theme_options = {
|
||||
'light_logo': 'pelican-logo.svg',
|
||||
'dark_logo': 'pelican-logo.svg',
|
||||
'navigation_with_keys': True,
|
||||
"light_logo": "pelican-logo.svg",
|
||||
"dark_logo": "pelican-logo.svg",
|
||||
"navigation_with_keys": True,
|
||||
}
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'Pelicandoc'
|
||||
htmlhelp_basename = "Pelicandoc"
|
||||
|
||||
html_use_smartypants = True
|
||||
|
||||
|
|
@ -59,21 +69,29 @@ html_show_sourcelink = False
|
|||
|
||||
def setup(app):
|
||||
# overrides for wide tables in RTD theme
|
||||
app.add_css_file('theme_overrides.css') # path relative to _static
|
||||
app.add_css_file("theme_overrides.css") # path relative to _static
|
||||
|
||||
|
||||
# -- Options for LaTeX output -------------------------------------------------
|
||||
latex_documents = [
|
||||
('index', 'Pelican.tex', 'Pelican Documentation', 'Justin Mayer',
|
||||
'manual'),
|
||||
("index", "Pelican.tex", "Pelican Documentation", "Justin Mayer", "manual"),
|
||||
]
|
||||
|
||||
# -- Options for manual page output -------------------------------------------
|
||||
man_pages = [
|
||||
('index', 'pelican', 'pelican documentation',
|
||||
['Justin Mayer'], 1),
|
||||
('pelican-themes', 'pelican-themes', 'A theme manager for Pelican',
|
||||
['Mickaël Raybaud'], 1),
|
||||
('themes', 'pelican-theming', 'How to create themes for Pelican',
|
||||
['The Pelican contributors'], 1)
|
||||
("index", "pelican", "pelican documentation", ["Justin Mayer"], 1),
|
||||
(
|
||||
"pelican-themes",
|
||||
"pelican-themes",
|
||||
"A theme manager for Pelican",
|
||||
["Mickaël Raybaud"],
|
||||
1,
|
||||
),
|
||||
(
|
||||
"themes",
|
||||
"pelican-theming",
|
||||
"How to create themes for Pelican",
|
||||
["The Pelican contributors"],
|
||||
1,
|
||||
),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue