aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/plugins/shortcode
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-04-22 20:23:51 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2021-04-22 20:23:51 -0400
commit5fe4d85d8450575556385f20c46d67887009e245 (patch)
treee07d531240670225499657eff04a16105eb4bb5f /nikola/plugins/shortcode
parent501ee1930f5424ac00be29a7537a74e30c5d901f (diff)
parent8eeed31eb2f86ac982fa4b26f93b15828289c56d (diff)
Update upstream source from tag 'upstream/8.1.3'
Update to upstream version '8.1.3' with Debian dir ff84f28157b98ab52cbb563f4853d749beb4be60
Diffstat (limited to 'nikola/plugins/shortcode')
-rw-r--r--nikola/plugins/shortcode/chart.py2
-rw-r--r--nikola/plugins/shortcode/listing.py2
-rw-r--r--nikola/plugins/shortcode/post_list.py8
-rw-r--r--nikola/plugins/shortcode/thumbnail.py2
4 files changed, 8 insertions, 6 deletions
diff --git a/nikola/plugins/shortcode/chart.py b/nikola/plugins/shortcode/chart.py
index 64341e8..d15dd0d 100644
--- a/nikola/plugins/shortcode/chart.py
+++ b/nikola/plugins/shortcode/chart.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright © 2012-2020 Roberto Alsina and others.
+# Copyright © 2012-2021 Roberto Alsina and others.
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated
diff --git a/nikola/plugins/shortcode/listing.py b/nikola/plugins/shortcode/listing.py
index b51365a..72136ea 100644
--- a/nikola/plugins/shortcode/listing.py
+++ b/nikola/plugins/shortcode/listing.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright © 2017-2020 Roberto Alsina and others.
+# Copyright © 2017-2021 Roberto Alsina and others.
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated
diff --git a/nikola/plugins/shortcode/post_list.py b/nikola/plugins/shortcode/post_list.py
index 462984a..0206cf0 100644
--- a/nikola/plugins/shortcode/post_list.py
+++ b/nikola/plugins/shortcode/post_list.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright © 2013-2020 Udo Spallek, Roberto Alsina and others.
+# Copyright © 2013-2021 Udo Spallek, Roberto Alsina and others.
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated
@@ -145,6 +145,7 @@ class PostListShortcode(ShortcodePlugin):
if self_post:
self_post.register_depfile("####MAGIC####TIMELINE", lang=lang)
+ self_post.register_depfile("####MAGIC####CONFIG:GLOBAL_CONTEXT", lang=lang)
# If we get strings for start/stop, make them integers
if start is not None:
@@ -227,7 +228,8 @@ class PostListShortcode(ShortcodePlugin):
for d in template_deps:
self_post.register_depfile(d, lang=lang)
- template_data = {
+ template_data = site.GLOBAL_CONTEXT.copy()
+ template_data.update({
'lang': lang,
'posts': posts,
# Need to provide str, not TranslatableSetting (Issue #2104)
@@ -235,7 +237,7 @@ class PostListShortcode(ShortcodePlugin):
'post_list_id': post_list_id,
'messages': site.MESSAGES,
'_link': site.link,
- }
+ })
output = site.template_system.render_template(
template, None, template_data)
return output, template_deps
diff --git a/nikola/plugins/shortcode/thumbnail.py b/nikola/plugins/shortcode/thumbnail.py
index feb731b..48f5384 100644
--- a/nikola/plugins/shortcode/thumbnail.py
+++ b/nikola/plugins/shortcode/thumbnail.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright © 2017-2020 Roberto Alsina, Chris Warrick and others.
+# Copyright © 2017-2021 Roberto Alsina, Chris Warrick and others.
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated