# -*- coding: utf-8 -*-
#
# Let's Encrypt documentation build configuration file, created by
# sphinx-quickstart on Sun Nov 23 20:35:21 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import codecs
import os
import re
import sys

import mock


# http://docs.readthedocs.org/en/latest/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules
# c.f. #262
sys.modules.update(
    (mod_name, mock.MagicMock()) for mod_name in ['augeas', 'M2Crypto'])

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

# read version number (and other metadata) from package init
init_fn = os.path.join(here, '..', 'letsencrypt', '__init__.py')
with codecs.open(init_fn, encoding='utf8') as fd:
    meta = dict(re.findall(r"""__([a-z]+)__ = "([^"]+)""", fd.read()))

# 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.
sys.path.insert(0, os.path.abspath(os.path.join(here, '..')))

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

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.intersphinx',
    'sphinx.ext.todo',
    'sphinx.ext.coverage',
    'sphinx.ext.viewcode',
    'repoze.sphinx.autointerface',
]

autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.rst'

# The encoding of source files.
#source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'Let\'s Encrypt'
copyright = u'2014, Let\'s Encrypt Project'

# 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 = '.'.join(meta['version'].split('.')[:2])
# The full version, including alpha/beta/rc tags.
release = meta['version']

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']

# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None

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

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []

# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False


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

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.

# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
# on_rtd is whether we are on readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd:  # only import and set the theme if we're building docs locally
    import sphinx_rtd_theme
    html_theme = 'sphinx_rtd_theme'
    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# otherwise, readthedocs.org uses their theme by default, so no need to specify it

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []

# The name for this set of Sphinx documents.  If None, it defaults to
# "<project> v<release> documentation".
#html_title = None

# A shorter title for the navigation bar.  Default is the same as html_title.
#html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}

# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}

# If false, no module index is generated.
#html_domain_indices = True

# If false, no index is generated.
#html_use_index = True

# If true, the index is split into individual pages for each letter.
#html_split_index = False

# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it.  The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''

# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None

# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
#html_search_language = 'en'

# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}

# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = 'LetsEncryptdoc'

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

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#'preamble': '',

# Latex figure (float) alignment
#'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
#  author, documentclass [howto, manual, or own class]).
latex_documents = [
  ('index', 'LetsEncrypt.tex', u'Let\'s Encrypt Documentation',
   u'Let\'s Encrypt Project', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False

# If true, show page references after internal links.
#latex_show_pagerefs = False

# If true, show URL addresses after external links.
#latex_show_urls = False

# Documents to append as an appendix to all manuals.
#latex_appendices = []

# If false, no module index is generated.
#latex_domain_indices = True


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

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
    ('index', 'letsencrypt', u'Let\'s Encrypt Documentation',
     [u'Let\'s Encrypt Project'], 1)
]

# If true, show URL addresses after external links.
#man_show_urls = False


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
#  dir menu entry, description, category)
texinfo_documents = [
  ('index', 'LetsEncrypt', u'Let\'s Encrypt Documentation',
   u'Let\'s Encrypt Project', 'LetsEncrypt', 'One line description of project.',
   'Miscellaneous'),
]

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}

todo_include_todos = True

docs/conf.py
# -*- coding: utf-8 -*-
#
# Let's Encrypt documentation build configuration file, created by
# sphinx-quickstart on Sun Nov 23 20:35:21 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import codecs
import os
import re
import sys

import mock


# http://docs.readthedocs.org/en/latest/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules
# c.f. #262
sys.modules.update(
    (mod_name, mock.MagicMock()) for mod_name in ['augeas', 'M2Crypto'])

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

# read version number (and other metadata) from package init
init_fn = os.path.join(here, '..', 'letsencrypt', '__init__.py')
with codecs.open(init_fn, encoding='utf8') as fd:
    meta = dict(re.findall(r"""__([a-z]+)__ = "([^"]+)""", fd.read()))

# 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.
sys.path.insert(0, os.path.abspath(os.path.join(here, '..')))

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

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.intersphinx',
    'sphinx.ext.todo',
    'sphinx.ext.coverage',
    'sphinx.ext.viewcode',
    'repoze.sphinx.autointerface',
]

autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.rst'

# The encoding of source files.
#source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'Let\'s Encrypt'
copyright = u'2014, Let\'s Encrypt Project'

