From a9adf514530633155fb390faffd7b50951223168 Mon Sep 17 00:00:00 2001 From: Adrian Malacoda Date: Sun, 20 Sep 2020 05:28:37 -0500 Subject: [PATCH] Add GCW link to archived wiki pages, for the live version of said archived article. --- epilogue/archive_generator.py | 4 +++- templates/category.mustache | 4 ++-- templates/partials/wiki_notice.mustache | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/epilogue/archive_generator.py b/epilogue/archive_generator.py index 2de9fb2..3a6f363 100644 --- a/epilogue/archive_generator.py +++ b/epilogue/archive_generator.py @@ -126,6 +126,7 @@ class ArchiveGenerator(): renderer.render_template_to_file("page", page_out, { "title": " - {}".format(page.title), + "pagename": page.title, "page": page, "base": base, "text": rendered @@ -143,6 +144,7 @@ class ArchiveGenerator(): try: renderer.render_template_to_file("category", category_out, { "title": " - {}".format(category), + "pagename": "Category:{}".format(category), "category": category, "pages": pages }) @@ -243,4 +245,4 @@ class TemplateRenderer(): def render_template_to_file (self, template_name, out_file, data={}): with self.open_template(template_name) as template: with open(os.path.join(self.out_dir, out_file), "w") as out: - out.write(chevron.render(template, data, self.partials_dir, self.extension)) \ No newline at end of file + out.write(chevron.render(template, data, self.partials_dir, self.extension)) diff --git a/templates/category.mustache b/templates/category.mustache index 5b2ca6e..0081ae6 100644 --- a/templates/category.mustache +++ b/templates/category.mustache @@ -1,9 +1,9 @@ {{>header}} {{>wiki_notice}} -

{{title}}

+

{{pagename}}

-{{>footer}} \ No newline at end of file +{{>footer}} diff --git a/templates/partials/wiki_notice.mustache b/templates/partials/wiki_notice.mustache index a72800c..337c348 100644 --- a/templates/partials/wiki_notice.mustache +++ b/templates/partials/wiki_notice.mustache @@ -1,5 +1,6 @@

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of an article from Glitch City Laboratories wiki.

+

A live version of this article is available at the Glitch City Wiki here.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of the wiki in .tar.gz or .xml.gz formats.

-
\ No newline at end of file +