Added canonical link elements to all pages; new variable 'page.sitehost'

This commit is contained in:
Thomas Jensen 2014-12-25 19:39:38 +01:00
parent 965dad27f8
commit f90bd77934
3 changed files with 7 additions and 2 deletions

View File

@ -49,3 +49,4 @@ defaults:
path: "" # everywhere
values:
bxemail: '<boxes(at)thomasjensen.com>'
sitehost: 'boxes.thomasjensen.com'

View File

@ -12,8 +12,12 @@
<meta name="author" content="Thomas Jensen" />
<meta name="robots" content="index,follow" />
{% if page.sedesc %}
<!-- start page -->
<meta name="description" content="{{ page.sedesc }}" />
<meta name="keywords" content="software, ascii, ascii art, filter, command line, box, boxes, box drawing" />
<link rel="canonical" href="http://{{ page.sitehost }}/" />
{% else %}
<link rel="canonical" href="http://{{ page.sitehost }}{{ page.url }}" />
{% endif %}
<script type="text/javascript">
if (window.location.hostname == "ascii-boxes.github.io") {
@ -25,7 +29,7 @@
else if (targetPath.indexOf(prjNamePrefix + "/") == 0) {
targetPath = targetPath.substring(prjNamePrefix.length);
}
window.location = window.location.protocol + "//boxes.thomasjensen.com"
window.location = window.location.protocol + "//{{ page.sitehost }}"
+ targetPath + window.location.hash;
}
</script>

View File

@ -429,7 +429,7 @@ self-explanatory, though.
<I>Boxes</I>
is available from its website at
<A HREF="http://boxes.thomasjensen.com/">http://boxes.thomasjensen.com/</A>.
<A HREF="http://{{ page.sitehost }}/">http://{{ page.sitehost }}/</A>.
The website also features a number
of examples illustrating this manual page as well as more in-depth
documentation.