Open DonKult opened 3 years ago
I agree it's surprising that the tag archive is created by syndication.py
. The general idea is that once there's a page that contains a collection of pages (in meta["pages"]
), syndication
can automatically add RSS/Atom feeds and archives
I see that page.name
exists for taxonomy pages only. In archive pages, using page.created_from.name
would work, except that TaxonomyPage.__init__()
helpfully sets template_title
to something else, which seems to take priority.
Untangling this might need a refactoring of staticsite, introducing a clear division between populating the interconnected page structure and populating page metadata. Such a refactoring would be a good thing to do, not just for this issue
Such a refactoring has now been done in the refactor
branch :tada:
In
example/demo/content/tags.taxonomy
the template title & description of the archive usepage.name
and the refdoc documents its existence, but it seems to have disappeared at some point (I am at least reasonably sure it existed last year).Adding to
ArchivePage
instaticsite/features/syndication.py
(I would have kinda expected it to be intaxonomy.py
) ato_dict
method "stolen" from the CategoryPage andself.name = self.created_from.to_dict().get("name")
to the constructor solves this small problem, but I fully expect there to be a better/cleaner way.Related: I see that
lib/blog.html
template usespage.created_from.…
, so perhaps that should be used in the templates instead ofpage.name
, but it isn't documented.