File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
pelican/plugins/featured_image Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11from bs4 import BeautifulSoup
2+ from itertools import chain
23
34from pelican import signals
45from pelican .contents import Article , Page
@@ -44,12 +45,12 @@ def run_plugin(generators):
4445 """Run the Featured Image plugin."""
4546 for generator in generators :
4647 if isinstance (generator , ArticlesGenerator ):
47- for article in generator .articles :
48+ for article in chain ( generator .articles , generator . hidden_articles , generator . drafts ) :
4849 images_extraction (article )
4950 for translation in article .translations :
5051 images_extraction (translation )
5152 elif isinstance (generator , PagesGenerator ):
52- for page in generator .pages :
53+ for page in chain ( generator .pages , generator . hidden_pages , generator . draft_pages ) :
5354 images_extraction (page )
5455 for translation in page .translations :
5556 images_extraction (translation )
You can’t perform that action at this time.
0 commit comments