pelicanconf.py 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  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': {
  17. 'css_class': 'highlight',
  18. # 'linenums': None
  19. },
  20. 'markdown.extensions.extra': {},
  21. 'markdown.extensions.footnotes': {
  22. 'BACKLINK_TITLE': 'Volver a la nota %d en el texto'
  23. },
  24. 'markdown.extensions.meta': {},
  25. },
  26. 'output_format': 'html5',
  27. }
  28. # Fix issue with < and > characters (among others) being double-escaped
  29. # Bug report in markdown/extensions/codehilite.py
  30. # https://github.com/Python-Markdown/markdown/pull/726/files
  31. PATH = 'content'
  32. PLUGIN_PATHS = ['plugins']
  33. PLUGINS = [
  34. 'extract_toc',
  35. 'get_app_version',
  36. 'i18n_subsites',
  37. 'neighbors',
  38. 'pelican-css',
  39. 'pelican-js',
  40. 'sitemap',
  41. 'tag-cloud',
  42. 'tipue-search',
  43. 'pelican_comments'
  44. ]
  45. # Optional: 'comments' is the default
  46. COMMENTS_DIR = ['comments']
  47. AUTHOR = 'Jesús E.'
  48. SITENAME = 'Conocimientos Libres'
  49. SITENAME_SINGLE = 'CL'
  50. SITEURL = 'https://conocimientoslibres.tuxfamily.org'
  51. SOURCE_LINK = 'https://git.sr.ht/~heckyel/cl'
  52. # URL settings
  53. # https://docs.getpelican.com/en/stable/settings.html#url-settings
  54. RELATIVE_URLS = True
  55. ARTICLE_URL = '{slug}/'
  56. ARTICLE_SAVE_AS = '{slug}/index.html'
  57. CATEGORY_URL = 'category/{slug}/'
  58. CATEGORY_SAVE_AS = 'category/{slug}/index.html'
  59. CATEGORIES_URL = 'categories/'
  60. CATEGORIES_SAVE_AS = 'categories/index.html'
  61. TAG_URL = 'tag/{slug}/'
  62. TAG_SAVE_AS = 'tag/{slug}/index.html'
  63. TAGS_URL = 'tags/'
  64. TAGS_SAVE_AS = 'tags/index.html'
  65. AUTHOR_URL = 'author/{slug}/'
  66. AUTHOR_SAVE_AS = 'author/{slug}/index.html'
  67. YEAR_ARCHIVE_SAVE_AS = 'archives/{date:%Y}/index.html'
  68. MONTH_ARCHIVE_SAVE_AS = 'archives/{date:%Y}/{date:%m}/index.html'
  69. AUTHORS_URL = 'pages/créditos/'
  70. AUTHORS_SAVE_AS = 'pages/créditos/index.html'
  71. ARCHIVES_URL = 'archives/'
  72. ARCHIVES_SAVE_AS = 'archives/index.html'
  73. STATIC_PATHS = [
  74. '.htaccess',
  75. 'heckyel_pub.asc',
  76. 'robots.txt',
  77. 'wp-content',
  78. 'vendor'
  79. ]
  80. PAGE_PATHS = ['pages']
  81. PAGE_EXCLUDES = [
  82. 'vendor',
  83. 'wp-content'
  84. ]
  85. ARTICLE_PATHS = ['articles']
  86. ARTICLE_EXCLUDES = [
  87. 'comments',
  88. 'pages',
  89. 'vendor',
  90. 'wp-content'
  91. ]
  92. # Time and date
  93. # https://docs.getpelican.com/en/stable/settings.html#time-and-date
  94. TIMEZONE = 'Europe/Madrid'
  95. LOCALE = ('es_ES.UTF-8')
  96. # Feed settings
  97. # https://docs.getpelican.com/en/stable/settings.html#feed-settings
  98. # feed generation is usually not desired when developing,
  99. # set to true in publishconf.py
  100. FEED_ALL_ATOM = None
  101. CATEGORY_FEED_ATOM = None
  102. AUTHOR_FEED_ATOM = None
  103. AUTHOR_FEED_RSS = None
  104. # Pagination (https://docs.getpelican.com/en/stable/settings.html#pagination)
  105. DEFAULT_PAGINATION = 3
  106. PAGINATION_PATTERNS = (
  107. (1, '{base_name}/', '{base_name}/index.html'),
  108. (2, '{base_name}/page/{number}/', '{base_name}/page/{number}/index.html'),
  109. )
  110. PAGINATOR_LIMIT = 4
  111. # Translations
  112. # https://docs.getpelican.com/en/stable/settings.html#translations
  113. DEFAULT_LANG = 'es'
  114. TRANSLATION_FEED_ATOM = None
  115. # Themes
  116. # https://docs.getpelican.com/en/stable/settings.html#themes
  117. THEME = 'cl-theme/'
  118. SHOW_RECENT_POSTS = 3 # the number of recent posts to show
  119. # Plugins' configuration (not from Pelican core)
  120. TAG_CLOUD_STEPS = 5
  121. TAG_CLOUD_MAX_ITEMS = 53
  122. TAG_CLOUD_SORTING = 'random'
  123. TAG_CLOUD_BADGE = True
  124. SITEMAP = {
  125. 'format': 'xml',
  126. 'priorities': {
  127. 'articles': 0.5,
  128. 'indexes': 0.5,
  129. 'pages': 0.5
  130. },
  131. 'changefreqs': {
  132. 'articles': 'yearly',
  133. 'indexes': 'weekly',
  134. 'pages': 'yearly'
  135. }
  136. }
  137. SOCIAL = {
  138. 'diaspora': 'https://diasp.org/u/heckyel',
  139. 'gnusocial': '#',
  140. 'mastodon': 'https://masto.nobigtech.es/@heckyel',
  141. 'matrix': '#',
  142. 'mediagoblin': '#',
  143. 'peertube': 'https://video.ploud.jp/video-channels/cl',
  144. 'pixelfed': '#',
  145. 'pump': '#'
  146. }
  147. I18N_UNTRANSLATED_ARTICLES = 'remove'
  148. I18N_UNTRANSLATED_PAGES = 'remove'
  149. I18N_SUBSITES = {
  150. 'de': {
  151. 'LOCALE': ('de_DE.UTF-8'),
  152. 'AUTHORS_URL': ('pages/autoren/'),
  153. 'AUTHORS_SAVE_AS': ('pages/autoren/index.html'),
  154. 'MARKDOWN': {
  155. 'extension_configs': {
  156. 'markdown.extensions.toc': {
  157. 'title': 'Inhaltsverzeichnis',
  158. 'permalink': 'true'
  159. },
  160. 'markdown.extensions.codehilite': {'css_class': 'highlight'},
  161. 'markdown.extensions.extra': {},
  162. 'markdown.extensions.footnotes': {
  163. 'BACKLINK_TITLE': 'Springe zurück zu footnote %d im text'
  164. },
  165. 'markdown.extensions.meta': {},
  166. },
  167. 'output_format': 'html5',
  168. }
  169. },
  170. 'en': {
  171. 'LOCALE': ('en_US.UTF-8'),
  172. 'AUTHORS_URL': ('pages/authors/'),
  173. 'AUTHORS_SAVE_AS': ('pages/authors/index.html'),
  174. 'MARKDOWN': {
  175. 'extension_configs': {
  176. 'markdown.extensions.toc': {
  177. 'title': 'Table of Contents',
  178. 'permalink': 'true'
  179. },
  180. 'markdown.extensions.codehilite': {'css_class': 'highlight'},
  181. 'markdown.extensions.extra': {},
  182. 'markdown.extensions.footnotes': {
  183. 'BACKLINK_TITLE': 'Jump back to footnote %d in the text'
  184. },
  185. 'markdown.extensions.meta': {},
  186. },
  187. 'output_format': 'html5',
  188. }
  189. },
  190. 'eo': {
  191. 'LOCALE': ('eo.UTF-8'),
  192. 'AUTHORS_URL': ('pages/aŭtoroj/'),
  193. 'AUTHORS_SAVE_AS': ('pages/aŭtoroj/index.html'),
  194. 'MARKDOWN': {
  195. 'extension_configs': {
  196. 'markdown.extensions.toc': {
  197. 'title': 'Enhavtabelo',
  198. 'permalink': 'true'
  199. },
  200. 'markdown.extensions.codehilite': {'css_class': 'highlight'},
  201. 'markdown.extensions.extra': {},
  202. 'markdown.extensions.footnotes': {
  203. 'BACKLINK_TITLE': 'Saltu al footnote %d en la teksto'
  204. },
  205. 'markdown.extensions.meta': {},
  206. },
  207. 'output_format': 'html5',
  208. }
  209. },
  210. 'fr': {
  211. 'LOCALE': ('fr_FR.UTF-8'),
  212. 'AUTHORS_URL': ('pages/auteurs/'),
  213. 'AUTHORS_SAVE_AS': ('pages/auteurs/index.html'),
  214. 'MARKDOWN': {
  215. 'extension_configs': {
  216. 'markdown.extensions.toc': {
  217. 'title': 'Table des matières',
  218. 'permalink': 'true'
  219. },
  220. 'markdown.extensions.codehilite': {'css_class': 'highlight'},
  221. 'markdown.extensions.extra': {},
  222. 'markdown.extensions.footnotes': {
  223. 'BACKLINK_TITLE': 'Revenir à la footnote %d dans le texte'
  224. },
  225. 'markdown.extensions.meta': {},
  226. },
  227. 'output_format': 'html5',
  228. }
  229. },
  230. }
  231. JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}