« get me outta code hell

Merge branch 'preview' into news-tweaks - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateCommentarySection.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-12-03 17:55:58 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-12-03 17:55:58 -0400
commit11493b1a70c26d9aa11b98acf93b4d09d89f88bf (patch)
treefe062bc0b32698c3af6c41f4c7043dc1afb09b92 /src/content/dependencies/generateCommentarySection.js
parent213bddbd9851ee01f256835b1bca0c4bc0cf5fc6 (diff)
parent7039d7fa471318df40c1905cd5ac52688dc6adcf (diff)
Merge branch 'preview' into news-tweaks
Diffstat (limited to 'src/content/dependencies/generateCommentarySection.js')
-rw-r--r--src/content/dependencies/generateCommentarySection.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/content/dependencies/generateCommentarySection.js b/src/content/dependencies/generateCommentarySection.js
new file mode 100644
index 00000000..8ae1b2d0
--- /dev/null
+++ b/src/content/dependencies/generateCommentarySection.js
@@ -0,0 +1,29 @@
+export default {
+  contentDependencies: [
+    'transformContent',
+    'generateCommentaryEntry',
+    'generateContentHeading',
+  ],
+
+  extraDependencies: ['html', 'language'],
+
+  relations: (relation, entries) => ({
+    heading:
+      relation('generateContentHeading'),
+
+    entries:
+      entries.map(entry =>
+        relation('generateCommentaryEntry', entry)),
+  }),
+
+  generate: (relations, {html, language}) =>
+    html.tags([
+      relations.heading
+        .slots({
+          id: 'artist-commentary',
+          title: language.$('misc.artistCommentary')
+        }),
+
+      relations.entries,
+    ]),
+};