css
html
javascript
python
makefile

pelicanconf.py 5.1KB

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