Skip to content

Commit

Permalink
Add initial Sphinx docs setup
Browse files Browse the repository at this point in the history
  • Loading branch information
wylee committed Jun 15, 2021
1 parent e5623a1 commit d129ab0
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2

build:
image: latest

python:
version: 3.6
install:
- method: pip
path: .

sphinx:
fail_on_warning: true
106 changes: 106 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import os

here = os.path.dirname(__file__)
top_level = os.path.dirname(here)

# -- General configuration -----------------------------------------------------

project = "django-local-settings"
version = "2.0a4" # Short version
release = version # Full version
author_name = "Wyatt Baldwin"
author_email = "self@wyattbaldwin.com"
copyright = f"2014, 2021 {author_name} <{author_email}>"
github_username = "wylee"
github_url = f"https://github.com/{github_username}/{project}"

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
]

templates_path = ["_templates"]

source_suffix = ".rst"

master_doc = "index"

today_fmt = "%B %d, %Y"

exclude_patterns = ["_build"]

pygments_style = "sphinx"

# reStructuredText options ------------------------------------------------

# This makes `xyz` the same as ``xyz``.
default_role = "literal"

# This is appended to the bottom of all docs.
rst_epilog = f"""
.. |project| replace:: {project}
.. |github_url| replace:: {github_url}
"""

# Options for intersphinx extension ---------------------------------------

intersphinx_mapping = {
"python": ("https://docs.python.org/3.6", None),
}

# -- Options for HTML output -------------------------------------------

html_theme = "alabaster"

html_theme_options = {
"description": "Local/env settings for Django",
"github_user": github_username,
"github_repo": project,
"page_width": "1200px",
"fixed_sidebar": True,
"sidebar_width": "300px",
"extra_nav_links": {
"Source (GitHub)": github_url,
},
}

html_sidebars = {
"**": [
"about.html",
"navigation.html",
"searchbox.html",
]
}

html_static_path = []

html_last_updated_fmt = "%b %d, %Y"

# Output file base name for HTML help builder.
htmlhelp_basename = f"{project}doc"


# -- Options for LaTeX output ------------------------------------------

latex_documents = [
(
"index",
f"{project}.tex",
f"{project} Documentation",
author_name,
"manual",
),
]

# -- Options for manual page output ------------------------------------

man_pages = [
(
"index",
project,
f"{project} Documentation",
[author_name],
1,
)
]
7 changes: 7 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
django-local-settings
+++++++++++++++++++++

Overview
========

.. note:: Write docs!
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ packages = [
]

include = [
"docs/*",
"CHANGELOG.md",
"LICENSE",
"README.md",
Expand All @@ -29,6 +30,7 @@ black = "*"
coverage = "*"
flake8 = "*"
runcommands = "*"
sphinx = "*"
tox = "*"

[tool.poetry.scripts]
Expand Down

0 comments on commit d129ab0

Please sign in to comment.