From 478dc2d0ce1c350dab7de28fbbdad5188f2e3bb5 Mon Sep 17 00:00:00 2001 From: "tom christie tom@tomchristie.com" Date: Tue, 1 Feb 2011 19:55:57 +0000 Subject: [PATCH] Fix up doc title & desc, fix repo link --- .hgignore | 2 +- README.txt | 2 +- docs/conf.py | 20 +++++++++----------- docs/index.rst | 7 ++++++- docs/templates/layout.html | 13 +++++++++++++ 5 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 docs/templates/layout.html diff --git a/.hgignore b/.hgignore index 3b9fa9fd3..170d72d98 100644 --- a/.hgignore +++ b/.hgignore @@ -4,7 +4,7 @@ syntax: glob *.db *~ env -docs-build +docs/build html examples/media/pygments/* examples/media/objectstore/* diff --git a/README.txt b/README.txt index 784713b6d..b79d76ae5 100644 --- a/README.txt +++ b/README.txt @@ -9,7 +9,7 @@ pip install -r requirements.txt # To build the documentation... pip install -r docs/requirements.txt -sphinx-build -c docs -b html -d docs-build docs html +sphinx-build -c docs -b html -d docs/build docs html # To run the examples... diff --git a/docs/conf.py b/docs/conf.py index 3689a6362..9a81e1b14 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -35,7 +35,7 @@ setup_environ(settings) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode'] # Add any paths that contain templates here, relative to this directory. -templates_path = [] +templates_path = ['templates'] # The suffix of source filenames. source_suffix = '.rst' @@ -111,7 +111,7 @@ html_theme = 'default' # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +html_title = "Django REST Framework" # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None @@ -172,7 +172,7 @@ html_static_path = [] #html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = 'restfulloggingdoc' +#htmlhelp_basename = '' # -- Options for LaTeX output -------------------------------------------------- @@ -185,10 +185,9 @@ htmlhelp_basename = 'restfulloggingdoc' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [ - ('index', 'restfullogging.tex', u'restful logging Documentation', - u'tom c', 'manual'), -] +#latex_documents = [ +# (), +#] # The name of an image file (relative to this directory) to place at the top of # the title page. @@ -217,7 +216,6 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'restfullogging', u'restful logging Documentation', - [u'tom c'], 1) -] +#man_pages = [ +# () +#] diff --git a/docs/index.rst b/docs/index.rst index 474788c0f..10f87a48a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,3 +1,8 @@ +.. meta:: + :description: A lightweight REST framework for Django. + :keywords: django, python, REST, RESTful + + Django REST framework ===================== @@ -29,7 +34,7 @@ Installation & Setup The django-rest-framework project is hosted as a `mercurial repository on bitbucket `_. To get a local copy of the repository use mercurial:: - hg clone https://tomchristie@bitbucket.org/tomchristie/django-rest-framework + hg clone https://bitbucket.org/tomchristie/django-rest-framework To add django-rest-framework to a django project: diff --git a/docs/templates/layout.html b/docs/templates/layout.html new file mode 100644 index 000000000..681266cc2 --- /dev/null +++ b/docs/templates/layout.html @@ -0,0 +1,13 @@ +{% extends "!layout.html" %} + +{%- if not embedded and docstitle %} + {%- set titleprefix = docstitle|e + " - "|safe %} +{%- else %} + {%- set titleprefix = "" %} +{%- endif %} + +{% block htmltitle %}{% if pagename == 'index' %}Django REST Framework{% else %}{{ titleprefix }}{{ title|striptags|e }}{% endif %}{% endblock %} +{% block extrahead %} +{{ super() }} +{% endblock %} +