def add_coming_soon(article_generator): for draft in article_generator.drafts: if hasattr(draft, "visible_draft") and draft.visible_draft.strip().lower() == "true": soon_article = Article(content=None, metadata=draft.metadata) soon_article.author = draft.author soon_article.slug = draft.slug soon_article.source_path = draft.source_path article_generator.articles.append(soon_article) article_generator.articles, article_generator.translations = process_translations( article_generator.articles, order_by=article_generator.settings["ARTICLE_ORDER_BY"] )