# 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 = '.'.join(meta['version'].split('.')[:2])
# The full version, including alpha/beta/rc tags.
release = meta['version']

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']

# The reST default role (used for this markup: `text`) to use for all
# documents.
default_role = 'py:obj'

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

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []

# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False


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

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.

# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
# on_rtd is whether we are on readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd:  # only import and set the theme if we're building docs locally
    import sphinx_rtd_theme
    html_theme = 'sphinx_rtd_theme'
    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# otherwise, readthedocs.org uses their theme by default, so no need to specify it

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []

# The name for this set of Sphinx documents.  If None, it defaults to
# "<project> v<release> documentation".
#html_title = None

# A shorter title for the navigation bar.  Default is the same as html_title.
#html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}

# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}

# If false, no module index is generated.
#html_domain_indices = True

# If false, no index is generated.
#html_use_index = True

# If true, the index is split into individual pages for each letter.
#html_split_index = False

# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it.  The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''

# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None

# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
#html_search_language = 'en'

# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}

# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = 'LetsEncryptdoc'

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

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#'preamble': '',

# Latex figure (float) alignment
#'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
#  author, documentclass [howto, manual, or own class]).
latex_documents = [
  ('index', 'LetsEncrypt.tex', u'Let\'s Encrypt Documentation',
   u'Let\'s Encrypt Project', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False

# If true, show page references after internal links.
#latex_show_pagerefs = False

# If true, show URL addresses after external links.
#latex_show_urls = False

# Documents to append as an appendix to all manuals.
#latex_appendices = []

# If false, no module index is generated.
#latex_domain_indices = True


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

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
    ('index', 'letsencrypt', u'Let\'s Encrypt Documentation',
     [u'Let\'s Encrypt Project'], 1)
]

# If true, show URL addresses after external links.
#man_show_urls = False


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
#  dir menu entry, description, category)
texinfo_documents = [
  ('index', 'LetsEncrypt', u'Let\'s Encrypt Documentation',
   u'Let\'s Encrypt Project', 'LetsEncrypt', 'One line description of project.',
   'Miscellaneous'),
]

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}

todo_include_todos = True

