Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Added notice to documentation, pointing dev to stable versions and viceversa

Pablo Hoffmandb07a9a938e3
diff --git a/docs/_static/scrapydoc.css b/docs/_static/scrapydoc.css
index 3e58a5e70..9ec34edca 100644
--- a/docs/_static/scrapydoc.css
+++ b/docs/_static/scrapydoc.css
@@ -638,6 +638,19 @@ img.logo {
border: 0;
}
+.docversion {
+ padding-top: 5px;
+ padding-bottom: 5px;
+}
+
+.devdoc {
+ color: red;
+}
+
+.stabledoc {
+ color: #777;
+}
+
/* :::: PRINT :::: */
@media print {
div.document,
diff --git a/docs/_templates/page.html b/docs/_templates/page.html
new file mode 100644
index 000000000..7556ca191
--- /dev/null
+++ b/docs/_templates/page.html
@@ -0,0 +1,25 @@
+{% extends "layout.html" %}
+{% block body %}
+<div class="deck">
+
+ <div class="docversion">
+ {% if version == "0.11" %}
+ <p class="devdoc">
+ This document is for Scrapy's development version, which can be
+ significantly different from previous releases. Get old docs here:
+ <a href="http://doc.scrapy.org/0.10/{{ pagename }}{{ file_suffix }}">0.10</a>,
+ <a href="http://doc.scrapy.org/0.9/{{ pagename }}{{ file_suffix }}">0.9</a>.
+ <a href="http://doc.scrapy.org/0.8/{{ pagename }}{{ file_suffix }}">0.8</a>.
+ <a href="http://doc.scrapy.org/0.7/{{ pagename }}{{ file_suffix }}">0.7</a>.
+ </p>
+ {% else %}
+ <p class="stabledoc">
+ This document describes Scrapy {{ version }}. For development docs,
+ <a href="http://doc.scrapy.org/dev/{{ pagename }}{{ file_suffix }}">go here</a>.
+ </p>
+ {% endif %}
+ </div>
+
+</div>
+ {{ body }}
+{% endblock %}
diff --git a/docs/conf.py b/docs/conf.py
index 1ce11cde2..90823c0c2 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -42,7 +42,7 @@ master_doc = 'index'
# General information about the project.
project = u'Scrapy'
-copyright = u'2008-2010, Insophia'
+copyright = u'2008-2011, Insophia'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -51,12 +51,11 @@ copyright = u'2008-2010, Insophia'
# The short X.Y version.
try:
import scrapy
- version = scrapy.__version__
+ version = '.'.join(map(str, scrapy.version_info[:2]))
+ release = scrapy.__version__
except ImportError:
version = ''
-
-# The full version, including alpha/beta/rc tags.
-release = version
+ release = ''
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.