You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

250 lines
7.2KB

  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://libregit.org/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': '#',
  139. 'gnusocial': '#',
  140. 'mastodom': '#',
  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']}