mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Export hidden pages in context
The `PageGenerator` was building hidden pages, but was not making them available in the context. This makes it difficult for other plugins to operate on hidden pages. This patch updates `PageGenerator` to export the hidden pages it finds in the context as `hidden_pages`. It also updates the article generator to export `drafts`.
This commit is contained in:
parent
780ccfe137
commit
108b67282a
3 changed files with 10 additions and 2 deletions
|
|
@ -491,7 +491,13 @@ class TestPageGenerator(unittest.TestCase):
|
|||
]
|
||||
|
||||
self.assertEqual(sorted(pages_expected), sorted(pages))
|
||||
self.assertEqual(
|
||||
sorted(pages_expected),
|
||||
sorted(self.distill_pages(generator.context['pages'])))
|
||||
self.assertEqual(sorted(hidden_pages_expected), sorted(hidden_pages))
|
||||
self.assertEqual(
|
||||
sorted(hidden_pages_expected),
|
||||
sorted(self.distill_pages(generator.context['hidden_pages'])))
|
||||
|
||||
def test_generate_sorted(self):
|
||||
settings = get_settings(filenames={})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue