File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
pelican/plugins/featured_image Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11from bs4 import BeautifulSoup
22
3+ from itertools import chain
4+
35from pelican import signals
46from pelican .contents import Article , Page
57from pelican .generators import ArticlesGenerator , PagesGenerator
@@ -44,12 +46,12 @@ def run_plugin(generators):
4446 """Run the Featured Image plugin."""
4547 for generator in generators :
4648 if isinstance (generator , ArticlesGenerator ):
47- for article in generator .articles :
49+ for article in chain ( generator .articles , generator . hidden_articles , generator . drafts ) :
4850 images_extraction (article )
4951 for translation in article .translations :
5052 images_extraction (translation )
5153 elif isinstance (generator , PagesGenerator ):
52- for page in generator .pages :
54+ for page in chain ( generator .pages , generator . hidden_pages , generator . draft_pages ) :
5355 images_extraction (page )
5456 for translation in page .translations :
5557 images_extraction (translation )
You can’t perform that action at this time.
0 commit comments