docs/conf.py
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000000..bf19b18e1b0
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,18 @@
+<!---
+
+This file serves as an entry point for GitHub's Contributing
+Guidelines [1] only.
+
+GitHub doesn't render rST very well, especially in respect to internal
+hyperlink targets and cross-references [2]. People also tend to
+confuse rST and Markdown syntax. Therefore, instead of keeping the
+contents here (and including from rST documentation under doc/), link
+to the Sphinx generated docs is provided below.
+
+
+[1] https://github.com/blog/1184-contributing-guidelines
+[2] http://docutils.sourceforge.net/docs/user/rst/quickref.html#hyperlink-targets
+
+-->
+
+https://letsencrypt.readthedocs.org/en/latest/contributing.html
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
deleted file mode 100644
index 654d5569bda..00000000000
--- a/CONTRIBUTING.rst
+++ /dev/null
@@ -1,151 +0,0 @@
-.. _hacking:
-
-Hacking
-=======
-
-In order to start hacking, you will first have to create a development
-environment. Start by `installing dependencies and setting up Let's Encrypt`_.
-
-Now you can install the development packages:
-
-::
-
-    ./venv/bin/python setup.py dev
-
-The code base, including your pull requests, **must** have 100% test statement
-coverage **and** be compliant with the coding-style_.
-
-The following tools are there to help you:
-
-- ``./venv/bin/tox`` starts a full set of tests. Please make sure you
-  run it before submitting a new pull request.
-
-- ``./venv/bin/tox -e cover`` checks the test coverage only.
-
-- ``./venv/bin/tox -e lint`` checks the style of the whole project,
-  while ``./venv/bin/pylint --rcfile=.pylintrc file`` will check a single `file` only.
-
-.. _installing dependencies and setting up Let's Encrypt: https://letsencrypt.readthedocs.org/en/latest/using.html
-
-CODE COMPONENTS AND LAYOUT
-==========================
-
-letsencrypt/acme - contains all protocol specific code
-letsencrypt/client - all client code
-letsencrypt/scripts - just the starting point of the code, main.py
-
-Plugin-architecture
--------------------
-
-Let's Encrypt has a plugin architecture to facilitate support for different
-webservers, other TLS servers, and operating systems.
-
-The most common kind of plugin is a "Configurator", which is likely to
-implement the "Authenticator" and "Installer" interfaces (though some
-Configurators may implement just one of those).
-
-Defined here:
-https://github.com/letsencrypt/lets-encrypt-preview/blob/master/letsencrypt/client/interfaces.py
-
-There are also "Display" plugins, which implement bindings to alternative UI
-libraries.
-
-Authenticators
---------------
-
-Authenticators are plugins designed to solve challenges received from the
-ACME server. From the protocol, there are essentially two different types
-of challenges. Challenges that must be solved by individual plugins in
-order to satisfy domain validation (dvsni, simpleHttps, dns) and client
-specific challenges (recoveryToken, recoveryContact, pop). Client specific
-challenges are always handled by the "Authenticator"
-client_authenticator.py. Right now we have two DV Authenticators,
-apache/configurator.py and the standalone_authenticator.py. The Standalone
-and Apache authenticators only solve the DVSNI challenge currently. (You
-can set which challenges your authenticator can handle through the
-get_chall_pref(domain) function)
-
-(FYI: We also have a partial implementation for a dns_authenticator in a
-separate branch).
-
-Challenge types are defined here...
-(
-https://github.com/letsencrypt/lets-encrypt-preview/blob/master/letsencrypt/client/constants.py#L16
-)
-
-Installer
----------
-
-Installers classes exist to actually setup the certificate and be able
-to enhance the configuration. (Turn on HSTS, redirect to HTTPS, etc). You
-can indicate your abilities through the supported_enhancements call. We
-currently only have one Installer written (still developing),
-apache/configurator.py
-
-Installers and Authenticators will oftentimes be the same class/object.
-Installers and Authenticators are kept separate because it should be
-possible to use the standalone_authenticator (it sets up its own Python
-server to perform challenges) with a program that cannot solve challenges
-itself. (I am imagining MTA installers).
-
-*Display* - we currently offer a pythondialog and "text" mode for
-displays. I have rewritten the interface which should be merged within the
-next day (the rewrite is in the revoker branch of the repo and should be
-merged within the next day)
-
-Here is what the display interface will look like
-https://github.com/letsencrypt/lets-encrypt-preview/blob/revoker/letsencrypt/client/interfaces.py#L217
-
-Augeus
-------
-
-Some plugins, especially those designed to reconfigure UNIX servers, can take
-inherit from the augeus_configurator.py class in order to more efficiently
-handle common operations on UNIX server configuration files.
-
-
-.. _coding-style:
-Coding style
-============
-
-Please:
-
-1. **Be consistent with the rest of the code**.
-
-2. Read `PEP 8 - Style Guide for Python Code`_.
-
-3. Follow the `Google Python Style Guide`_, with the exception that we
-   use `Sphinx-style`_ documentation:
-
-    ::
-
-        def foo(arg):
-            """Short description.
-
-            :param int arg: Some number.
-
-            :returns: Argument
-            :rtype: int
-
-            """
-            return arg
-
-4. Remember to use ``./venv/bin/pylint``.
-
-.. _Google Python Style Guide: https://google-styleguide.googlecode.com/svn/trunk/pyguide.html
-.. _Sphinx-style: http://sphinx-doc.org/
-.. _PEP 8 - Style Guide for Python Code: https://www.python.org/dev/peps/pep-0008
-
-
-Updating the Documentation
-==========================
-
-In order to generate the Sphinx documentation, run the following commands.
-
-::
-
-    cd docs
-    make clean html SPHINXBUILD=../venv/bin/sphinx-build
-
-
-This should generate documentation in the ``docs/_build/html`` directory.
diff --git a/docs/conf.py b/docs/conf.py
index 6e2c484ca85..a6e5da4ff2e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -101,7 +101,7 @@
 
 # The reST default role (used for this markup: `text`) to use for all
 # documents.
-#default_role = None
+default_role = 'py:obj'
 
 # If true, '()' will be appended to :func: etc. cross-reference text.
 #add_function_parentheses = True
