pelicanconf.py 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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
  6. # (http://docs.getpelican.com/en/stable/settings.php#basic-settings)
  7. DEFAULT_CATEGORY = 'Sin categoría'
  8. DELETE_OUTPUT_DIRECTORY = False
  9. DISPLAY_CATEGORIES_ON_MENU = True
  10. DISPLAY_PAGES_ON_MENU = True
  11. MARKDOWN = {
  12. 'extension_configs': {
  13. 'markdown.extensions.codehilite': {'css_class': 'highlight'},
  14. 'markdown.extensions.extra': {},
  15. 'markdown.extensions.footnotes': {
  16. 'BACKLINK_TITLE': 'Volver a la nota %d en el texto'
  17. },
  18. 'markdown.extensions.meta': {},
  19. },
  20. 'output_format': 'html5',
  21. }
  22. # Fix issue with < and > characters (among others) being double-escaped
  23. # Bug report in markdown/extensions/codehilite.py
  24. # https://github.com/Python-Markdown/markdown/pull/726/files
  25. PATH = 'content'
  26. PLUGIN_PATHS = ['plugins']
  27. PLUGINS = [
  28. 'another_read_more_link',
  29. 'compressor',
  30. 'get_app_version',
  31. 'i18n_subsites',
  32. # 'neighbors',
  33. 'pelican-css-js',
  34. 'sitemap',
  35. 'tag-cloud',
  36. 'tipue-search'
  37. ]
  38. # PAGE_PATHS = ['pages']
  39. # PAGE_URL = 'pages/{slug}/'
  40. # PAGE_SAVE_AS = 'pages/{slug}/index.php'
  41. SITENAME = 'LibreTube'
  42. SITENAME_SINGLE = 'LT'
  43. SITEURL = 'https://papatecla.ga'
  44. SOURCE_URL = 'https://git.sr.ht/~heckyel/libretube'
  45. # URL settings (http://docs.getpelican.com/en/stable/settings.php#url-settings)
  46. RELATIVE_URLS = True
  47. ARTICLE_PATHS = ['articles']
  48. ARTICLE_URL = '{slug}/'
  49. ARTICLE_SAVE_AS = '{slug}/index.php'
  50. CATEGORY_URL = 'category/{slug}/'
  51. CATEGORY_SAVE_AS = 'category/{slug}/index.php'
  52. CATEGORIES_URL = 'categories/'
  53. CATEGORIES_SAVE_AS = 'categories/index.php'
  54. TAG_URL = 'tag/{slug}/'
  55. TAG_SAVE_AS = 'tag/{slug}/index.php'
  56. TAGS_URL = 'tags/'
  57. TAGS_SAVE_AS = 'tags/index.php'
  58. AUTHOR_URL = 'author/{slug}/'
  59. AUTHOR_SAVE_AS = 'author/{slug}/index.php'
  60. YEAR_ARCHIVE_SAVE_AS = 'archives/{date:%Y}/index.php'
  61. MONTH_ARCHIVE_SAVE_AS = 'archives/{date:%Y}/{date:%m}/index.php'
  62. AUTHORS_URL = 'pages/créditos/'
  63. AUTHORS_SAVE_AS = 'pages/créditos/index.php'
  64. ARCHIVES_URL = 'archives/'
  65. ARCHIVES_SAVE_AS = 'archives/index.php'
  66. STATIC_PATHS = ['asciicasts', 'heckyel_pub.asc', 'robots.txt', 'wp-content']
  67. PAGE_EXCLUDES = ['asciicasts', 'wp-content']
  68. ARTICLE_EXCLUDES = ['asciicasts', 'wp-content']
  69. # Time and date (http://docs.getpelican.com/en/stable/settings.php#time-and-date)
  70. TIMEZONE = 'Europe/Madrid'
  71. LOCALE = ('es_ES.UTF-8')
  72. # Feed settings (http://docs.getpelican.com/en/stable/settings.php#feed-settings)
  73. # feed generation is usually not desired when developing, set to true in publishconf.py
  74. FEED_ALL_ATOM = None
  75. CATEGORY_FEED_ATOM = None
  76. AUTHOR_FEED_ATOM = None
  77. AUTHOR_FEED_RSS = None
  78. # Pagination (http://docs.getpelican.com/en/stable/settings.php#pagination)
  79. DEFAULT_PAGINATION = 12
  80. PAGINATION_PATTERNS = (
  81. (1, '{base_name}/', '{base_name}/index.php'),
  82. (2, '{base_name}/page/{number}/', '{base_name}/page/{number}/index.php'),
  83. )
  84. PAGINATOR_LIMIT = 5
  85. # Translations (http://docs.getpelican.com/en/stable/settings.php#translations)
  86. DEFAULT_LANG = 'es'
  87. TRANSLATION_FEED_ATOM = None
  88. # Themes (http://docs.getpelican.com/en/stable/settings.php#themes)
  89. THEME = 'libretube-theme/'
  90. SITESUBTITLE = 'Sitio de información sobre Software Libre'
  91. SHOW_RECENT_POSTS = 9 # the number of recent posts to show
  92. # Plugins' configuration (not from Pelican core)
  93. TAG_CLOUD_STEPS = 5
  94. TAG_CLOUD_MAX_ITEMS = 53
  95. TAG_CLOUD_SORTING = 'random'
  96. TAG_CLOUD_BADGE = True
  97. SITEMAP = {
  98. 'format': 'xml',
  99. 'priorities': {
  100. 'articles': 0.5,
  101. 'indexes': 0.5,
  102. 'pages': 0.5
  103. },
  104. 'changefreqs': {
  105. 'articles': 'yearly',
  106. 'indexes': 'weekly',
  107. 'pages': 'yearly'
  108. }
  109. }
  110. SOCIAL = {
  111. 'diaspora': '#',
  112. 'gnusocial': '#',
  113. 'mastodom': '#',
  114. 'matrix': '#',
  115. 'mediagoblin': '#',
  116. 'peertube': '#',
  117. 'pixelfed': '#',
  118. 'pump': '#'
  119. }
  120. LICENSE = {
  121. 'allrights': {
  122. 'name': 'All rights reserved'
  123. },
  124. 'ccby4': {
  125. 'name': 'CC BY 4.0',
  126. 'fullname': 'Attribution 4.0 International',
  127. 'url': 'https://creativecommons.org/licenses/by/4.0/'
  128. },
  129. 'ccbysa4': {
  130. 'name': 'CC BY-SA 4.0',
  131. 'fullname': 'Attribution-ShareAlike 4.0 International',
  132. 'url': 'https://creativecommons.org/licenses/by-sa/4.0/'
  133. },
  134. 'ccbynd4': {
  135. 'name': 'CC BY-ND 4.0',
  136. 'fullname': 'Attribution-NoDerivatives 4.0 International',
  137. 'url': 'https://creativecommons.org/licenses/by-nd/4.0/'
  138. },
  139. 'ccbync4': {
  140. 'name': 'CC BY-NC 4.0',
  141. 'fullname': 'Attribution-NonCommercial 4.0 International',
  142. 'url': 'https://creativecommons.org/licenses/by-nc/4.0/'
  143. },
  144. 'ccbyncsa4': {
  145. 'name': 'CC BY-NC-SA 4.0',
  146. 'fullname': 'Attribution-NonCommercial-ShareAlike 4.0 International',
  147. 'url': 'https://creativecommons.org/licenses/by-nc-sa/4.0/'
  148. },
  149. 'ccbyncnd4': {
  150. 'name': 'CC BY-NC-ND 4.0',
  151. 'fullname': 'Attribution-NonCommercial-NoDerivatives 4.0 International',
  152. 'url': 'https://creativecommons.org/licenses/by-nc-nd/4.0/'
  153. },
  154. 'ccby3': {
  155. 'name': 'CC BY 3.0',
  156. 'fullname': 'Attribution 3.0 International',
  157. 'url': 'https://creativecommons.org/licenses/by/3.0/'
  158. },
  159. 'ccbysa3': {
  160. 'name': 'CC BY-SA 3.0',
  161. 'fullname': 'Attribution-ShareAlike 3.0 International',
  162. 'url': 'https://creativecommons.org/licenses/by-sa/3.0/'
  163. },
  164. 'ccbynd3': {
  165. 'name': 'CC BY-ND 3.0',
  166. 'fullname': 'Attribution-NoDerivatives 3.0 International',
  167. 'url': 'https://creativecommons.org/licenses/by-nd/3.0/'
  168. },
  169. 'ccbync3': {
  170. 'name': 'CC BY-NC 3.0',
  171. 'fullname': 'Attribution-NonCommercial 3.0 International',
  172. 'url': 'https://creativecommons.org/licenses/by-nc/3.0/'
  173. },
  174. 'ccbyncsa3': {
  175. 'name': 'CC BY-NC-SA 3.0',
  176. 'fullname': 'Attribution-NonCommercial-ShareAlike 3.0 International',
  177. 'url': 'https://creativecommons.org/licenses/by-nc-sa/3.0/'
  178. },
  179. 'ccbyncnd3': {
  180. 'name': 'CC BY-NC-ND 3.0',
  181. 'fullname': 'Attribution-NonCommercial-NoDerivatives 3.0 International',
  182. 'url': 'https://creativecommons.org/licenses/by-nc-nd/3.0/'
  183. },
  184. 'cc01': {
  185. 'name': 'CC0 1.0',
  186. 'fullname': 'CC0 1.0 Universal - Public Domain Dedication',
  187. 'url': 'https://creativecommons.org/publicdomain/zero/1.0/'
  188. },
  189. 'publicdomain': {
  190. 'name': 'Public Domain',
  191. 'fullname': 'Public Domain Mark 1.0',
  192. 'url': 'https://creativecommons.org/publicdomain/mark/1.0/'
  193. }
  194. }
  195. ANOTHER_READ_MORE_LINK = 'Continúa leyendo <span class="screen-reader-text">{title}</span>'
  196. ANOTHER_READ_MORE_LINK_FORMAT = ' <a class="more-link" href="{url}#read_more_link">{text}</a>'
  197. I18N_UNTRANSLATED_ARTICLES = 'remove'
  198. I18N_UNTRANSLATED_PAGES = 'remove'
  199. I18N_SUBSITES = {
  200. 'de': {
  201. 'ANOTHER_READ_MORE_LINK': 'Weiter lesen <span class="screen-reader-text">{title}</span>',
  202. 'LOCALE': ('de_DE.UTF-8'),
  203. },
  204. 'en': {
  205. 'ANOTHER_READ_MORE_LINK': 'Keep reading <span class="screen-reader-text">{title}</span>',
  206. 'LOCALE': ('en_US.UTF-8'),
  207. 'MARKDOWN': {
  208. 'extension_configs': {
  209. 'markdown.extensions.codehilite': {'css_class': 'highlight'},
  210. 'markdown.extensions.extra': {},
  211. 'markdown.extensions.footnotes': {
  212. 'BACKLINK_TITLE': 'Jump back to footnote %d in the text'
  213. },
  214. 'markdown.extensions.meta': {},
  215. },
  216. 'output_format': 'html5',
  217. }
  218. },
  219. 'eo': {
  220. 'ANOTHER_READ_MORE_LINK': 'Legu plu <span class="screen-reader-text">el {title}</span>',
  221. 'LOCALE': ('eo.UTF-8'),
  222. },
  223. 'fr': {
  224. 'LOCALE': ('fr_FR.UTF-8'),
  225. },
  226. }
  227. JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}