Skip to content

Commit 8066970

Browse files
committed
Added stub .rst files for most of the API; modified conf.py so Sphinx can setup the Django environment before importing; cleaned up and formatted existing .rst docs a little
1 parent abce60b commit 8066970

11 files changed

+189
-14
lines changed

docs/api/bookmarks.rst

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
:mod:`bookmarks`
2+
================
3+
4+
:mod:`bookmarks.admin`
5+
----------------------------------
6+
.. automodule:: bookmarks.admin
7+
:members:
8+
9+
:mod:`bookmarks.models`
10+
----------------------------------
11+
.. automodule:: bookmarks.models
12+
:members:
13+
14+
:mod:`bookmarks.urls`
15+
----------------------------------
16+
.. automodule:: bookmarks.urls
17+
:members:
18+
19+
:mod:`bookmarks.views`
20+
----------------------------------
21+
.. automodule:: bookmarks.views
22+
:members:
23+
24+

docs/api/builds.rst

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
:mod:`builds`
2+
=============
3+
4+
:mod:`builds.admin`
5+
----------------------------------
6+
.. automodule:: builds.admin
7+
:members:
8+
9+
:mod:`builds.models`
10+
----------------------------------
11+
.. automodule:: builds.models
12+
:members:
13+
14+
:mod:`builds.urls`
15+
----------------------------------
16+
.. automodule:: builds.urls
17+
:members:
18+
19+
:mod:`builds.views`
20+
----------------------------------
21+
.. automodule:: builds.views
22+
:members:
23+

docs/api/core.rst

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
:mod:`core`
2+
===========
3+
4+
:mod:`core.admin`
5+
----------------------------------
6+
.. automodule:: core.admin
7+
:members:
8+
9+
:mod:`core.forms`
10+
----------------------------------
11+
.. automodule:: core.forms
12+
:members:
13+
14+
:mod:`core.middleware`
15+
----------------------------------
16+
.. automodule:: core.middleware
17+
:members:
18+
19+
:mod:`core.models`
20+
----------------------------------
21+
.. automodule:: core.models
22+
:members:
23+
24+
:mod:`core.search_sites`
25+
----------------------------------
26+
.. automodule:: core.search_sites
27+
:members:
28+
29+
:mod:`core.views`
30+
----------------------------------
31+
.. automodule:: core.views
32+
:members:
33+

docs/api/index.rst

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
API
2+
===
3+
4+
.. toctree::
5+
6+
bookmarks
7+
builds
8+
core
9+
projects
10+
watching
11+

docs/api/projects.rst

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
:mod:`projects`
2+
===============
3+
4+
:mod:`projects.admin`
5+
----------------------------------
6+
.. automodule:: projects.admin
7+
:members:
8+
9+
:mod:`projects.constants`
10+
----------------------------------
11+
.. automodule:: projects.constants
12+
:members:
13+
14+
:mod:`projects.forms`
15+
----------------------------------
16+
.. automodule:: projects.forms
17+
:members:
18+
19+
:mod:`projects.models`
20+
----------------------------------
21+
.. automodule:: projects.models
22+
:members:
23+
24+
:mod:`projects.search_indexes`
25+
----------------------------------
26+
.. automodule:: projects.search_indexes
27+
:members:
28+
29+
:mod:`projects.tasks`
30+
----------------------------------
31+
.. automodule:: projects.tasks
32+
:members:
33+
34+
:mod:`projects.utils`
35+
----------------------------------
36+
.. automodule:: projects.utils
37+
:members:
38+

docs/api/watching.rst

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
:mod:`watching`
2+
===============
3+
4+
:mod:`watching.admin`
5+
----------------------------------
6+
.. automodule:: watching.admin
7+
:members:
8+
9+
:mod:`watching.models`
10+
----------------------------------
11+
.. automodule:: watching.models
12+
:members:
13+
14+
:mod:`watching.urls`
15+
----------------------------------
16+
.. automodule:: watching.urls
17+
:members:
18+
19+
:mod:`watching.views`
20+
----------------------------------
21+
.. automodule:: watching.views
22+
:members:
23+
24+

