Permalink
Browse files

Merge pull request #8 from adroullier/master

Support for canonical urls
  • Loading branch information...
2 parents a181b85 + 09e15a0 commit cb62403ebb146166d3e549aaa006848bc72ca70f @blaflamme blaflamme committed Aug 17, 2013
Showing with 18 additions and 0 deletions.
  1. +3 −0 CHANGES.txt
  2. +1 −0 CONTRIBUTORS.txt
  3. +8 −0 README.rst
  4. +4 −0 pylons/layout.html
  5. +1 −0 pylons/theme.conf
  6. +1 −0 pyramid/theme.conf
View
@@ -1 +1,4 @@
+- Added canonical url configuration for google search engine optimization.
+ See README.txt
+
- Fixed Pyramid favicon border transparency.
View
@@ -109,3 +109,4 @@ Contributors
- Blaise Laflamme, 2010/11/09
- Ben Hohner, 2013/08/10
- Steve Piercy, 2013/08/10
+- Arndt Droullier, 2013/08/17
View
@@ -14,6 +14,14 @@ To use a theme in your Sphinx documentation, follow this guide:
html_theme_path = ['_themes']
html_theme = 'pylons'
+3. (optional) set a canonical root url in conf.py::
+
+ html_theme_options = dict(
+ canonical_url='http://the_root_domain/latest/docs/'
+ )
+
+The url points to the root of the documentation. Requires a trailing slash.
+
The following themes exist:
- **pylons** - the generic Pylons Project documentation theme
View
@@ -9,6 +9,10 @@
{%- if theme_favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/'+theme_favicon, 1) }}"/>
{%- endif %}
+
+{%- if theme_canonical_url %}
+<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
+{%- endif %}
{% endblock %}
{% block header %}
View
@@ -12,3 +12,4 @@ in_progress = false
outdated = false
github_url =
latest_url =
+canonical_url =
View
@@ -8,3 +8,4 @@ in_progress = false
outdated = false
latest_url = http://docs.pylonsproject.org/projects/pyramid/en/latest/
github_url = https://github.com/Pylons/pyramid/
+canonical_url =

0 comments on commit cb62403

Please sign in to comment.