diff --git a/docs/contributing.rst b/docs/contributing.rst
new file mode 100644
index 00000000000..e3b81b3d43a
--- /dev/null
+++ b/docs/contributing.rst
@@ -0,0 +1,197 @@
+============
+Contributing
+============
+
+.. _hacking:
+
+Hacking
+=======
+
+In order to start hacking, you will first have to create a development
+environment. Start by :doc:`installing dependencies and setting up
+Let's Encrypt <using>`.
+
+Now you can install the development packages:
+
+.. code-block:: shell
+
+   ./venv/bin/python setup.py dev
+
+The code base, including your pull requests, **must** have 100% test
+statement coverage **and** be compliant with the :ref:`coding style
+<coding-style>`.
+
+The following tools are there to help you:
+
+- ``./venv/bin/tox`` starts a full set of tests. Please make sure you
+  run it before submitting a new pull request.
+
+- ``./venv/bin/tox -e cover`` checks the test coverage only.
+
+- ``./venv/bin/tox -e lint`` checks the style of the whole project,
+  while ``./venv/bin/pylint --rcfile=.pylintrc file`` will check a
+  single ``file`` only.
+
+.. _installing dependencies and setting up Let's Encrypt:
+  https://letsencrypt.readthedocs.org/en/latest/using.html
+
+
+Vagrant
+-------
+
+If you are a Vagrant user, Let's Encrypt comes with a Vagrantfile that
+automates setting up a development environment in an Ubuntu 14.04
+LTS VM. To set it up, simply run ``vagrant up``. The repository is
+synced to ``/vagrant``, so you can get started with:
+
+.. code-block:: shell
+
+  vagrant ssh
+  cd /vagrant
+  ./venv/bin/python setup.py install
+  sudo ./venv/bin/letsencrypt
+
+Support for other Linux distributions coming soon.
+
+.. note::
+   Unfortunately, Python distutils and, by extension, setup.py and
+   tox, use hard linking quite extensively. Hard linking is not
+   supported by the default sync filesystem in Vagrant. As a result,
+   all actions with these commands are *significantly slower* in
+   Vagrant. One potential fix is to `use NFS`_ (`related issue`_).
+
+.. _use NFS: http://docs.vagrantup.com/v2/synced-folders/nfs.html
+.. _related issue: https://github.com/ClusterHQ/flocker/issues/516
+
+
+Code components and layout
+==========================
+
+letsencrypt/acme
+  contains all protocol specific code
+letsencrypt/client
+  all client code
+letsencrypt/scripts
+  just the starting point of the code, main.py
+
+
+Plugin-architecture
+-------------------
+
+Let's Encrypt has a plugin architecture to facilitate support for
+different webservers, other TLS servers, and operating systems.
+
+The most common kind of plugin is a "Configurator", which is likely to
+implement the `~letsencrypt.client.interfaces.IAuthenticator` and
+`~letsencrypt.client.interfaces.IInstaller` interfaces (though some
+Configurators may implement just one of those).
+
+There are also `~letsencrypt.client.interfaces.IDisplay` plugins,
+which implement bindings to alternative UI libraries.
+
+
+Authenticators
+--------------
+
+Authenticators are plugins designed to solve challenges received from
+the ACME server. From the protocol, there are essentially two
+different types of challenges. Challenges that must be solved by
+individual plugins in order to satisfy domain validation (subclasses
+of `~.DVChallenge`, i.e. `~.challenges.DVSNI`,
+`~.challenges.SimpleHTTPS`, `~.challenges.DNS`) and client specific
+challenges (subclasses of `~.ClientChallenge`,
+i.e. `~.challenges.RecoveryToken`, `~.challenges.RecoveryContact`,
+`~.challenges.ProofOfPossession`). Client specific challenges are
+always handled by the `~.ClientAuthenticator`. Right now we have two
+DV Authenticators, `~.ApacheConfigurator` and the
+`~.StandaloneAuthenticator`. The Standalone and Apache authenticators
+only solve the `~.challenges.DVSNI` challenge currently. (You can set
+which challenges your authenticator can handle through the
+:meth:`~.IAuthenticator.get_chall_pref`.
+
+(FYI: We also have a partial implementation for a `~.DNSAuthenticator`
+in a separate branch).
+
+
+Installer
+---------
+
+Installers classes exist to actually setup the certificate and be able
+to enhance the configuration. (Turn on HSTS, redirect to HTTPS,
+etc). You can indicate your abilities through the
+:meth:`~.IInstaller.supported_enhancements` call. We currently only
+have one Installer written (still developing), `~.ApacheConfigurator`.
+
+Installers and Authenticators will oftentimes be the same
+class/object. Installers and Authenticators are kept separate because
+it should be possible to use the `~.StandaloneAuthenticator` (it sets
+up its own Python server to perform challenges) with a program that
+cannot solve challenges itself. (I am imagining MTA installers).
+
+
+Display
+~~~~~~~
+
+We currently offer a pythondialog and "text" mode for displays. I have
+rewritten the interface which should be merged within the next day
+(the rewrite is in the revoker branch of the repo and should be merged
+within the next day). Display plugins implement
+`~letsencrypt.client.interfaces.IDisplay` interface.
+
+
+Augeas
+------
+
+Some plugins, especially those designed to reconfigure UNIX servers,
+can take inherit from `~.AugeasConfigurator` class in order to more
+efficiently handle common operations on UNIX server configuration
+files.
+
+
+.. _coding-style:
+
+Coding style
+============
+
+Please:
+
+1. **Be consistent with the rest of the code**.
+
+2. Read `PEP 8 - Style Guide for Python Code`_.
+
+3. Follow the `Google Python Style Guide`_, with the exception that we
+   use `Sphinx-style`_ documentation::
+
+        def foo(arg):
+            """Short description.
+
+            :param int arg: Some number.
+
+            :returns: Argument
+            :rtype: int
+
+            """
+            return arg
+
+4. Remember to use ``./venv/bin/pylint``.
+
+.. _Google Python Style Guide:
+  https://google-styleguide.googlecode.com/svn/trunk/pyguide.html
+.. _Sphinx-style: http://sphinx-doc.org/
+.. _PEP 8 - Style Guide for Python Code:
+  https://www.python.org/dev/peps/pep-0008
+
+
+Updating the documentation
+==========================
+
+In order to generate the Sphinx documentation, run the following
+commands:
+
+.. code-block:: shell
+
+   cd docs
+   make clean html SPHINXBUILD=../venv/bin/sphinx-build
+
+This should generate documentation in the ``docs/_build/html``
+directory.
diff --git a/docs/index.rst b/docs/index.rst
index b290b223190..34615168ca1 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -6,7 +6,7 @@ Welcome to the Let's Encrypt client documentation!
 
    intro
    using
-   project
+   contributing
 
 .. toctree::
    :maxdepth: 1
diff --git a/docs/project.rst b/docs/project.rst
deleted file mode 100644
index 421f0b0624c..00000000000
--- a/docs/project.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-================================
-The Let's Encrypt Client Project
-================================
-
-.. include:: ../CONTRIBUTING.rst
diff --git a/docs/using.rst b/docs/using.rst
index 9b09833e4d3..362b75d81d2 100644
--- a/docs/using.rst
+++ b/docs/using.rst
@@ -21,30 +21,30 @@ In general:
 Ubuntu
 ------
 
-::
+.. code-block:: shell
 
-    sudo apt-get install python python-setuptools python-virtualenv python-dev \
-                 gcc swig dialog libaugeas0 libssl-dev libffi-dev \
-                 ca-certificates
+   sudo apt-get install python python-setuptools python-virtualenv python-dev \
+                        gcc swig dialog libaugeas0 libssl-dev libffi-dev \
+                        ca-certificates
 
 .. Please keep the above command in sync with .travis.yml (before_install)
 
 Mac OSX
 -------
 
-::
+.. code-block:: shell
 
-    sudo brew install augeas swig
+   sudo brew install augeas swig
 
 
 Installation
 ============
 
-::
+.. code-block:: shell
 
-    virtualenv --no-site-packages -p python2 venv
-    ./venv/bin/python setup.py install
-    sudo ./venv/bin/letsencrypt
+   virtualenv --no-site-packages -p python2 venv
+   ./venv/bin/python setup.py install
+   sudo ./venv/bin/letsencrypt
 
 
 Usage
@@ -52,7 +52,7 @@ Usage
 
 The letsencrypt commandline tool has a builtin help:
 
-::
+.. code-block:: shell
 
    ./venv/bin/letsencrypt --help
 

Lost Vagrant docs
ce2a6b7c5a3549ce5a1a04fb33d4254f78bd1b1f removed documentation for Vagrant in `CONTRIBUTING.rst`

