pelicanconf.py

Tue, 27 Feb 2018 23:36:39 +0100

author
David Douard <david.douard@logilab.fr>
date
Tue, 27 Feb 2018 23:36:39 +0100
changeset 83
8f5d4051eed6
parent 68
4fa6621fec0f
child 94
c5adcccbd4cf
permissions
-rw-r--r--

[eip545b] add images for new A203 unit

#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import socket
_isprod = socket.gethostname() == 'sd-56079'

AUTHOR = u'David Douard'
SITENAME = u'Whatever'
SITESUBTITLE = u"A blog, sort of"
TWITTER_USERNAME = u'douardda'
CONTACTS = (('twitter', 'https://twitter.com/twttrAcc'),)

if _isprod:
    SITEURL = 'https://whatever.sdfa3.org'
    PIWIK = '''
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(["setDomains", ["*.whatever.sdfa3.org"]]);
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//piwik.sdfa3.org/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', 2]);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="//piwik.sdfa3.org/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
'''
else:
    SITEURL = ''
    PIWIK = ''

PATH = 'content'

THEME = 'theme'
TIMEZONE = 'Europe/Paris'

DEFAULT_LANG = u'en'

# Feed generation is usually not desired when developing
#FEED_ALL_ATOM = None
#CATEGORY_FEED_ATOM = None
#TRANSLATION_FEED_ATOM = None
#AUTHOR_FEED_ATOM = None
#AUTHOR_FEED_RSS = None
FEED_RSS = 'feeds/rss.xml'
FEED_ALL_RSS = 'feeds/all.rss.xml'
FEED_ATOM = 'feeds/atom.xml'
FEED_ALL_ATOM = 'feeds/all.atom.xml'

# Blogroll
LINKS = (('Pelican', 'http://getpelican.com/'),
         ('Logilab.org', 'https://www.logilab.org/'),
         ('EEVBlog', 'https://www.eevblog.com/'),
         )

# Social widget
SOCIAL = (('twitter', 'https://twitter.com/douardda'))

DEFAULT_PAGINATION = 10

# Uncomment following line if you want document-relative URLs when developing
#RELATIVE_URLS = True

STATIC_PATHS = ['images', 'pdfs']

PLUGIN_PATHS = ['pelican-plugins', 
                'pelican-plugins/pelican_dailymotion', 
                ]
PLUGINS = ['better_figures_and_images',
           'sitemap',
           'feed_summary',
           'assets',
           'series',
           'related_posts',
           'filetime_from_hg',
           'pelican_dailymotion',
           'pelican_javascript',
           'wavedrom',
           ]
RESPONSIVE_IMAGES = True
TYPOGRIPFY = True
SINGLE_AUTHOR = True
MINT = True
SITEMAP = {'format': 'xml'}

mercurial