Include readme and changelog in docs Fixes #12

This commit is contained in:
Thomas Grainger 2015-09-21 22:10:24 +01:00
parent 70afcc34be
commit b717f06d98
3 changed files with 23 additions and 7 deletions

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from pkg_resources import get_distribution
__version__ = '1.0-dev'
__version__ = get_distribution('django-babel').version

View File

@ -16,6 +16,14 @@
import sys
import os
import django_babel
def _short_version(release):
parts = release.split('.')
return '.'.join(parts[:2])
# 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.
@ -30,7 +38,11 @@ import os
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
]
# Add any paths that contain templates here, relative to this directory.
@ -52,11 +64,11 @@ copyright = '2014, Christopher Grebs'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.3.4'
# The full version, including alpha/beta/rc tags.
release = '0.3.4'
release = django_babel.__version__
# The short X.Y version.
version = _short_version(release)
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -261,4 +273,4 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
intersphinx_mapping = {'https://docs.python.org/': None}

View File

@ -3,9 +3,13 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
========================================
Welcome to django-babel's documentation!
========================================
.. include:: ../README.rst
.. include:: ../CHANGELOG.rst
Contents:
.. toctree::
@ -19,4 +23,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`