-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I have a property on the page that denotes the expiration date.
E.g., in the frontmatter properties YAML, it could look like this:
---
expiration_date: 2023-11-01
---Or it could be in the body of the page as a Dataview metadata property:
[Expiration date:: 2023-11-01]I'd like pages that are viewed past the expiration date to have a special CSS applied.
For that, certain logic should be run for the page.
As Dataview works with properties and metadata on the page, it seems to be a choice to allow the user to configure a certain module which will export a callback function, which will be invoked with a current page in a parameter and Dataview global instance, if present. If this function returns True, the plugin will add the configured CSS classes to pages, or, if it returns a String or an array of Strings with CSS class names, will adds those.
This will allow having a more elaborate logic for marking pages with certain CSS classes.