The git repo behind my blog.

pelicanconf.py 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*- #
  3. from __future__ import unicode_literals
  4. AUTHOR = 'Phyks'
  5. SITEURL = 'http://localhost/Blog/output'
  6. RELATIVE_URLS = True
  7. RELATIVE_SITEURL = '' if RELATIVE_URLS else SITEURL
  8. SITENAME = "Phyks' blog"
  9. SITETITLE = 'Phyks'
  10. SITESUBTITLE = 'I write about dev, FOSS, DIY and more, in French and English.'
  11. SITEDESCRIPTION = SITESUBTITLE
  12. SITELOGO = RELATIVE_SITEURL + '/images/profile.png'
  13. FAVICON = RELATIVE_SITEURL + '/images/favicon.ico'
  14. BROWSER_COLOR = '#333'
  15. PYGMENTS_STYLE = 'monokai'
  16. ROBOTS = 'index, follow'
  17. THEME = 'pelican-themes/Flex/'
  18. PATH = 'content'
  19. TIMEZONE = 'Europe/Paris'
  20. I18N_TEMPLATES_LANG = 'en'
  21. DEFAULT_LANG = 'en'
  22. OG_LOCALE = 'en_US.UTF-8'
  23. LOCALE = 'en_US.UTF-8'
  24. DATE_FORMATS = {
  25. 'en': '%B %d, %Y',
  26. 'fr': '%d %B %Y',
  27. }
  28. TYPOGRIFY = True
  29. ARTICLE_SAVE_AS = '{date:%Y}/{date:%m}/{slug}.html'
  30. ARTICLE_URL = ARTICLE_SAVE_AS
  31. ARTICLE_LANG_SAVE_AS = ARTICLE_SAVE_AS
  32. ARTICLE_LANG_URL = ARTICLE_LANG_SAVE_AS
  33. YEAR_ARCHIVE_SAVE_AS = '{date:%Y}/index.html'
  34. MONTH_ARCHIVE_SAVE_AS = '{date:%Y}/{date:%m}/index.html'
  35. # Feed generation is usually not desired when developing
  36. FEED_ALL_ATOM = 'feeds/all.atom.xml'
  37. CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
  38. TRANSLATION_FEED_ATOM = None
  39. AUTHOR_FEED_ATOM = None
  40. AUTHOR_FEED_RSS = None
  41. USE_FOLDER_AS_CATEGORY = False
  42. MAIN_MENU = True
  43. HOME_HIDE_TAGS = True
  44. # Blogroll
  45. LINKS = ()
  46. # Social widget
  47. SOCIAL = (('rss', FEED_ALL_ATOM),
  48. ('envelope-o', 'mailto:phyks+blog@phyks.me'),
  49. ('github', 'http://github.com/phyks/'),
  50. ('gitlab', 'https://git.phyks.me/phyks'))
  51. MENUITEMS = (('Bookmarks', 'https://links.phyks.me'),
  52. ('Tools', RELATIVE_SITEURL + '/pages/hosted-tools.html'),
  53. ('Archives', RELATIVE_SITEURL + '/archives.html'),
  54. ('Autohébergement', RELATIVE_SITEURL + '/pages/memo-autohebergement.html'))
  55. CC_LICENSE = {
  56. 'name': 'Creative Commons Attribution-NonCommercial-ShareAlike',
  57. 'version': '4.0',
  58. 'slug': 'by-nc-sa'
  59. }
  60. COPYRIGHT_YEAR = 2017
  61. DEFAULT_PAGINATION = 5
  62. STATIC_PATHS = ['images']
  63. PAGE_PATHS = ['pages']
  64. PLUGIN_PATHS = ['./pelican-plugins', './my-plugins']
  65. PLUGINS = ['i18n_subsites', 'sitemap', 'post_stats', 'deadlinks',
  66. 'french_typography', 'pelican_alias']
  67. JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}
  68. SITEMAP = {
  69. 'format': 'xml',
  70. 'priorities': {
  71. 'articles': 0.6,
  72. 'indexes': 0.6,
  73. 'pages': 0.5,
  74. },
  75. 'changefreqs': {
  76. 'articles': 'monthly',
  77. 'indexes': 'daily',
  78. 'pages': 'monthly',
  79. }
  80. }
  81. MARKDOWN = {
  82. 'extension_configs': {
  83. 'markdown.extensions.fenced_code': {},
  84. 'markdown.extensions.codehilite': {
  85. 'css_class': 'highlight'
  86. },
  87. 'markdown.extensions.tables': {},
  88. 'markdown.extensions.extra': {},
  89. 'markdown.extensions.meta': {},
  90. },
  91. 'output_format': 'html5',
  92. }
  93. HOST_FONTS = True
  94. HOST_CC_ICON = True