Skip to main content

Defining a list of tags is now optional

ID
099b303
date
2025-12-06 22:45:56+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
f27bca6
message
Defining a list of tags is now optional
changed files
3 files, 10 additions, 4 deletions

Changed files

CHANGELOG.md (1767) → CHANGELOG.md (1871)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 69d457d..fee1295 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # CHANGELOG
 
+## v16 - 2025-12-06
+
+Don't require defining `list_tags_in_metadata()` in projects that don't use tags.
+
 ## v15 - 2025-12-06
 
 Fix a bunch of lints from ruff; remove an unused dependency.

src/chives/__init__.py (391) → src/chives/__init__.py (391)

diff --git a/src/chives/__init__.py b/src/chives/__init__.py
index 90d3ad0..093bc4c 100644
--- a/src/chives/__init__.py
+++ b/src/chives/__init__.py
@@ -11,4 +11,4 @@ I share across multiple sites.
 
 """
 
-__version__ = "15"
+__version__ = "16"

src/chives/static_site_tests.py (7077) → src/chives/static_site_tests.py (7213)

diff --git a/src/chives/static_site_tests.py b/src/chives/static_site_tests.py
index 23ce2e6..e66722f 100644
--- a/src/chives/static_site_tests.py
+++ b/src/chives/static_site_tests.py
@@ -54,15 +54,17 @@ class StaticSiteTestSuite[M](ABC):
         """
         ...
 
-    @abstractmethod
-    def list_tags_in_metadata(self, metadata: M) -> Iterator[str]:
+    def list_tags_in_metadata(self, metadata: M) -> Iterator[str]:  # pragma: no cover
         """
         Returns all the tags used in the metadata, once for every usage.
 
         For example, if three documents use the same tag, the tag will
         be returned three times.
+
+        This method should be overriden in projects that use keyword tags;
+        there are some sites that don't use tags.
         """
-        ...
+        yield from []
 
     def test_no_uncommitted_git_changes(self, site_root: Path) -> None:
         """