Skip to content

Commit

Permalink
Adds release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeSteam committed Nov 12, 2024
1 parent bb91c79 commit 1d539ef
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ replace_read_time_with_word_count: true
show_excerpts_html: true
open_external_links_in_new_tab: true
outdated_content_warning:
warning_text: "⚠️ This article was last updated <b><DATE></b> and may be outdated."
warning_text: "⚠️ These release notes were last updated <b><DATE></b> and may be outdated."
placeholder_text: "<DATE>"
warning_threshold_days: 365
ignore_date_updated: false
Expand Down
34 changes: 34 additions & 0 deletions _posts/2024-11-12-v1.3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: minimaJake v1.3.0 release notes
image: /images/v130-years.png
tags:
- Minima
- Jekyll
- Release Notes
---

This release adds an "outdated content warning" for older content, with basic customisation. [Older release notes](/v1.0.2/) will display it!

| Years ago | Days ago |
| :---------------------------------------------------: | :-------------------------------------------------: |
| [![](/images/v130-years.png)](/images/v130-years.png) | [![](/images/v130-days.png)](/images/v130-days.png) |

By default, no warning is shown on any posts, however adding this to `_config.yml` will enable it:

{% raw %}
```
outdated_content_warning:
warning_text: "⚠️ This article was last updated <b>TIME_AGO</b> and may be outdated."
placeholder_text: "TIME_AGO"
warning_threshold_days: 365
ignore_date_updated: false
```
{% endraw %}

Each field should be simple enough:

- `warning_text` & `placeholder_text` determine the text to be displayed, and where the days / years ago text should go. The replacement text is dynamic to prevent any accidental collisions when string replacing.
- `warning_threshold_days` determines the minimum number of days old a post should be before showing the warning.
- `ignore_date_updated` forces the alert to only consider the *publish date* is outdated, instead of the default behaviour of considering modified date (if set).

Additionally, any article can set `hide_content_warning` to `true` to force the banner to be hidden even on outdated posts.
Binary file added images/v130-days.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/v130-years.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1d539ef

Please sign in to comment.