From 154f89caf5a11eea9291681cbd06a30f9fede893 Mon Sep 17 00:00:00 2001 From: mraadgev Date: Thu, 9 May 2024 15:35:50 +1000 Subject: [PATCH 1/5] Added Meta tags for Zenodo integration --- configuration.json | 183 +++++++++++++++--- package.json | 1 + portal/package.json | 1 + .../src/components/Collection.component.vue | 157 ++++++++++----- portal/src/main.js | 6 +- 5 files changed, 267 insertions(+), 81 deletions(-) diff --git a/configuration.json b/configuration.json index 58a71bf..ab15771 100644 --- a/configuration.json +++ b/configuration.json @@ -19,7 +19,11 @@ "citationText": "CITE AS: Oni Platform. A project with co-investment from Australian Research Data Commons, The University of Queensland, The University of Melbourne, The University of Sydney, Monash University, First Languages Australia and AARNet." }, "subHelpLinks": [ - {"name": "Example Link", "href":"https://www.example.com", "target":"_blank"} + { + "name": "Example Link", + "href": "https://www.example.com", + "target": "_blank" + } ], "terms": { "text": "Example terms of service", @@ -28,7 +32,7 @@ }, "privacy": { "text": "Example privacy notice", - "href":"/privacy", + "href": "/privacy", "title": "Privacy Notice" }, "email": { @@ -68,31 +72,60 @@ "enforced": false, "URL": "https://registry-test.ldaca.edu.au/registry/co_petitions/start/coef:9" }, - "topNavItems": [ { - "route": "search?f=%257B%2522%2540type%2522%253A%255B%2522RepositoryCollection%2522%255D%252C%2522_isTopLevel.%2540value%2522%253A%255B%2522true%2522%255D%257D", - "display": "Top Collections" - }, { - "route": "search?f=%257B%2522%2540type%2522%253A%255B%2522RepositoryCollection%2522%255D%257D", - "display": "Collections" - }, + "topNavItems": [ + { + "route": "search?f=%257B%2522%2540type%2522%253A%255B%2522RepositoryCollection%2522%255D%252C%2522_isTopLevel.%2540value%2522%253A%255B%2522true%2522%255D%257D", + "display": "Top Collections" + }, + { + "route": "search?f=%257B%2522%2540type%2522%253A%255B%2522RepositoryCollection%2522%255D%257D", + "display": "Collections" + }, { "route": "/search?f=%257B%2522%2540type%2522%253A%255B%2522SoftwareApplication%2522%255D%257D", "display": "Notebooks" - }], + } + ], "search": { "sorting": [ - {"value": "relevance", "label": "Relevance"}, - {"value": "_isTopLevel.@value.keyword", "label": "Collections"}, - {"value": "name", "label": "Name", "field": "name.@value.keyword"} + { + "value": "relevance", + "label": "Relevance" + }, + { + "value": "_isTopLevel.@value.keyword", + "label": "Collections" + }, + { + "value": "name", + "label": "Name", + "field": "name.@value.keyword" + } ], - "searchSorting": {"value": "relevance", "label": "Relevance"}, + "searchSorting": { + "value": "relevance", + "label": "Relevance" + }, "ordering": [ - {"value": "asc", "label": "Ascending"}, - {"value": "desc", "label": "Descending"} + { + "value": "asc", + "label": "Ascending" + }, + { + "value": "desc", + "label": "Descending" + } ], - "defaultOrder": {"value": "desc", "label": "Descending"}, + "defaultOrder": { + "value": "desc", + "label": "Descending" + }, "searchDetails": [ - {"field": "language", "label": "Language", "name": "language.name.@value"} + { + "field": "language", + "label": "Language", + "name": "language.name.@value" + } ] }, "main": { @@ -128,6 +161,66 @@ "citation" ] }, + "head": { + "meta": [ + { + "name": "dc.title", + "content": "name" + }, + { + "name": "dc.description", + "content": "description" + }, + { + "name": "dc.creator", + "content": "creator" + }, + { + "name": "dc.contributor", + "content": "contributor" + }, + { + "name": "dc.date", + "content": "datePublished" + }, + { + "name": "dc.coverage", + "content": "temporalCoverage" + }, + { + "name": "dc.language", + "content": "language" + }, + { + "name": "dc.identifier", + "content": "@id" + }, + { + "name": "dc.publisher", + "content": "publisher" + }, + { + "name": "dc.description", + "content": "description" + }, + { + "name": "dc.type", + "content": "@type" + }, + { + "name": "dc.type", + "content": "materialType" + }, + { + "name": "dc.license", + "content": "license" + }, + { + "name": "dc.date", + "content": "dateCreated" + } + ] + }, "collection": { "name": { "display": "Name", @@ -175,7 +268,13 @@ "displayHasMember": false, "displayHasPart": true }, - "relationships": [{"name":"notebook", "display":"Notebooks", "type":"SoftwareApplication"}] + "relationships": [ + { + "name": "notebook", + "display": "Notebooks", + "type": "SoftwareApplication" + } + ] }, "object": { "name": { @@ -333,8 +432,10 @@ "authorization": { "provider": "rems", "enrollment": { - "enforced": false, - "groups": ["CO:Members:all"], + "enforced": false, + "groups": [ + "CO:Members:all" + ], "URL": "https://registry-test.ldaca.edu.au/registry/co_petitions/start/coef:9" }, "rems": { @@ -440,13 +541,34 @@ } }, "fields": { - "name.@value": {"label": "Name", "checked": true}, - "description.@value": {"label": "Description", "checked": true}, - "language.name.@value": {"label": "Language", "checked": true}, - "language.alternateName.@value": {"label": "Alternate Language Name", "checked": true}, - "contributor.@value": {"label": "Contributor", "checked": true}, - "creator.@value": {"label": "Creator", "checked": true}, - "_text": {"label": "Text", "checked": true} + "name.@value": { + "label": "Name", + "checked": true + }, + "description.@value": { + "label": "Description", + "checked": true + }, + "language.name.@value": { + "label": "Language", + "checked": true + }, + "language.alternateName.@value": { + "label": "Alternate Language Name", + "checked": true + }, + "contributor.@value": { + "label": "Contributor", + "checked": true + }, + "creator.@value": { + "label": "Creator", + "checked": true + }, + "_text": { + "label": "Text", + "checked": true + } }, "aggregations": [ { @@ -575,7 +697,6 @@ "object": "https://w3id.org/ldac/profile#Object", "notebook": "https://w3id.org/ldac/profile#Notebook" }, - "skipByMatch": [ - ] + "skipByMatch": [] } -} +} \ No newline at end of file diff --git a/package.json b/package.json index ca20aa9..9f98126 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "octokit": "^2.0.5", "ro-crate": "^3.2.1", "sanitize-filename": "^1.6.3", + "vue-head": "^2.2.0", "winston": "^3.3.3" } } diff --git a/portal/package.json b/portal/package.json index b077b1c..d5edac8 100644 --- a/portal/package.json +++ b/portal/package.json @@ -25,6 +25,7 @@ "@fortawesome/vue-fontawesome": "^3.0.1", "@jbtje/vue3pdf": "^2.0.0", "@tailwindcss/line-clamp": "^0.4.0", + "@unhead/vue": "^1.9.9", "convert-size": "^1.2.1", "core-js": "^3.16.4", "date-fns": "^2.16.1", diff --git a/portal/src/components/Collection.component.vue b/portal/src/components/Collection.component.vue index f946176..521c600 100644 --- a/portal/src/components/Collection.component.vue +++ b/portal/src/components/Collection.component.vue @@ -2,34 +2,30 @@
- + {{ first(this.name)?.['@value'] }}
-
+
- + - + - + - + @@ -38,33 +34,32 @@
Access
-
+

Content in this collection is licensed as:

+ :aggregations="{ 'license.name.@value': { 'terms': { 'field': 'license.name.@value.keyword', 'size': '1000' } } }" + :fields="[{ 'name': 'license.@id', 'display': 'Licenses' }]" :name="'license.@id'" :fieldName="'license'" + :external="true" :id="this.$route.query.id" :root="this.metadata._root" />
- +
Content
-
+
+ :id="this.$route.query.id" :root="this.metadata._root" /> + :fields="[{ 'name': 'license.name.@value', 'display': 'Data licenses for access' }]" :name="'licenses'" + :id="this.$route.query.id" :root="this.metadata._root" />
@@ -72,18 +67,14 @@
Retrieve Metadata
-
- +
+