Browse Source

Change doc theme

pull/506/head
Simon Conseil 2 years ago
parent
commit
be12c37dd7
  1. 5
      README.rst
  2. 109
      docs/conf.py
  3. 2
      docs/faq.rst
  4. 2
      docs/plugins.rst
  5. 2
      pyproject.toml

5
README.rst

@ -25,12 +25,12 @@ what is missing: resize images, create thumbnails, generate HTML pages.
Sigal requires Python 3.8+.
Links :
Links
-----
* Latest documentation on the website_
* Source, issues and pull requests on GitHub_
* Releases on PyPI_
* ``#sigal`` on Freenode, or with the webchat_ interface.
Themes & Demo
-------------
@ -51,5 +51,4 @@ Javascript libraries:
.. _galleria demo: http://saimon.org/sigal-demo/galleria/
.. _colorbox demo: http://saimon.org/sigal-demo/colorbox/
.. _photoswipe demo: http://saimon.org/sigal-demo/photoswipe/
.. _webchat: http://webchat.freenode.net/?channels=sigal
.. _Jinja2: https://palletsprojects.com/p/jinja/

109
docs/conf.py

@ -1,14 +1,12 @@
import os
import sys
import alabaster
# import os
# import sys
from sigal import __version__
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.append(os.path.abspath(".."))
# sys.path.append(os.path.abspath(".."))
# -- General configuration ----------------------------------------------------
@ -17,7 +15,7 @@ sys.path.append(os.path.abspath(".."))
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ["sphinx.ext.autodoc", "sphinx.ext.extlinks", "alabaster"]
extensions = ["sphinx.ext.autodoc", "sphinx.ext.extlinks"]
extlinks = {"issue": ("https://github.com/saimn/sigal/issues/%s", "#%s")}
@ -70,6 +68,7 @@ exclude_patterns = ["_build"]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
pygments_dark_style = "monokai"
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
@ -77,89 +76,25 @@ pygments_style = "sphinx"
# -- Options for HTML output --------------------------------------------------
html_theme_path = [alabaster.get_path()]
html_theme = "alabaster"
html_sidebars = {
"**": [
"about.html",
"navigation.html",
"searchbox.html",
"donate.html",
]
}
html_theme = "furo"
html_theme_options = {
# 'logo': 'logo.png',
"github_user": "saimn",
"github_repo": "sigal",
"description": "Yet another simple static gallery generator.",
# 'analytics_id': 'UA-18486793-2',
# 'travis_button': True,
"source_repository": "https://github.com/saimn/sigal/",
"source_branch": "main",
"source_directory": "docs/",
"footer_icons": [
{
"name": "GitHub",
"url": "https://github.com/saimn/sigal",
"html": """
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
</svg>
""",
"class": "",
},
],
}
# html_theme_options['extra_nav_links'] = {
# "Main website": 'http://www.paramiko.org',
# }
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
# html_additional_pages = {}
# If false, no module index is generated.
# html_domain_indices = True
# If false, no index is generated.
# html_use_index = True
# If true, the index is split into individual pages for each letter.
# html_split_index = False
# If true, links to the reST sources are added to the pages.
# html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
# html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = "Sigaldoc"

2
docs/faq.rst

@ -2,8 +2,6 @@
Frequently Asked Questions (FAQ)
==================================
.. contents::
How do I protect the gallery with a password?
---------------------------------------------

2
docs/plugins.rst

@ -2,8 +2,6 @@
Plugins
=========
.. contents::
How to use plugins
------------------

2
pyproject.toml

@ -38,7 +38,7 @@ dynamic = ["version"]
[project.optional-dependencies]
all = ["boto", "brotli", "feedgenerator", "zopfli", "cryptography"]
tests = ["pytest", "pytest-cov"]
docs = ["Sphinx>=4.1.0", "alabaster", "cryptography"]
docs = ["Sphinx>=4.1.0", "furo", "cryptography"]
[project.scripts]
sigal = "sigal.__main__:main"

Loading…
Cancel
Save