Skip to content

"can't compare datetime.datetime to datetime.date" while "draft_if_future_date: true" #5618

@whallin

Description

@whallin

Context

I'm setting up the blog plugin to work how I want it to. For example, "scheduled" blog posts should always be marked as drafts by default. But this isn't quite working the way it should, based on how the official documentation describes how it should work, at least.

Bug description

While draft_if_future_date is set to true in the blog plugin, the build always seems to fail with the error TypeError: can't compare datetime.datetime to datetime.date.

Related links

Reproduction

example.zip

Steps to reproduce

  1. Setup the blog plugin following the official documentation
  2. Set the draft_if_future_date property to true
  3. Build the site using mkdocs build (with the info plugin disabled, of course)

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions