X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sphinx%2Fconf.py;h=aefd155932202c732107e9097312204cd73c5542;hb=8cd349ebdaba3b0c0e90df76172f111ed62830c6;hp=d850bb2a91e5684898f4ac8e0e2d4d7e639d8796;hpb=e21c44a50e6f32ddf033641819960b305bd70b32;p=neurodebian.git diff --git a/sphinx/conf.py b/sphinx/conf.py index d850bb2..aefd155 100644 --- a/sphinx/conf.py +++ b/sphinx/conf.py @@ -21,15 +21,37 @@ import sys, os # absolute, like shown here. #sys.path.append(os.path.abspath('.')) +def artworkdir(): + """Look into every parent dir for 'artwork' and return its relative path.""" + level = 0 + while True: + target = os.path.join(*([os.path.pardir] * level + ['artwork'])) + if os.path.isdir(target): + return target + else: + level += 1 + # if there is no way up + if os.path.abspath(os.path.join(*([os.path.pardir] * level))) == \ + os.path.abspath(os.path.join(*([os.path.pardir] * (level + 1)))): + raise(ValueError, "Cannot find 'artwork'.") + + # General configuration # --------------------- # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = [] +#extensions = [] +sys.path.append(os.path.abspath('.')) +extensions = ['sphinxext.quote', + 'sphinxext.feed', + 'sphinx.ext.todo'] + +# show todo items +todo_include_todos = True # Add any paths that contain templates here, relative to this directory. -templates_path = ['.templates'] +templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' @@ -42,7 +64,7 @@ master_doc = 'index' # General information about the project. project = u'Debian Neuroscience Package Repository' -copyright = u'2009, Michael Hanke' +copyright = u'2009-2014, NeuroDebian Team ' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -53,9 +75,23 @@ version = '' # The full version, including alpha/beta/rc tags. release = '' +# Monkey patch "English" language regular expression so we could +# search for package names as well +import re +word_re = re.compile(r'[-.\w]+(?u)') + +import sphinx.search +# older versions (before 1.1.3, 1.0.7 for sure) had no language +# customizations +if hasattr(sphinx.search, 'word_re'): + sphinx.search.word_re = word_re +else: + from sphinx.search.en import SearchEnglish + SearchEnglish._word_re = word_re + # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -#language = None +language = 'en' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -94,7 +130,16 @@ pygments_style = 'sphinx' # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths # given in html_static_path. -html_style = 'default.css' +html_style = 'neurodebian.css' + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# 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 = {'nosidebar': True} # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". @@ -105,17 +150,17 @@ html_title = project # The name of an image file (relative to this directory) to place at the top # of the sidebar. -html_logo = 'pics/debian-imaging.jpg' +html_logo = os.path.join(artworkdir(), 'logo_tuned/fmri_w200.png') # 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 +html_favicon = 'favicon.ico' # 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'] +html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. @@ -136,7 +181,7 @@ html_static_path = ['static'] html_use_modindex = False # If false, no index is generated. -#html_use_index = True +html_use_index = False # If true, the index is split into individual pages for each letter. #html_split_index = False @@ -188,3 +233,16 @@ latex_documents = [ # If false, no module index is generated. #latex_use_modindex = True + +# RSS feed +# -------- +feed_base_url = 'http://neuro.debian.net' +feed_title = "NeuroDebian Insider" +feed_subtitle = "This solves all your problems" +feed_description = "A blog about using the ultimate operating system in neuroscience research" +feed_variants = {'planetdebian': {'filename': 'feeds/for-debian-planet.xml', + 'tag': 'debian'}, + 'all': {'filename': 'feeds/blog.xml', 'tag': None}} +feed_categories = ['debian', 'neuroscience'] +feed_author_name = 'NeuroDebian team' +feed_author_email = 'team@neuro.debian.net'