docs/conf.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@
1616
# If extensions (or modules to document with autodoc) are in another directory,
1717
# add these directories to sys.path here. If the directory is relative to the
1818
# documentation root, use os.path.abspath to make it absolute, like shown here.
19-
#sys.path.insert(0, os.path.abspath('.'))
19+
sys.path.insert(0, os.path.abspath('..'))
20+
21+
# Set up the Django environment so Sphinx can autodocument its modules
22+
import settings.sqlite
23+
from django.core.management import setup_environ
24+
setup_environ(settings.sqlite)
2025

2126
# -- General configuration -----------------------------------------------------
2227

@@ -25,7 +30,7 @@
2530

2631
# Add any Sphinx extension module names here, as strings. They can be extensions
2732
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28-
extensions = []
33+
extensions = ['sphinx.ext.autodoc']
2934

3035
# Add any paths that contain templates here, relative to this directory.
3136
templates_path = ['_templates']
@@ -67,7 +72,7 @@
6772
exclude_patterns = ['_build']
6873

6974
# The reST default role (used for this markup: `text`) to use for all documents.
70-
#default_role = None
75+
default_role = 'obj'
7176

7277
# If true, '()' will be appended to :func: etc. cross-reference text.
7378
#add_function_parentheses = True

docs/index.rst

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Welcome to Read The Docs's
77
==========================
88

99
This is a site devoted to the hosting of documentation for the open source
10-
community. It currently supports sphinx documentation, written in
10+
community. It currently supports sphinx documentation, written in
1111
`reStructuredText format <http://sphinx.pocoo.org/rest.html>`_. We can pull
1212
your existing docs if they're hosted on GitHub or Bitbucket, or you can
1313
create documentation using our reSt editor.
@@ -23,7 +23,10 @@ documentation! I hope you like it.
2323
Contents:
2424

2525
.. toctree::
26-
:maxdepth: 2
27-
:glob:
26+
:maxdepth: 2
27+
28+
install
29+
support
30+
webhooks
31+
api/index
2832

29-
*

docs/install.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ whenever you commit to your repo, effectively letting you 'set it and forget it'
8787
Caveats
8888
-------
8989

90-
We are auto-importing and generating conf.py files, so projects with special
90+
We are auto-importing and generating ``conf.py`` files, so projects with special
9191
extensions, themes, or templates won't work correctly. This is because of the
92-
possible of code execution within the python files. We are planing to support
93-
popular themes and white list projects that we trust to have these abilities.
92+
possibility of code execution within the python files. We are planning to support
93+
popular themes and white list users that we trust to have these abilities.
94+

docs/support.rst

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
Getting Help
22
=============
33

4-
The easiest way to get help with the project is to join the #rtd project on Freenode. We hang out there and you can get real-time help with your projects. The other good way is to open an issue on Github.
5-
4+
The easiest way to get help with the project is to join the ``#rtd`` channel on
5+
Freenode_. We hang out there and you can get real-time help with your projects.
6+
The other good way is to open an issue on Github_.
67

78
The email at [email protected] is also available for support.
9+
10+
.. _Freenode: irc://freenode.net/
11+
.. _Github: http://github.com/rtfd/readthedocs.org/issues
12+

docs/webhooks.rst

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
Webhooks
22
========
33

4-
Web hooks are pretty amazing, and help to turn the web into a push instead of pull platform. We have support for hitting a URL whenever you commit to your project and we will try and rebuild your docs. This only rebuilds them if something has changed, so it is cheap on the server side.
4+
Web hooks are pretty amazing, and help to turn the web into a push instead of
5+
pull platform. We have support for hitting a URL whenever you commit to your
6+
project and we will try and rebuild your docs. This only rebuilds them if
7+
something has changed, so it is cheap on the server side.
58

6-
As anyone who has worked with push knows, pushing a doc update to your repo and watching it get updated within seconds is an awesome feeling. If you're on github, simply put `http://readthedocs.org/github` as a post-commit hook on your project. Otherwise your project detail page has your post-commit hook on it. It will look something along the lines of `http://readthedocs.org/build/<pk>`
9+
As anyone who has worked with push knows, pushing a doc update to your repo and
10+
watching it get updated within seconds is an awesome feeling. If you're on
11+
github, simply put ``http://readthedocs.org/github`` as a post-commit hook on
12+
your project. Otherwise your project detail page has your post-commit hook on
13+
it. It will look something along the lines of
14+
``http://readthedocs.org/build/<pk>``
715

816

0 commit comments

Comments
 (0)