From 469c531ae4fbc9f8093b3f50607755e3d43e3e26 Mon Sep 17 00:00:00 2001 From: Axel Haustant Date: Wed, 27 Mar 2013 09:16:19 +0100 Subject: [PATCH] Include version in doc and warn if it's a dev version. --- docs/conf.py | 16 ++++++++++++---- docs/index.rst | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 40de84c7..84531182 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,18 +4,26 @@ import sys, os sys.path.append(os.path.abspath(os.pardir)) -from pelican import __version__, __major__ +from pelican import __version__, __major__, __minor__ # -- General configuration ----------------------------------------------------- templates_path = ['_templates'] -extensions = ['sphinx.ext.autodoc',] +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.ifconfig', 'sphinx.ext.extlinks'] source_suffix = '.rst' master_doc = 'index' project = 'Pelican' copyright = '2010, Alexis Metaireau and contributors' exclude_patterns = ['_build'] -version = __version__ -release = __major__ +version = '%s.%s' % (__major__, __minor__) +release = __version__ +last_stable = '3.1.1' +rst_prolog = ''' +.. |last_stable| replace:: :pelican-doc:`{0}` +'''.format(last_stable) + +extlinks = { + 'pelican-doc': ('http://docs.getpelican.com/%s/', '') +} # -- Options for HTML output --------------------------------------------------- diff --git a/docs/index.rst b/docs/index.rst index 914c2a7e..eb8883ce 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,14 @@ -Pelican -======= +Pelican |release| +================= + + +.. ifconfig:: release.endswith('.dev') + + .. warning:: + + This documentation is for the version of Pelican currently under development. + Were you looking for version |last_stable| documentation? + Pelican is a static site generator, written in Python_. @@ -12,7 +21,7 @@ Pelican is a static site generator, written in Python_. Features -------- -Pelican currently supports: +Pelican |version| currently supports: * Articles (e.g., blog posts) and pages (e.g., "About", "Projects", "Contact") * Comments, via an external service (Disqus). (Please note that while