FAForever / FAForever/website-news

Add a mechanic to (automatically) remove news items from the home page

Open
#39 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
SCSS
Stars
0
Forks
4
PR merge metrics
No merged PRs in 30d

Description

At the moment all news items are visible on the home page. There is no mechanic or feature in place to remove news items from the home page. With this issue I suggest to automatically remove news items that have been published 4 weeks. We can do this automatically by sorting and filtering the news items based on the publication date.

According to ChatGPT it can be achieved through:

```liquid
{% assign event_date = "2024-01-01" | date: "%s" %}
{% assign current_date = "now" | date: "%s" %}

{% assign seconds_since = current_date | minus: event_date %}
{% assign weeks_since = seconds_since | divided_by: 604800 %} {# 604800 seconds in a week #}

{{ weeks_since }} weeks ago
```

We should also include a manual field and/or toggle to hide a page from the home page manually.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.