css
html
javascript
python
makefile

pelicanconf.py 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. # -*- coding: utf-8 -*- #
  2. from __future__ import unicode_literals
  3. from pelican import __version__ as PELICAN_VERSION
  4. # Basic settings
  5. # https://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': {
  19. 'BACKLINK_TITLE': 'Volver a la nota %d en el texto'
  20. },
  21. 'markdown.extensions.meta': {},
  22. },
  23. 'output_format': 'html5',
  24. }
  25. # Fix issue with < and > characters (among others) being double-escaped
  26. # Bug report in markdown/extensions/codehilite.py
  27. # https://github.com/Python-Markdown/markdown/pull/726/files
  28. PATH = 'content'
  29. PLUGIN_PATHS = ['plugins']
  30. PLUGINS = [
  31. 'extract_toc',
  32. 'i18n_subsites',
  33. 'neighbors',
  34. 'pelican-css',
  35. 'pelican-js',
  36. 'sitemap',
  37. 'tag-cloud',
  38. 'tipue-search',
  39. 'pelican_comments'
  40. ]
  41. # Optional: 'comments' is the default
  42. COMMENTS_DIR = ['comments']
  43. SITENAME = 'Conocimientos Libres'
  44. SITENAME_SINGLE = 'CL'
  45. SITEURL = 'https://conocimientoslibres.tuxfamily.org'
  46. AUTHOR = 'Jesús E.'
  47. # URL settings
  48. # https://docs.getpelican.com/en/stable/settings.html#url-settings
  49. RELATIVE_URLS = True
  50. ARTICLE_URL = '{slug}/'
  51. ARTICLE_SAVE_AS = '{slug}/index.html'
  52. CATEGORY_URL = 'category/{slug}/'
  53. CATEGORY_SAVE_AS = 'category/{slug}/index.html'
  54. CATEGORIES_URL = 'categories/'
  55. CATEGORIES_SAVE_AS = 'categories/index.html'
  56. TAG_URL = 'tag/{slug}/'
  57. TAG_SAVE_AS = 'tag/{slug}/index.html'
  58. TAGS_URL = 'tags/'
  59. TAGS_SAVE_AS = 'tags/index.html'
  60. AUTHOR_URL = 'author/{slug}/'
  61. AUTHOR_SAVE_AS = 'author/{slug}/index.html'
  62. YEAR_ARCHIVE_SAVE_AS = 'archives/{date:%Y}/index.html'
  63. MONTH_ARCHIVE_SAVE_AS = 'archives/{date:%Y}/{date:%m}/index.html'
  64. AUTHORS_URL = 'pages/créditos/'
  65. AUTHORS_SAVE_AS = 'pages/créditos/index.html'
  66. ARCHIVES_URL = 'archives/'
  67. ARCHIVES_SAVE_AS = 'archives/index.html'
  68. STATIC_PATHS = [
  69. '.htaccess',
  70. 'heckyel_pub.asc',
  71. 'robots.txt',
  72. 'wp-content',
  73. 'vendor'
  74. ]
  75. PAGE_PATHS = ['pages']
  76. PAGE_EXCLUDES = [
  77. 'vendor',
  78. 'wp-content'
  79. ]
  80. ARTICLE_PATHS = ['articles']
  81. ARTICLE_EXCLUDES = [
  82. 'comments',
  83. 'pages',
  84. 'vendor',
  85. 'wp-content'
  86. ]
  87. # Time and date
  88. # https://docs.getpelican.com/en/stable/settings.html#time-and-date
  89. TIMEZONE = 'Europe/Madrid'
  90. LOCALE = ('es_ES.UTF-8')
  91. # Feed settings
  92. # https://docs.getpelican.com/en/stable/settings.html#feed-settings
  93. # feed generation is usually not desired when developing,
  94. # set to true in publishconf.py
  95. FEED_ALL_ATOM = None
  96. CATEGORY_FEED_ATOM = None
  97. AUTHOR_FEED_ATOM = None
  98. AUTHOR_FEED_RSS = None
  99. # Pagination (https://docs.getpelican.com/en/stable/settings.html#pagination)
  100. DEFAULT_PAGINATION = 3
  101. PAGINATION_PATTERNS = (
  102. (1, '{base_name}/', '{base_name}/index.html'),
  103. (2, '{base_name}/page/{number}/', '{base_name}/page/{number}/index.html'),
  104. )
  105. PAGINATOR_LIMIT = 4
  106. # Translations
  107. # https://docs.getpelican.com/en/stable/settings.html#translations
  108. DEFAULT_LANG = 'es'
  109. TRANSLATION_FEED_ATOM = None
  110. # Themes
  111. # https://docs.getpelican.com/en/stable/settings.html#themes
  112. THEME = 'cl-theme/'
  113. SHOW_RECENT_POSTS = 3 # the number of recent posts to show
  114. # Plugins' configuration (not from Pelican core)
  115. TAG_CLOUD_STEPS = 5
  116. TAG_CLOUD_MAX_ITEMS = 53
  117. TAG_CLOUD_SORTING = 'random'
  118. TAG_CLOUD_BADGE = True
  119. SITEMAP = {
  120. 'format': 'xml',
  121. 'priorities': {
  122. 'articles': 0.5,
  123. 'indexes': 0.5,
  124. 'pages': 0.5
  125. },
  126. 'changefreqs': {
  127. 'articles': 'yearly',
  128. 'indexes': 'weekly',
  129. 'pages': 'yearly'
  130. }
  131. }
  132. SOCIAL = {
  133. 'diaspora': '#',
  134. 'gnusocial': '#',
  135. 'mastodom': '#',
  136. 'matrix': '#',
  137. 'mediagoblin': '#',
  138. 'peertube': '#',
  139. 'pixelfed': '#',
  140. 'pump': '#'
  141. }
  142. I18N_UNTRANSLATED_ARTICLES = 'remove'
  143. I18N_UNTRANSLATED_PAGES = 'remove'
  144. I18N_SUBSITES = {
  145. 'de': {
  146. 'LOCALE': ('de_DE.UTF-8'),
  147. },
  148. 'en': {
  149. 'LOCALE': ('en_US.UTF-8'),
  150. 'MARKDOWN': {
  151. 'extension_configs': {
  152. 'markdown.extensions.toc': {
  153. 'title': 'Table of Contents',
  154. },
  155. 'markdown.extensions.codehilite': {'css_class': 'highlight'},
  156. 'markdown.extensions.extra': {},
  157. 'markdown.extensions.footnotes': {
  158. 'BACKLINK_TITLE': 'Jump back to footnote %d in the text'
  159. },
  160. 'markdown.extensions.meta': {},
  161. },
  162. 'output_format': 'html5',
  163. }
  164. },
  165. 'eo': {
  166. 'LOCALE': ('eo.UTF-8'),
  167. },
  168. 'fr': {
  169. 'LOCALE': ('fr_FR.UTF-8'),
  170. },
  171. }
  172. JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}