Skip to content

Commit 2ce0a64

Browse files
authored
Merge pull request #19 from django-denmark/docs
Adds documentation structure
2 parents e481607 + 001dff1 commit 2ce0a64

File tree

7 files changed

+149
-1
lines changed

7 files changed

+149
-1
lines changed

.readthedocs.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build documentation in the docs/ directory with Sphinx
9+
sphinx:
10+
configuration: docs/conf.py
11+
12+
# Optionally build your docs in additional formats such as PDF
13+
formats:
14+
- pdf
15+
16+
# Optionally set the version of Python and requirements required to build your docs
17+
python:
18+
version: 3.7
19+
install:
20+
- requirements: .[docs]

README.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ django-consent
1111
:target: https://codecov.io/gh/django-denmark/django-consent
1212

1313

14-
*Manages consent for email communication with GDPR in mind*
14+
*Manages consent from the user's perspective and with GDPR in mind*
15+
16+
We can imagine how we would want to handle data as the owners of an organization
17+
or the developers of a website. But let's instead imagine how we would want our
18+
own data to handled on a website.
1519

1620
* An app for Django - ``pip install django-consent``
1721
* Free software: GNU General Public License v3

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/conf.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
# -- Path setup --------------------------------------------------------------
7+
# If extensions (or modules to document with autodoc) are in another directory,
8+
# add these directories to sys.path here. If the directory is relative to the
9+
# documentation root, use os.path.abspath to make it absolute, like shown here.
10+
#
11+
# import os
12+
# import sys
13+
# sys.path.insert(0, os.path.abspath('.'))
14+
# -- Project information -----------------------------------------------------
15+
16+
project = "django-consent"
17+
copyright = "2021, Benjamin Balder Bach"
18+
author = "Benjamin Balder Bach"
19+
20+
# The full version, including alpha/beta/rc tags
21+
release = "0.9"
22+
23+
24+
# -- General configuration ---------------------------------------------------
25+
26+
# Add any Sphinx extension module names here, as strings. They can be
27+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
28+
# ones.
29+
extensions = []
30+
31+
# Add any paths that contain templates here, relative to this directory.
32+
templates_path = ["_templates"]
33+
34+
# List of patterns, relative to source directory, that match files and
35+
# directories to ignore when looking for source files.
36+
# This pattern also affects html_static_path and html_extra_path.
37+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
38+
39+
40+
# -- Options for HTML output -------------------------------------------------
41+
42+
# The theme to use for HTML and HTML Help pages. See the documentation for
43+
# a list of builtin themes.
44+
#
45+
html_theme = "sphinx_rtd_theme"
46+
47+
# Add any paths that contain custom static files (such as style sheets) here,
48+
# relative to this directory. They are copied after the builtin static files,
49+
# so a file named "default.css" will overwrite the builtin "default.css".
50+
html_static_path = ["_static"]

docs/index.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. django-consent documentation master file, created by
2+
sphinx-quickstart on Thu Mar 18 00:07:22 2021.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
.. include:: ../README.rst
7+
8+
.. toctree::
9+
:maxdepth: 2
10+
:caption: Contents:
11+
12+
13+
Indices and tables
14+
==================
15+
16+
* :ref:`genindex`
17+
* :ref:`modindex`
18+
* :ref:`search`

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=.
11+
set BUILDDIR=_build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ install_requires =
3939
[options.extras_require]
4040
test = pytest; pytest-django; pytest-cov; coverage; codecov
4141
develop = tox; coverage; pytest; pre-commit
42+
docs = sphinx; sphinx-rtd-theme
4243

4344
[options.packages.find]
4445
where =

0 commit comments

Comments
 (0)