diff --git a/Pipfile b/Pipfile index 62eff03..1305771 100644 --- a/Pipfile +++ b/Pipfile @@ -17,6 +17,8 @@ mock = "*" setuptools-scm = "*" wheel = "*" pre-commit = "*" +sphinx-palewire-theme = "*" +myst-parser = "*" [requires] python_version = "3.11" diff --git a/Pipfile.lock b/Pipfile.lock index 4724325..8bb294b 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "0a033fefdd646d8d2412c8223482876fe4a3180eb9fb4ae899cf3f0be269e411" + "sha256": "48e591910129e4ea9aadc3798f39fdcbc6ecf63bbe80f5ede24741c1a58dc5ae" }, "pipfile-spec": 6, "requires": { @@ -530,6 +530,14 @@ "markers": "python_version >= '3.6'", "version": "==0.7.0" }, + "mdit-py-plugins": { + "hashes": [ + "sha256:b51b3bb70691f57f974e257e367107857a93b36f322a9e6d44ca5bf28ec2def9", + "sha256:d8ab27e9aed6c38aa716819fedfde15ca275715955f8a185a8e1cf90fb1d2c1b" + ], + "markers": "python_version >= '3.8'", + "version": "==0.4.0" + }, "mdurl": { "hashes": [ "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", @@ -555,6 +563,15 @@ "markers": "python_version >= '3.8'", "version": "==10.1.0" }, + "myst-parser": { + "hashes": [ + "sha256:7c36344ae39c8e740dad7fdabf5aa6fc4897a813083c6cc9990044eb93656b14", + "sha256:ea929a67a6a0b1683cdbe19b8d2e724cd7643f8aa3e7bb18dd65beac3483bead" + ], + "index": "pypi", + "markers": "python_version >= '3.8'", + "version": "==2.0.0" + }, "nh3": { "hashes": [ "sha256:0d02d0ff79dfd8208ed25a39c12cbda092388fff7f1662466e27d97ad011b770", @@ -801,6 +818,13 @@ "markers": "python_version >= '3.6'", "version": "==2021.3.14" }, + "sphinx-palewire-theme": { + "hashes": [ + "sha256:2d13da512684e54d8654f79d0a9d63b58aabf2e7b8ca5f16bfeb946b77ce4956" + ], + "index": "pypi", + "version": "==0.0.10" + }, "sphinxcontrib-applehelp": { "hashes": [ "sha256:094c4d56209d1734e7d252f6e0b3ccc090bd52ee56807a5d9315b19c122ab15d", diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css deleted file mode 100644 index 0de00e4..0000000 --- a/docs/_static/css/custom.css +++ /dev/null @@ -1,205 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:ital,wght@0,400;0,700;0,800;1,400;1,800&display=swap'); - -div.document { - margin-top: 0; -} - -div.body { - min-width: 0 !important; -} - -div.body p, div.body li { - line-height: 1.45; -} - -div.body li { - margin-bottom: 4px; -} - -div.topic { - margin: 0; - padding: 8px 12px; -} - -p.topic-title { - margin: 0; -} - -div.topic ul { - margin-top: 6px; -} -@media screen and (max-width: 870px) { - ul { - margin: 10px 0 10px 20px; - } -} - -div.sphinxsidebar h3 { - font-family: 'Libre Franklin', "Helvetica", "Liberation Sans", Arial, sans-serif; -} - -@media (min-width: 875px) { - div.sphinxsidebar { - margin-top: 85px; - } -} - -@media screen and (max-width: 875px) { - div.sphinxsidebar { - width: auto; - padding: 0px 20px; - margin: 50px 0 0 0; - } -} - -div.admonition { - padding: 15px; -} - -div.warning { - background-color: #EEE; - border: 1px solid #CCC; -} - -div.admonition p.admonition-title { - font-family: 'Libre Franklin', "Helvetica", "Liberation Sans", Arial, sans-serif; - margin: 0; -} - -div.related nav { - padding-right: 10px; -} - -body { - font-family: 'Libre Franklin', "Helvetica", "Liberation Sans", Arial, sans-serif; - font-size: 20px; - line-height: 1.45; - text-align: left; -} -@media screen and (max-width: 875px) { - body { - margin: 0; - padding: 0; - } - div.body > .section { - padding: 0 20px; - } -} - -@media (max-width: 550px) { - body { - font-size: 0.85em; - } -} - -div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { - font-family: 'Libre Franklin', "Helvetica", "Liberation Sans", Arial, sans-serif; - font-weight: 700; -} - -div.body h1 { - font-weight: 800; - font-size: 220%; -} - -pre { - padding: 7px; -} - -.row { - width: 100%; - max-width: 660px; - margin: 0 auto; - overflow: hidden; -} -.row .fivecol { - width: 40%; - float: right; - min-height: 1px; -} -.row .sevencol { - width: 40%; - float: left; - min-height: 1px; -} -@media (max-width: 550px) { - .row .fivecol, .row .sevencol { - padding: 0 20px; - } -} - -/* The header */ -nav { - display: block; - margin-top: 0.75em; - margin-bottom: 0.5em; - font-size: 1em; - line-height: 1.7em; -} -nav .shingle { - font-size: 1.7em; - font-weight: bold; - text-align: left; - padding-left: 0.15em; -} -nav .shingle a { - text-decoration: none; - font-weight: bold; - color: #000; -} -nav .shingle a:hover { - color: #686868; -} -@media (max-width: 550px) { - nav .shingle { - float: left; - margin-bottom: 5px; - } -} -nav .links { - text-align: right; -} -nav .links ul { - float: right; - list-style-type: none; - margin: 4px 0 0 0; -} -nav .links li { - float: left; - list-style-position: inside; - margin-left: 0.5em; - font-size: 0.9em; - font-weight: 300; - margin-bottom: 0; -} -nav .links li a { - text-decoration: none; -} -nav .links li a:hover { - text-decoration: underline; -} -.last { - margin-right: 0; -} - -.topbar { - border-bottom: solid 10px #e5e5e5; - margin-bottom: 20px; - width: 100%; -} - -a:link { - text-decoration: none; - color: #686868; -} -a:visited { - text-decoration: none; - color: #686868; -} -a:hover { - text-decoration: underline; -} -a:active { - text-decoration: underline; - color: #000; -} diff --git a/docs/conf.py b/docs/conf.py index 7447121..423d247 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,38 +1,32 @@ -import typing +"""Configure Sphinx configuration.""" +from __future__ import annotations + +import os +import sys +from typing import Any from datetime import datetime -extensions: typing.List[typing.Any] = [] -templates_path = ["_templates"] -source_suffix = ".rst" +sys.path.insert(0, os.path.abspath("..")) + +source_suffix = ".md" master_doc = "index" project = "django-postgres-copy" year = datetime.now().year -copyright = f"{year} Ben Welsh" +copyright = f"{year} palewire" exclude_patterns = ["_build"] -html_theme = "alabaster" -html_sidebars = { - "**": [ - # 'about.html', - # 'navigation.html', - "relations.html", - "searchbox.html", - "donate.html", - ] -} -html_theme_options = { +html_theme = "palewire" +html_sidebars: dict[Any, Any] = {} +html_theme_options: dict[Any, Any] = { "canonical_url": f"https://palewi.re/docs/{project}/", - "github_user": "palewire", - "github_repo": project, - "donate_url": "https://github.com/sponsors/palewire", - "show_powered_by": False, + "nosidebar": True, } -html_static_path = ["_static"] -html_css_files = [ - "css/custom.css", -] - pygments_style = "sphinx" + +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.napoleon", +] \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 125b24b..4bafa9d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,48 +1,3 @@ -.. raw:: html - - -
- ==================== django-postgres-copy ==================== diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 036a002..0000000 --- a/docs/make.bat +++ /dev/null @@ -1,263 +0,0 @@ -@ECHO OFF - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set BUILDDIR=_build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . -set I18NSPHINXOPTS=%SPHINXOPTS% . -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% - set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% -) - -if "%1" == "" goto help - -if "%1" == "help" ( - :help - echo.Please use `make ^