From 43f513f6c6709bf40a90cd219970506b73ebd298 Mon Sep 17 00:00:00 2001 From: Sebastiaan Huber Date: Tue, 17 Oct 2023 00:15:26 +0200 Subject: [PATCH 1/2] Add the `Blog` category for news posts --- README.md | 1 + docs/extensions/check_events.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ce16e33..2f6867f 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ The top-matter `category` should be one of the following: - `Events`: To announce an event - `Reports`: To report on an event - `Release`: To announce a new release +- `Blog`: A blog post You can use the [update](https://ablog.readthedocs.io/en/latest/manual/posting-and-listing/#directive-update) directive to note an update to an existing post. diff --git a/docs/extensions/check_events.py b/docs/extensions/check_events.py index 59e162d..550f7a5 100644 --- a/docs/extensions/check_events.py +++ b/docs/extensions/check_events.py @@ -25,7 +25,9 @@ def check_events(app: Sphinx, env: BuildEnvironment): if post["docname"] in env.config.aiida_ignore_event_checks: continue category: set[str] = post["category"] - if not category.intersection(("Reports", "News", "Events", "Releases")): + if not category.intersection( + ("Reports", "News", "Events", "Releases", "Blog") + ): LOGGER.warning( f"Post does not have a valid category [aiida]", location=post["docname"], From 92728d5ea7b8bae7afad0baa939a75e5e04d7cd9 Mon Sep 17 00:00:00 2001 From: Sebastiaan Huber Date: Tue, 17 Oct 2023 00:15:58 +0200 Subject: [PATCH 2/2] Rename `News` to `Posts` This is in preparation of starting to add "blog" posts to the news posts. The label "news" is then no longer really applicable. --- docs/index.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/index.md b/docs/index.md index 9fdfe89..70953bb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,13 +4,12 @@ html_theme.sidebar_secondary.remove: true ```{toctree} :hidden: -Home Download Docs Support Plugins +Posts About -News Tutorials sections/team.md sections/events.md @@ -118,7 +117,7 @@ Open Source ::::{div} section-flex alternate-bg :::{div} section-contents -

Latest News +

Latest posts #