Skip to content

Commit

Permalink
Exclude pages with draft=true in meta. Closes #147
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Oct 13, 2022
1 parent 9b5ed27 commit c1e4d5c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mkdocs_rss_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ def on_page_content(
if not self.match_path_pattern.match(page.file.src_path):
return

# skip pages with draft=true
if page.meta.get("draft", False) is True:
logger.debug(f"Page {page.title} ignored because it's a draft")
return

# retrieve dates from git log
page_dates = self.util.get_file_dates(
in_page=page,
Expand Down

0 comments on commit c1e4d5c

Please sign in to comment.