Tue, 28 Aug 2018 15:12:24 +0200
[prologix] minor improvments
0 | 1 | #!/usr/bin/env python |
2 | # -*- coding: utf-8 -*- # | |
3 | from __future__ import unicode_literals | |
40
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
4 | import socket |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
5 | _isprod = socket.gethostname() == 'sd-56079' |
0 | 6 | |
7 | AUTHOR = u'David Douard' | |
8 | SITENAME = u'Whatever' | |
34
871fcc94f63e
[config] add twitter stuff an links to eevblog and elo
David Douard <david.douard@logilab.fr>
parents:
26
diff
changeset
|
9 | SITESUBTITLE = u"A blog, sort of" |
871fcc94f63e
[config] add twitter stuff an links to eevblog and elo
David Douard <david.douard@logilab.fr>
parents:
26
diff
changeset
|
10 | TWITTER_USERNAME = u'douardda' |
36
9507107a1133
[theme] use a personalized bricks theme
David Douard <david.douard@logilab.fr>
parents:
34
diff
changeset
|
11 | CONTACTS = (('twitter', 'https://twitter.com/twttrAcc'),) |
40
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
12 | |
96
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
13 | |
40
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
14 | if _isprod: |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
15 | SITEURL = 'https://whatever.sdfa3.org' |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
16 | PIWIK = ''' |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
17 | <script type="text/javascript"> |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
18 | var _paq = _paq || []; |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
19 | _paq.push(["setDomains", ["*.whatever.sdfa3.org"]]); |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
20 | _paq.push(['trackPageView']); |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
21 | _paq.push(['enableLinkTracking']); |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
22 | (function() { |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
23 | var u="//piwik.sdfa3.org/"; |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
24 | _paq.push(['setTrackerUrl', u+'piwik.php']); |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
25 | _paq.push(['setSiteId', 2]); |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
26 | var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
27 | g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
28 | })(); |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
29 | </script> |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
30 | <noscript><p><img src="//piwik.sdfa3.org/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript> |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
31 | <!-- End Piwik Code --> |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
32 | ''' |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
33 | else: |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
34 | SITEURL = '' |
2a30ebfd851f
[base] add piwik js stuff
David Douard <david.douard@logilab.fr>
parents:
36
diff
changeset
|
35 | PIWIK = '' |
0 | 36 | |
37 | PATH = 'content' | |
38 | ||
36
9507107a1133
[theme] use a personalized bricks theme
David Douard <david.douard@logilab.fr>
parents:
34
diff
changeset
|
39 | THEME = 'theme' |
0 | 40 | TIMEZONE = 'Europe/Paris' |
41 | ||
42 | DEFAULT_LANG = u'en' | |
43 | ||
44 | # Feed generation is usually not desired when developing | |
26 | 45 | #FEED_ALL_ATOM = None |
46 | #CATEGORY_FEED_ATOM = None | |
47 | #TRANSLATION_FEED_ATOM = None | |
48 | #AUTHOR_FEED_ATOM = None | |
49 | #AUTHOR_FEED_RSS = None | |
50 | FEED_RSS = 'feeds/rss.xml' | |
51 | FEED_ALL_RSS = 'feeds/all.rss.xml' | |
36
9507107a1133
[theme] use a personalized bricks theme
David Douard <david.douard@logilab.fr>
parents:
34
diff
changeset
|
52 | FEED_ATOM = 'feeds/atom.xml' |
9507107a1133
[theme] use a personalized bricks theme
David Douard <david.douard@logilab.fr>
parents:
34
diff
changeset
|
53 | FEED_ALL_ATOM = 'feeds/all.atom.xml' |
0 | 54 | |
55 | # Blogroll | |
56 | LINKS = (('Pelican', 'http://getpelican.com/'), | |
34
871fcc94f63e
[config] add twitter stuff an links to eevblog and elo
David Douard <david.douard@logilab.fr>
parents:
26
diff
changeset
|
57 | ('Logilab.org', 'https://www.logilab.org/'), |
871fcc94f63e
[config] add twitter stuff an links to eevblog and elo
David Douard <david.douard@logilab.fr>
parents:
26
diff
changeset
|
58 | ('EEVBlog', 'https://www.eevblog.com/'), |
66 | 59 | ) |
0 | 60 | |
61 | # Social widget | |
66 | 62 | SOCIAL = (('twitter', 'https://twitter.com/douardda')) |
0 | 63 | |
64 | DEFAULT_PAGINATION = 10 | |
65 | ||
66 | # Uncomment following line if you want document-relative URLs when developing | |
67 | #RELATIVE_URLS = True | |
24
89689c6e9cf4
[hp8904a] add two blogs about the HP8904A and a small update of the about page
David Douard <david.douard@logilab.fr>
parents:
0
diff
changeset
|
68 | |
101
4a94e81bff74
[hp8662a] part 3: fixing error 04 and unlocked loops
David Douard <david.douard@logilab.fr>
parents:
96
diff
changeset
|
69 | STATIC_PATHS = ['images', 'pdfs', 'json'] |
24
89689c6e9cf4
[hp8904a] add two blogs about the HP8904A and a small update of the about page
David Douard <david.douard@logilab.fr>
parents:
0
diff
changeset
|
70 | |
101
4a94e81bff74
[hp8662a] part 3: fixing error 04 and unlocked loops
David Douard <david.douard@logilab.fr>
parents:
96
diff
changeset
|
71 | PLUGIN_PATHS = ['pelican-plugins', |
108
08c0c0d695e8
[hp34970] replace dailymotion by peertube for embedded video
David Douard <david.douard@logilab.fr>
parents:
101
diff
changeset
|
72 | 'pelican-plugins/pelican-peertube', |
68
4fa6621fec0f
[hp34970a] an article dedicted to the protocol
David Douard <david.douard@logilab.fr>
parents:
66
diff
changeset
|
73 | ] |
36
9507107a1133
[theme] use a personalized bricks theme
David Douard <david.douard@logilab.fr>
parents:
34
diff
changeset
|
74 | PLUGINS = ['better_figures_and_images', |
9507107a1133
[theme] use a personalized bricks theme
David Douard <david.douard@logilab.fr>
parents:
34
diff
changeset
|
75 | 'sitemap', |
9507107a1133
[theme] use a personalized bricks theme
David Douard <david.douard@logilab.fr>
parents:
34
diff
changeset
|
76 | 'feed_summary', |
94
c5adcccbd4cf
[conf] disable the assets plugin
David Douard <david.douard@logilab.fr>
parents:
68
diff
changeset
|
77 | #'assets', |
36
9507107a1133
[theme] use a personalized bricks theme
David Douard <david.douard@logilab.fr>
parents:
34
diff
changeset
|
78 | 'series', |
9507107a1133
[theme] use a personalized bricks theme
David Douard <david.douard@logilab.fr>
parents:
34
diff
changeset
|
79 | 'related_posts', |
41
376692051823
[config] activate the filetime_from_hg plugin
David Douard <david.douard@logilab.fr>
parents:
40
diff
changeset
|
80 | 'filetime_from_hg', |
108
08c0c0d695e8
[hp34970] replace dailymotion by peertube for embedded video
David Douard <david.douard@logilab.fr>
parents:
101
diff
changeset
|
81 | 'pelican_peertube', |
68
4fa6621fec0f
[hp34970a] an article dedicted to the protocol
David Douard <david.douard@logilab.fr>
parents:
66
diff
changeset
|
82 | 'pelican_javascript', |
4fa6621fec0f
[hp34970a] an article dedicted to the protocol
David Douard <david.douard@logilab.fr>
parents:
66
diff
changeset
|
83 | 'wavedrom', |
101
4a94e81bff74
[hp8662a] part 3: fixing error 04 and unlocked loops
David Douard <david.douard@logilab.fr>
parents:
96
diff
changeset
|
84 | 'plotly', |
96
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
85 | 'image_process', |
66 | 86 | ] |
24
89689c6e9cf4
[hp8904a] add two blogs about the HP8904A and a small update of the about page
David Douard <david.douard@logilab.fr>
parents:
0
diff
changeset
|
87 | RESPONSIVE_IMAGES = True |
34
871fcc94f63e
[config] add twitter stuff an links to eevblog and elo
David Douard <david.douard@logilab.fr>
parents:
26
diff
changeset
|
88 | TYPOGRIPFY = True |
36
9507107a1133
[theme] use a personalized bricks theme
David Douard <david.douard@logilab.fr>
parents:
34
diff
changeset
|
89 | SINGLE_AUTHOR = True |
66 | 90 | MINT = True |
36
9507107a1133
[theme] use a personalized bricks theme
David Douard <david.douard@logilab.fr>
parents:
34
diff
changeset
|
91 | SITEMAP = {'format': 'xml'} |
96
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
92 | |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
93 | IMAGE_PROCESS = { |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
94 | 'crisp': {'type': 'responsive-image', |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
95 | 'srcset': [('1x', ['scale_in 800 600 True']), |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
96 | ('2x', ['scale_in 1600 1200 True']), |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
97 | ('3x', ['scale_in 3200 2400 True']), |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
98 | ], |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
99 | 'default': '1x', |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
100 | }, |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
101 | 'large-photo': {'type': 'responsive-image', |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
102 | 'sizes': '(min-width: 1200px) 800px, (min-width: 992px) 650px, \ |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
103 | (min-width: 768px) 718px, 100vw', |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
104 | 'srcset': [('600w', ["scale_in 600 450 True"]), |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
105 | ('800w', ["scale_in 800 600 True"]), |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
106 | ('1600w', ["scale_in 1600 1200 True"]), |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
107 | ], |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
108 | 'default': '800w', |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
109 | }, |
11b306ba3468
[conf] attempt to use image_process plugin
David Douard <david.douard@logilab.fr>
parents:
94
diff
changeset
|
110 | } |
108
08c0c0d695e8
[hp34970] replace dailymotion by peertube for embedded video
David Douard <david.douard@logilab.fr>
parents:
101
diff
changeset
|
111 | |
08c0c0d695e8
[hp34970] replace dailymotion by peertube for embedded video
David Douard <david.douard@logilab.fr>
parents:
101
diff
changeset
|
112 | PEERTUBE_URL = "https://peertube.social" |
08c0c0d695e8
[hp34970] replace dailymotion by peertube for embedded video
David Douard <david.douard@logilab.fr>
parents:
101
diff
changeset
|
113 |