aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/plugins/task
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2022-04-20 00:13:08 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2022-04-20 00:13:08 -0400
commitaca2787b50094a4ab1f17162aa92c5263858743e (patch)
treec227d3a22fe454f92162d8d91ecb81f3141ace94 /nikola/plugins/task
parent78e717290e125cab92aef712f12ae63fedb4070f (diff)
parent942e313727d1ad886a1024c24fe4a9e8e2e0bb3e (diff)
Update upstream source from tag 'upstream/8.2.0'
Update to upstream version '8.2.0' with Debian dir 65d01d7d78d6b41c0be6eb196ed84354526f9384
Diffstat (limited to 'nikola/plugins/task')
-rw-r--r--nikola/plugins/task/categories.py6
-rw-r--r--nikola/plugins/task/galleries.py7
-rw-r--r--nikola/plugins/task/listings.py2
-rw-r--r--nikola/plugins/task/tags.py6
4 files changed, 14 insertions, 7 deletions
diff --git a/nikola/plugins/task/categories.py b/nikola/plugins/task/categories.py
index 3c0ea6b..b140101 100644
--- a/nikola/plugins/task/categories.py
+++ b/nikola/plugins/task/categories.py
@@ -186,6 +186,8 @@ link://category_rss/dogs => /categories/dogs.xml""",
"title": self.site.MESSAGES[lang]["Categories"],
"description": self.site.MESSAGES[lang]["Categories"],
"pagekind": ["list", "tags_page"],
+ "category_descriptions": self.site.config['CATEGORY_DESCRIPTIONS'](lang),
+ "category_titles": self.site.config['CATEGORY_TITLES'](lang),
}
kw.update(context)
return context, kw
@@ -209,8 +211,8 @@ link://category_rss/dogs => /categories/dogs.xml""",
subcats = [(child.name, self.site.link(self.classification_name, child.classification_name, lang)) for child in children]
friendly_name = self.get_classification_friendly_name(classification, lang)
context = {
- "title": self.site.config['CATEGORY_TITLES'].get(lang, {}).get(classification, self.site.MESSAGES[lang]["Posts about %s"] % friendly_name),
- "description": self.site.config['CATEGORY_DESCRIPTIONS'].get(lang, {}).get(classification),
+ "title": self.site.config['CATEGORY_TITLES'](lang).get(classification, self.site.MESSAGES[lang]["Posts about %s"] % friendly_name),
+ "description": self.site.config['CATEGORY_DESCRIPTIONS'](lang).get(classification),
"pagekind": ["tag_page", "index" if self.show_list_as_index else "list"],
"tag": friendly_name,
"category": classification,
diff --git a/nikola/plugins/task/galleries.py b/nikola/plugins/task/galleries.py
index 1c53cbd..c9b1915 100644
--- a/nikola/plugins/task/galleries.py
+++ b/nikola/plugins/task/galleries.py
@@ -307,10 +307,13 @@ class Galleries(Task, ImageProcessor):
context['post'] = post
else:
context['post'] = None
+
+ template_dep_context = context.copy()
+ template_dep_context.update(self.site.GLOBAL_CONTEXT)
file_dep = self.site.template_system.template_deps(
- template_name) + image_list + thumbs
+ template_name, template_dep_context) + image_list + thumbs
file_dep_dest = self.site.template_system.template_deps(
- template_name) + dest_img_list + thumbs
+ template_name, template_dep_context) + dest_img_list + thumbs
if post:
file_dep += [post.translated_base_path(l) for l in self.kw['translations']]
file_dep_dest += [post.translated_base_path(l) for l in self.kw['translations']]
diff --git a/nikola/plugins/task/listings.py b/nikola/plugins/task/listings.py
index 5f4fca9..d52ddb2 100644
--- a/nikola/plugins/task/listings.py
+++ b/nikola/plugins/task/listings.py
@@ -179,7 +179,7 @@ class Listings(Task):
yield self.group_task()
- template_deps = self.site.template_system.template_deps('listing.tmpl')
+ template_deps = self.site.template_system.template_deps('listing.tmpl', self.site.GLOBAL_CONTEXT)
for input_folder, output_folder in self.kw['listings_folders'].items():
for root, dirs, files in os.walk(input_folder, followlinks=True):
diff --git a/nikola/plugins/task/tags.py b/nikola/plugins/task/tags.py
index a1a6b77..cc2ced8 100644
--- a/nikola/plugins/task/tags.py
+++ b/nikola/plugins/task/tags.py
@@ -128,6 +128,8 @@ link://tag_rss/cats => /tags/cats.xml""",
"title": self.site.MESSAGES[lang]["Tags"],
"description": self.site.MESSAGES[lang]["Tags"],
"pagekind": ["list", "tags_page"],
+ "tag_descriptions": self.site.config['TAG_DESCRIPTIONS'](lang),
+ "tag_titles": self.site.config['TAG_TITLES'](lang),
}
kw.update(context)
return context, kw
@@ -143,8 +145,8 @@ link://tag_rss/cats => /tags/cats.xml""",
"tag_titles": self.site.config['TAG_TITLES'],
}
context = {
- "title": self.site.config['TAG_TITLES'].get(lang, {}).get(classification, self.site.MESSAGES[lang]["Posts about %s"] % classification),
- "description": self.site.config['TAG_DESCRIPTIONS'].get(lang, {}).get(classification),
+ "title": self.site.config['TAG_TITLES'](lang).get(classification, self.site.MESSAGES[lang]["Posts about %s"] % classification),
+ "description": self.site.config['TAG_DESCRIPTIONS'](lang).get(classification),
"pagekind": ["tag_page", "index" if self.show_list_as_index else "list"],
"tag": classification,
}