Skip to content

Feature: add default_time option #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Oct 7, 2022
Merged

Feature: add default_time option #145

merged 10 commits into from
Oct 7, 2022

Conversation

Guts
Copy link
Owner

@Guts Guts commented Oct 7, 2022

It allows to define a default time which is applied to dates without time.

Benefits

  • not necessary to specify a time in the meta section of every single page
  • avoid the midnigh publishing pick

Example

Configuration:

[...]
  - rss:
      date_from_meta:
        as_creation: "date"
        as_update: false
        datetime_format: "%Y-%m-%d %H:%M"
        default_timezone: "Europe/Paris"
        default_time: "22:00"
[...]

Page:

---
title: The MkDocs RSS Plugin
authors: ["[email protected] (Julien Moura)", "[email protected] (Tim Vink)"]
date: 2020-07-06
description: "MkDocs RSS plugin: generate RSS feeds for your static website using git log."
image: "rss_icon.svg"
---

Output:

[...]
<pubDate>Mon, 06 Jul 2020 22:00:00 +0200</pubDate>
[...]

@Guts Guts self-assigned this Oct 7, 2022
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Oct 7, 2022
@Guts Guts added enhancement New feature or request and removed documentation Improvements or additions to documentation labels Oct 7, 2022
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Oct 7, 2022
@codecov
Copy link

codecov bot commented Oct 7, 2022

Codecov Report

Merging #145 (cfadda8) into main (b7694de) will increase coverage by 0.06%.
The diff coverage is 73.33%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #145      +/-   ##
==========================================
+ Coverage   81.18%   81.25%   +0.06%     
==========================================
  Files           7        7              
  Lines         372      384      +12     
  Branches       82       84       +2     
==========================================
+ Hits          302      312      +10     
- Misses         44       46       +2     
  Partials       26       26              
Impacted Files Coverage Δ
mkdocs_rss_plugin/util.py 72.16% <66.66%> (+0.43%) ⬆️
mkdocs_rss_plugin/plugin.py 94.69% <77.77%> (-1.47%) ⬇️

@Guts Guts merged commit 1a3bf09 into main Oct 7, 2022
@Guts Guts deleted the feature/default-publish-hour branch October 7, 2022 15:55
@Guts
Copy link
Owner Author

Guts commented Oct 8, 2022

Related discussion #142 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant