]> Lady’s Gitweb - Beorn/commitdiff
Fix icon and logo to point to nodes current 0.2.4
authorLady <redacted>
Sat, 27 May 2023 00:02:43 +0000 (17:02 -0700)
committerLady <redacted>
Sat, 27 May 2023 00:02:43 +0000 (17:02 -0700)
These properties do not take literal values in Awol; they should
instead be given an `rdf:resource`.

build.js

index 76f2083baccc1dd0dcc0cc61f0533b533521d829..7299dc03874219b5eb42fe6a712445391577a8da 100755 (executable)
--- a/build.js
+++ b/build.js
@@ -467,7 +467,8 @@ const applyMetadata = (node, metadata) => {
           default: {
             // The property describes (potentially rich) text.
             if (value == null) {
-              // The property has no value; skip appending it to the node.
+              // The property has no value; skip appending it to the
+              // node.
               continue;
             } else if (Object(value) instanceof String) {
               // The property has a string value.
@@ -532,13 +533,13 @@ const context = Object.freeze({
   icon: Object.freeze({
     namespace: AWOL,
     localName: "icon",
-    type: "literal",
+    type: "node",
   }),
   // link is provided by the build script
   logo: Object.freeze({
     namespace: AWOL,
     localName: "logo",
-    type: "literal",
+    type: "node",
   }),
   published: Object.freeze({
     namespace: DC11,
@@ -801,6 +802,10 @@ const metadataFromDocument = (
       const { [name]: existing } = result;
       const content = (() => {
         switch (type) {
+          case "node": {
+            // The node points to another node.
+            return node.getAttributeNS(RDF, "resource");
+          }
           case "person": {
             // The node describes a person.
             const base =
This page took 0.028816 seconds and 4 git commands to generate.