2020BLOG_TITLE = "Python Ecuador" # (translatable)
2121# This is the main URL for your site. It will be used
2222# in a prominent link. Don't forget the protocol (http/https)!
23- deploy_site = os .environ .get (' NIKOLA_DEPLOY' )
23+ deploy_site = os .environ .get (" NIKOLA_DEPLOY" )
2424if deploy_site :
25- SITE_URL = ' https://{}/' .format (deploy_site .rstrip ('/' ))
25+ SITE_URL = " https://{}/" .format (deploy_site .rstrip ("/" ))
2626else :
27- SITE_URL = ' http://localhost:8000/'
27+ SITE_URL = " http://localhost:8000/"
2828# This is the URL where Nikola's output will be deployed.
2929# If not set, defaults to SITE_URL
3030# BASE_URL = "https://pythonecuador.github.io/"
3131BLOG_EMAIL = "ecuadorpython@gmail.com"
32- BLOG_DESCRIPTION = "Comunidad de Python, Open Source y Software Libre de Ecuador" # (translatable)
32+ BLOG_DESCRIPTION = (
33+ "Comunidad de Python, Open Source y Software Libre de Ecuador" # (translatable)
34+ )
3335
3436# Nikola is multilingual!
3537#
156158# Alternative navigation links. Works the same way NAVIGATION_LINKS does,
157159# although themes may not always support them. (translatable)
158160# (Bootstrap 4: right-side of navbar, Bootblog 4: right side of title)
159- NAVIGATION_ALT_LINKS = {
160- DEFAULT_LANG : {}
161- }
161+ NAVIGATION_ALT_LINKS = {DEFAULT_LANG : {}}
162162
163163# Name of the theme to use.
164164THEME = "custom"
165165
166166# Primary color of your theme. This will be used to customize your theme.
167167# Must be a HEX value.
168- THEME_COLOR = ' #5670d4'
168+ THEME_COLOR = " #5670d4"
169169
170170# Theme configuration. Fully theme-dependent. (translatable)
171171# Examples below are for bootblog4.
175175THEME_CONFIG = {
176176 DEFAULT_LANG : {
177177 # Show the latest featured post in a large box, with the previewimage as its background.
178- ' featured_large' : False ,
178+ " featured_large" : False ,
179179 # Show the first (remaining) two featured posts in small boxes.
180- ' featured_small' : False ,
180+ " featured_small" : False ,
181181 # Show featured posts on mobile.
182- ' featured_on_mobile' : True ,
182+ " featured_on_mobile" : True ,
183183 # Show image in `featured_large` on mobile.
184184 # `featured_small` displays them only on desktop.
185- ' featured_large_image_on_mobile' : True ,
185+ " featured_large_image_on_mobile" : True ,
186186 # Strip HTML from featured post text.
187- ' featured_strip_html' : False ,
187+ " featured_strip_html" : False ,
188188 # Contents of the sidebar, If empty, the sidebar is not displayed.
189- ' sidebar' : ''
189+ " sidebar" : "" ,
190190 }
191191}
192192
257257# Date format used to display post dates. (translatable)
258258# Used by babel.dates, CLDR style: http://cldr.unicode.org/translation/date-time
259259# You can also use 'full', 'long', 'medium', or 'short'
260- DATE_FORMAT = ' YYYY-MM-dd'
260+ DATE_FORMAT = " YYYY-MM-dd"
261261
262262# Date format used to display post dates, if local dates are used. (translatable)
263263# Used by moment.js: https://momentjs.com/docs/#/displaying/format/
296296# 'markdown' is Markdown
297297# 'html' assumes the file is HTML and just copies it
298298COMPILERS = {
299- "rest" : (' .rst' , ' .txt' ),
300- "markdown" : (' .md' , ' .mdown' , ' .markdown' ),
301- "textile" : (' .textile' ,),
302- "txt2tags" : (' .t2t' ,),
303- "bbcode" : (' .bb' ,),
304- "wiki" : (' .wiki' ,),
305- "ipynb" : (' .ipynb' ,),
306- "html" : (' .html' , ' .htm' ),
299+ "rest" : (" .rst" , " .txt" ),
300+ "markdown" : (" .md" , " .mdown" , " .markdown" ),
301+ "textile" : (" .textile" ,),
302+ "txt2tags" : (" .t2t" ,),
303+ "bbcode" : (" .bb" ,),
304+ "wiki" : (" .wiki" ,),
305+ "ipynb" : (" .ipynb" ,),
306+ "html" : (" .html" , " .htm" ),
307307 # PHP files are rendered the usual way (i.e. with the full templates).
308308 # The resulting files have .php extensions, making it possible to run
309309 # them without reconfiguring your server to recognize them.
310- "php" : (' .php' ,),
310+ "php" : (" .php" ,),
311311 # Pandoc detects the input from the source filename
312312 # but is disabled by default as it would conflict
313313 # with many of the others.
392392# If you do not want to display a tag publicly, you can mark it as hidden.
393393# The tag will not be displayed on the tag list page and posts.
394394# Tag pages will still be generated.
395- HIDDEN_TAGS = [' mathjax' ]
395+ HIDDEN_TAGS = [" mathjax" ]
396396
397397# Only include tags on the tag list/overview page if there are at least
398398# TAGLIST_MINIMUM_POSTS number of posts or more with every tag. Every tag
538538 """
539539 <a href="https://seburath.github.io">https://seburath.github.io</a>
540540 """
541- )
541+ ),
542542 },
543543}
544544
545545
546546# If you do not want to display an author publicly, you can mark it as hidden.
547547# The author will not be displayed on the author list page and posts.
548548# Tag pages will still be generated.
549- HIDDEN_AUTHORS = [' Guest' ]
549+ HIDDEN_AUTHORS = [" Guest" ]
550550
551551# Final location for the main blog page and sibling paginated pages is
552552# output / TRANSLATION[lang] / INDEX_PATH / index-*.html
555555
556556# Optional HTML that displayed on “main” blog index.html files.
557557# May be used for a greeting. (translatable)
558- FRONT_INDEX_HEADER = {
559- DEFAULT_LANG : ''
560- }
558+ FRONT_INDEX_HEADER = {DEFAULT_LANG : "" }
561559
562560# Create per-month archives instead of per-year
563561# CREATE_MONTHLY_ARCHIVE = False
651649# For more details, read the manual:
652650# https://getnikola.com/handbook.html#deploying-to-github
653651# You will need to configure the deployment branch on GitHub.
654- GITHUB_SOURCE_BRANCH = ' main'
655- GITHUB_DEPLOY_BRANCH = ' gh-pages'
652+ GITHUB_SOURCE_BRANCH = " main"
653+ GITHUB_DEPLOY_BRANCH = " gh-pages"
656654
657655# The name of the remote where you wish to push to, using github_deploy.
658- GITHUB_REMOTE_NAME = ' origin'
656+ GITHUB_REMOTE_NAME = " origin"
659657
660658# Whether or not github_deploy should commit to the source branch automatically
661659# before deploying.
820818# (the thumbnail has ``.thumbnail`` added before the file extension by default,
821819# but a different naming template can be configured with IMAGE_THUMBNAIL_FORMAT).
822820
823- IMAGE_FOLDERS = {' images' : ' images' }
821+ IMAGE_FOLDERS = {" images" : " images" }
824822# IMAGE_THUMBNAIL_SIZE = 400
825823# IMAGE_THUMBNAIL_FORMAT = '{name}.thumbnail{ext}'
826824
943941
944942# A small copyright notice for the page footer (in HTML).
945943# (translatable)
946- CONTENT_FOOTER = '''
944+ CONTENT_FOOTER = """
947945<div class="container">
948946 <div class="row text-center">
949947 <div class="col">
979977 </div>
980978 </div>
981979</div>
982- '''
980+ """
983981
984982# Things that will be passed to CONTENT_FOOTER.format(). This is done
985983# for translatability, as dicts are not formattable. Nikola will
995993# do not need formatting)
996994# (translatable)
997995def get_last_commit ():
998- encoding = ' utf-8'
996+ encoding = " utf-8"
999997 command = subprocess .run (["git" , "rev-parse" , "HEAD" ], capture_output = True )
1000998 last_hash = command .stdout .decode (encoding )
1001999 return last_hash [0 :8 ]
10021000
1001+
10031002CONTENT_FOOTER_FORMATS = {
10041003 DEFAULT_LANG : (
10051004 (),
@@ -1008,15 +1007,15 @@ def get_last_commit():
10081007 "author" : BLOG_AUTHOR ,
10091008 "date" : time .gmtime ().tm_year ,
10101009 "license" : LICENSE ,
1011- "commit" : get_last_commit ()
1012- }
1010+ "commit" : get_last_commit (),
1011+ },
10131012 )
10141013}
10151014
10161015# A simple copyright tag for inclusion in RSS feeds that works just
10171016# like CONTENT_FOOTER and CONTENT_FOOTER_FORMATS
10181017RSS_COPYRIGHT = 'Contents © {date} <a href="mailto:{email}">{author}</a> {license}'
1019- RSS_COPYRIGHT_PLAIN = ' Contents © {date} {author} {license}'
1018+ RSS_COPYRIGHT_PLAIN = " Contents © {date} {author} {license}"
10201019RSS_COPYRIGHT_FORMATS = CONTENT_FOOTER_FORMATS
10211020
10221021# To use comments, you can choose between different third party comment
@@ -1131,7 +1130,11 @@ def get_last_commit():
11311130# with the MarkdownExtension class and should not be added here.
11321131# Defaults are markdown.extensions.(fenced_code|codehilite|extra)
11331132# markdown.extensions.meta is required for Markdown metadata.
1134- MARKDOWN_EXTENSIONS = ['markdown.extensions.fenced_code' , 'markdown.extensions.codehilite' , 'markdown.extensions.extra' ]
1133+ MARKDOWN_EXTENSIONS = [
1134+ "markdown.extensions.fenced_code" ,
1135+ "markdown.extensions.codehilite" ,
1136+ "markdown.extensions.extra" ,
1137+ ]
11351138
11361139# Options to be passed to markdown extensions (See https://python-markdown.github.io/reference/)
11371140# Default is {} (no config at all)
@@ -1334,11 +1337,11 @@ def get_last_commit():
13341337# Images displayed come from the `previewimage` meta tag.
13351338# You can specify the card type by using the `card` parameter in TWITTER_CARD.
13361339TWITTER_CARD = {
1337- ' use_twitter_cards' : True , # enable Twitter Cards
1340+ " use_twitter_cards" : True , # enable Twitter Cards
13381341 # Card type, you can also use 'summary_large_image',
13391342 # see https://dev.twitter.com/cards/types
1340- ' card' : ' summary' ,
1341- ' site' : ' @pyecuador' , # twitter nick for the website
1343+ " card" : " summary" ,
1344+ " site" : " @pyecuador" , # twitter nick for the website
13421345 # 'creator': '@username', # Username for the content creator / author.
13431346}
13441347
@@ -1403,13 +1406,15 @@ def get_last_commit():
14031406# those.
14041407TEMPLATE_FILTERS = {}
14051408
1409+
14061410def time_to_date (text ):
14071411 import datetime
14081412
14091413 seconds = int (text ) / 1000
14101414 time = datetime .date .fromtimestamp (seconds )
14111415 return time .strftime ("%d/%m/%Y" )
14121416
1417+
14131418TEMPLATE_FILTERS ["time" ] = time_to_date
14141419
14151420# Put in global_context things you want available on all your templates.
0 commit comments