pelicanconf.py 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*- #
  3. from __future__ import unicode_literals
  4. from datetime import datetime
  5. # Site info
  6. AUTHOR = 'banshee'
  7. ROBOTS = 'index, follow'
  8. SITENAME = 'blog.grink.tech'
  9. SITETITLE = 'Banshee\'s blog'
  10. SITESUBTITLE = 'Subtitle subtitle'
  11. SITEDESCRIPTION = 'description description 2'
  12. SITELOGO = 'logo.png'
  13. COPYRIGHT_YEAR = datetime.now().year
  14. # when developing: don't specify URL, use document-relative URLs
  15. SITEURL = 'https://blog.grink.tech'
  16. RELATIVE_URLS = False
  17. SITEURL = ''
  18. RELATIVE_URLS = True
  19. # Locale and Language
  20. #LOCALE = 'en_US'
  21. DEFAULT_LANG = 'en'
  22. TIMEZONE = 'Europe/London'
  23. DATE_FORMATS = {
  24. 'en': '%b %d, %Y',
  25. }
  26. # Build settings
  27. PATH = 'content'
  28. THEME = 'custom-theme'
  29. ARTICLE_PATHS = [
  30. 'blog'
  31. ]
  32. ARTICLE_URL = 'blog/{slug}.html'
  33. ARTICLE_SAVE_AS = 'blog/{slug}.html'
  34. #ARTICLE_PRIMARY_PATH = 'blog'
  35. PAGE_PATHS = [
  36. 'pages'
  37. ]
  38. DIRECT_TEMPLATES = [
  39. 'index',
  40. 'authors',
  41. 'categories',
  42. 'tags',
  43. 'archives',
  44. '404',
  45. 'search',
  46. ]
  47. # below pages are not included in the theme, but you want to customize them in html and layout
  48. # TEMPLATE_PAGES = {
  49. # 'pages/test.html': 'pages/test.html'
  50. # }
  51. DEFAULT_PAGINATION = 10
  52. DEFAULT_DATE = (2023, 1, 1, 12, 0, 0)
  53. OUTPUT_PATH = 'output'
  54. DELETE_OUTPUT_DIRECTORY = True
  55. # Feed generation, usually not needed when developing
  56. FEED_ALL_ATOM = None
  57. CATEGORY_FEED_ATOM = None
  58. TRANSLATION_FEED_ATOM = None
  59. AUTHOR_FEED_ATOM = None
  60. AUTHOR_FEED_RSS = None
  61. # Advanced Settings
  62. FORMATTED_FIELDS = [] # removed 'summary'
  63. STATIC_PATHS = [
  64. 'images',
  65. 'favicon.ico',
  66. 'logo.png',
  67. #'.htaccess',
  68. 'robots.txt'
  69. ]
  70. # Plugins
  71. # since version 4.5, plugins are installed as python packages, refer to requirements.txt
  72. # PLUGIN_PATHS = [
  73. # '../../pelican-plugins'
  74. # ]
  75. PLUGINS = [
  76. 'sitemap', # generate sitemap document, see <https://www.sitemaps.org>
  77. #'minchin.pelican.plugins.post_stats', # generate post statistics
  78. 'related_posts', # find articles those share common tags
  79. #'neighbors', # find next, previous article
  80. 'share_post', # static sharing buttons
  81. #'tipue_search', # generate data for searching
  82. #'tag_cloud', # generate tag cloud in different sizes
  83. ]
  84. SITEMAP = {
  85. 'format': 'xml',
  86. 'priorities': {
  87. 'articles': 0.5,
  88. 'indexes': 0.5,
  89. 'pages': 0.5
  90. },
  91. 'changefreqs': {
  92. 'articles': 'monthly',
  93. 'indexes': 'daily',
  94. 'pages': 'monthly'
  95. }
  96. }
  97. RELATED_POSTS_MAX = 5
  98. RELATED_POSTS_SKIP_SAME_CATEGORY = False
  99. # Markdown extensions
  100. TYPOGRIFY = True
  101. MARKDOWN = {
  102. 'extensions': [
  103. # official extensions
  104. 'markdown.extensions.extra', # include extensions: abbr, attr_list, def_list, fenced_code, footnotes, tables
  105. 'markdown.extensions.codehilite', # to generate code color scheme using pygments
  106. 'markdown.extensions.meta', # to parse key:value pairs at the begining of file
  107. 'markdown.extensions.sane_lists',# for better list
  108. 'markdown.extensions.toc', # add Table of Content
  109. 'markdown.extensions.nl2br', # easily to add new line, but make attr_list and legacy_attrs hard to control
  110. #'markdown.extensions.admonition', # to make alert box
  111. #'markdown.extensions.legacy_attrs', # insert attribs into element, but markdown already has a built-in function that do the same thing
  112. #'markdown.extensions.legacy_em', # to use legacy emphasis
  113. #'markdown.extensions.smarty', # converts ASCII dashes, quotes and ellipses to their HTML entity equivalents
  114. #'markdown.extensions.wikilinks',
  115. # 3rd party extensions
  116. #'markdown_checklist.extension', # show checkbox in list
  117. #'markdown_captions', # convert <img> to <figure> and <figcaption>
  118. ],
  119. 'extension_configs': {
  120. 'markdown.extensions.codehilite': {'css_class': 'highlight'},
  121. },
  122. 'output_format': 'html5',
  123. }
  124. # Social widget
  125. SOCIAL = {
  126. 'facebook': 'https://facebook.com/trongvq',
  127. 'github': 'https://github.com/vuquangtrong',
  128. 'linkedin': 'https://www.linkedin.com/in/vqtrong',
  129. 'twitter': 'https://twitter.com/trongvq',
  130. }
  131. # Site validation
  132. # CLAIM_GOOGLE = ""
  133. # CLAIM_BING = ""
  134. # Search Engine
  135. # you can use static search engine like TipueSearch or dynami engine like Google Custom Search Engine
  136. # GOOGLE_CSE_ID = '007986648373531383257:hnbvizg2lks'
  137. # Comments
  138. #DISQUS_SITENAME = "vuquangtrong-github-io"
  139. # Sharing
  140. SHARE_POST = True # old style and static sharing buttons for articles, use AddThis for tracking purpose
  141. #ADD_THIS_ID = "ra-5d9ffca0db80069e" # can be on index, any article or page, and can track user activities
  142. # HEAP_ANALYTICS = ""
  143. # MATOMO_SITENAME = 'vuquangtronggithubio' # new site of PIWIK
  144. # PIWIK_SITE_ID = ""
  145. # PIWIK_URL = ""
  146. # PIWIK_SSL_URL = ""