Add basic docs about custom installs.

rtd2
Eric Holscher 2013-01-29 15:07:38 -08:00
parent 700ed05238
commit 6258000aa7
3 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,39 @@
Customizing your install
========================
Read the Docs has a lot of :doc:`/settings` that help customize your install.
This document will outline some of the more useful ways that these can be combined.
Have a local settings file
--------------------------
If you put a file named ``local_settings.py`` in the ``readthedocs/settings`` directory, it will override settings available in the base install.
Adding your own logo
--------------------
This requires 2 parts of setup. First, you need to add a custom :setting:`TEMPLATE_DIRS` setting that points at your template overrides. Then, in those template overrides you have to insert your logo where the normal RTD logo goes.
Example ``local_settings.py``::
import os
# Directory that the project lives in, aka ../..
SITE_ROOT = '/'.join(os.path.dirname(__file__).split('/')[0:-2])
TEMPLATE_DIRS = (
"%s/var/custom_templates/" % SITE_ROOT, # Your custom template directory, before the RTD one to override it.
'%s/readthedocs/templates/' % SITE_ROOT, # Default RTD template dir
)
Example ``base.html`` in your template overrides::
{% extends "/home/docs/checkouts/readthedocs.org/readthedocs/templates/base.html" %}
{% load i18n %}
{% block branding %}{% trans "My sweet site" %} {% endblock %}
You can of course override any block in the template. If there is something that you would like to be able to customize, but isn't currently in a block, please `submit an issue`_.
.. _submit an issue: https://github.com/rtfd/readthedocs.org/issues?sort=created&state=open

View File

@ -0,0 +1,11 @@
Info about custom installs
==========================
Read the Docs is open source, which means you can run your own version of it. There are many reasons to do this, the main one being if you want a private instance. If you have to keep everything behind a firewall of VPN, this is for you.
.. toctree::
:maxdepth: 2
:glob:
customization

View File

@ -57,6 +57,13 @@ Developer Documentation
api
api/index
Custom install Documentation
----------------------------
.. toctree::
:maxdepth: 3
custom_installs/index
Operations Documentation
------------------------
.. toctree::