css
javascript
html
python
makefile

pelicanconf.py 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*- #
  3. from __future__ import unicode_literals
  4. from pelican import __version__ as PELICAN_VERSION
  5. # Basic settings (http://docs.getpelican.com/en/stable/settings.html#basic-settings)
  6. DEFAULT_CATEGORY = 'Sin categoría'
  7. DELETE_OUTPUT_DIRECTORY = False
  8. DISPLAY_CATEGORIES_ON_MENU = True
  9. DISPLAY_PAGES_ON_MENU = True
  10. MARKDOWN = {
  11. 'extension_configs': {
  12. 'markdown.extensions.codehilite': {'css_class': 'highlight'},
  13. 'markdown.extensions.extra': {},
  14. 'markdown.extensions.footnotes': {'BACKLINK_TITLE': 'Volver a la nota %d en el texto'},
  15. 'markdown.extensions.meta': {},
  16. },
  17. 'output_format': 'html5',
  18. }
  19. # Fix issue with < and > characters (among others) being double-escaped
  20. # Bug report in markdown/extensions/codehilite.py → https://github.com/Python-Markdown/markdown/pull/726/files
  21. PATH = 'content'
  22. PLUGIN_PATHS = ['plugins']
  23. PLUGINS = ['another_read_more_link', 'i18n_subsites', 'neighbors', 'pelican-css', 'pelican-js', 'sitemap', 'tag-cloud', 'tipue-search']
  24. SITENAME = 'Conocimientos Libres'
  25. SITENAME_SINGLE = 'CL'
  26. SITEURL = 'https://conocimientoslibres.tuxfamily.org'
  27. # URL settings (http://docs.getpelican.com/en/stable/settings.html#url-settings)
  28. RELATIVE_URLS = True
  29. ARTICLE_URL = '{slug}/'
  30. ARTICLE_SAVE_AS = '{slug}/index.html'
  31. CATEGORY_URL = 'category/{slug}/'
  32. CATEGORY_SAVE_AS = 'category/{slug}/index.html'
  33. CATEGORIES_URL = 'categories/'
  34. CATEGORIES_SAVE_AS = 'categories/index.html'
  35. TAG_URL = 'tag/{slug}/'
  36. TAG_SAVE_AS = 'tag/{slug}/index.html'
  37. TAGS_URL = 'tags/'
  38. TAGS_SAVE_AS = 'tags/index.html'
  39. AUTHOR_URL = 'author/{slug}/'
  40. AUTHOR_SAVE_AS = 'author/{slug}/index.html'
  41. YEAR_ARCHIVE_SAVE_AS = 'archives/{date:%Y}/index.html'
  42. MONTH_ARCHIVE_SAVE_AS = 'archives/{date:%Y}/{date:%m}/index.html'
  43. AUTHORS_URL = 'pages/créditos/'
  44. AUTHORS_SAVE_AS = 'pages/créditos/index.html'
  45. ARCHIVES_URL = 'archives/'
  46. ARCHIVES_SAVE_AS = 'archives/index.html'
  47. STATIC_PATHS = ['asciicasts', 'heckyel_pub.asc', 'robots.txt', 'wp-content', 'vendor']
  48. PAGE_EXCLUDES = ['asciicasts', 'wp-content', 'vendor']
  49. ARTICLE_EXCLUDES = ['asciicasts', 'wp-content', 'vendor']
  50. # Time and date (http://docs.getpelican.com/en/stable/settings.html#time-and-date)
  51. TIMEZONE = 'Europe/Madrid'
  52. LOCALE = ('es_ES.UTF-8')
  53. # Feed settings (http://docs.getpelican.com/en/stable/settings.html#feed-settings)
  54. # feed generation is usually not desired when developing, set to true in publishconf.py
  55. FEED_ALL_ATOM = None
  56. CATEGORY_FEED_ATOM = None
  57. AUTHOR_FEED_ATOM = None
  58. AUTHOR_FEED_RSS = None
  59. # Pagination (http://docs.getpelican.com/en/stable/settings.html#pagination)
  60. DEFAULT_PAGINATION = 3
  61. PAGINATION_PATTERNS = (
  62. (1, '{base_name}/', '{base_name}/index.html'),
  63. (2, '{base_name}/page/{number}/', '{base_name}/page/{number}/index.html'),
  64. )
  65. PAGINATOR_LIMIT = 4
  66. # Translations (http://docs.getpelican.com/en/stable/settings.html#translations)
  67. DEFAULT_LANG = 'es'
  68. TRANSLATION_FEED_ATOM = None
  69. # Themes (http://docs.getpelican.com/en/stable/settings.html#themes)
  70. THEME = 'cl-theme/'
  71. SITESUBTITLE = 'Sitio de información sobre Software Libre'
  72. SHOW_RECENT_POSTS = 3 # the number of recent posts to show
  73. # Plugins' configuration (not from Pelican core)
  74. TAG_CLOUD_STEPS = 5
  75. TAG_CLOUD_MAX_ITEMS = 53
  76. TAG_CLOUD_SORTING = 'random'
  77. TAG_CLOUD_BADGE = True
  78. SITEMAP = {
  79. 'format': 'xml',
  80. 'priorities': {
  81. 'articles': 0.5,
  82. 'indexes': 0.5,
  83. 'pages': 0.5
  84. },
  85. 'changefreqs': {
  86. 'articles': 'yearly',
  87. 'indexes': 'weekly',
  88. 'pages': 'yearly'
  89. }
  90. }
  91. SOCIAL = {
  92. 'diaspora': '#',
  93. 'gnusocial': '#',
  94. 'mastodom': '#',
  95. 'matrix': '#',
  96. 'mediagoblin': '#',
  97. 'peertube': '#',
  98. 'pixelfed': '#',
  99. 'pump': '#'
  100. }
  101. ANOTHER_READ_MORE_LINK = 'Continúa leyendo <span class="screen-reader-text">{title}</span>'
  102. ANOTHER_READ_MORE_LINK_FORMAT = ' <a class="more-link" href="{url}#read_more_link">{text}</a>'
  103. I18N_UNTRANSLATED_ARTICLES = 'remove'
  104. I18N_UNTRANSLATED_PAGES = 'remove'
  105. I18N_SUBSITES = {
  106. 'de': {
  107. 'ANOTHER_READ_MORE_LINK': 'Weiter lesen <span class="screen-reader-text">{title}</span>',
  108. 'LOCALE': ('de_DE.UTF-8'),
  109. },
  110. 'en': {
  111. 'ANOTHER_READ_MORE_LINK': 'Keep reading <span class="screen-reader-text">{title}</span>',
  112. 'LOCALE': ('en_US.UTF-8'),
  113. 'MARKDOWN': {
  114. 'extension_configs': {
  115. 'markdown.extensions.codehilite': {'css_class': 'highlight'},
  116. 'markdown.extensions.extra': {},
  117. 'markdown.extensions.footnotes': {'BACKLINK_TITLE': 'Jump back to footnote %d in the text'},
  118. 'markdown.extensions.meta': {},
  119. },
  120. 'output_format': 'html5',
  121. }
  122. },
  123. 'eo': {
  124. 'ANOTHER_READ_MORE_LINK': 'Legu plu <span class="screen-reader-text">el {title}</span>',
  125. 'LOCALE': ('eo.UTF-8'),
  126. },
  127. 'fr': {
  128. 'LOCALE': ('fr_FR.UTF-8'),
  129. },
  130. }
  131. JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}