Skip to content

Commit

Permalink
chore: upgrade to Trifid v5
Browse files Browse the repository at this point in the history
  • Loading branch information
ludovicm67 committed Mar 25, 2024
1 parent f6cc9be commit 859f09f
Show file tree
Hide file tree
Showing 25 changed files with 2,867 additions and 3,731 deletions.
111 changes: 42 additions & 69 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,127 +12,82 @@ template:

globals:
datasetBaseUrl: https://ld.admin.ch/
sparqlEndpoint:
url: https://test.lindas.admin.ch/query
endpoints:
default:
url: /query

middlewares:
plugins:
assets:
module: trifid-core/middlewares/static.js
order: 0
module: trifid-core/plugins/static.js
paths: /swiss-assets
config:
directory: file:node_modules/swiss-styleguide/build

static-assets:
module: trifid-core/middlewares/static.js
order: 0
module: trifid-core/plugins/static.js
paths: /static-assets
config:
directory: file:static

rewrite:
module: trifid-core/middlewares/rewrite.js
i18n:
module: trifid-plugin-i18n
config:
directory: file:locales
updateFiles: false
locales:
- en
- fr
- de
- it

welcome:
module: trifid-core/middlewares/view.js
module: trifid-core/plugins/view.js
paths: /
methods: GET
config:
path: views/welcome.hbs
publish:
module: trifid-core/middlewares/view.js
paths: /publish
methods: GET
config:
path: views/publish.hbs

ckan:
module: "@zazuko/trifid-plugin-ckan"
order: 30
paths: /ckan

entity-renderer:
module: "@zazuko/trifid-entity-renderer"
config:
path: views/entity.hbs
labelLoader:
# labelNamespaces: # Labels will be fetched for URIs that start with this list (if omitted, fetches for all URIs)
# - https://lindas.zazukoians.org
# - https://ld.admin.ch
chunkSize: 30
concurrency: 2
timeout: 4000

yasgui:
module: trifid-plugin-yasgui
paths: /sparql
config:
urlShortener: https://s.zazuko.com/api/v1/shorten
template: file:views/yasgui.hbs

graph-explorer:
module: trifid-plugin-graph-explorer
paths: /graph-explorer

spex:
module: trifid-plugin-spex
paths: /spex

search:
module: file:plugins/search/index.js
paths:
- /datasets

sparql-proxy:
module: "@zazuko/trifid-plugin-sparql-proxy"
paths: /query
config:
queryOperation: postQueryUrlencoded
rewriteQueries: true
cache:
prefix: lindas-zazukoians-org
url: env:SPARQL_PROXY_CACHE_URL
clearAtStartup: env:SPARQL_PROXY_CACHE_CLEAR_AT_STARTUP

handle-redirects-demo:
module: "@zazuko/trifid-handle-redirects"

sparql-handler:
module: trifid-handler-sparql
config:
containerExistsQuery: 'ASK { ?s a ?o. FILTER REGEX(STR(?s), "^${iri}") }'
resourceGraphQuery: "#pragma describe.strategy cbd\nDESCRIBE <${iri}>"
containerGraphQuery: 'CONSTRUCT { ?s a ?o. ?s <http://www.w3.org/2000/01/rdf-schema#label> ?label. } WHERE { ?s a ?o. OPTIONAL {?s <http://www.w3.org/2000/01/rdf-schema#label> ?label.} FILTER REGEX(STR(?s), "^${iri}") }'

i18n:
module: trifid-plugin-i18n
order: 5
config:
directory: file:locales
locales:
- en
- fr
- de
- it
allowRewriteToggle: false
rewrite: true
rewriteQuery: true
rewriteResults: true
endpointUrl: https://test.lindas.admin.ch/query

menu:
module: file:plugins/menu/index.js
order: 80
config:
namespace: header
entries:
- path: /
label: About
- path: /datasets/
label: Datacatalog
label: Data Catalog
- path: /sparql/
label: Query Data
- path: /publish/
label: Publish Data

content:
module: "@zazuko/trifid-markdown-content"
order: 80
config:
defaults:
autoLink: true # create links from headings
Expand All @@ -148,7 +103,7 @@ middlewares:
entries:
lindas:
directory: file:content/template-parts
# entries used in templates using `{{{ locals.markdown-content-plugin.lindas.XXXXXXXX }}}`
# entries used in templates using `{{{ session.markdown-content-plugin-plugin.lindas.XXXXXXXX }}}`

lindas-root:
directory: file:content/root-pages
Expand All @@ -165,3 +120,21 @@ middlewares:
lindas-technology:
directory: file:content/technology
mountPath: /technology/

entity-renderer:
module: "@zazuko/trifid-entity-renderer"
config:
path: views/entity.hbs
labelLoader:
chunkSize: 30
concurrency: 2
timeout: 4000
followRedirects: true

rewrite: true

# Custom queries to get information about a resource or container
resourceExistsQuery: "ASK { GRAPH ?g { <{{iri}}> ?p ?o }}"
resourceGraphQuery: "#pragma describe.strategy cbd\nDESCRIBE <{{iri}}>"
containerExistsQuery: "ASK { GRAPH ?g { <{{iri}}> ?p ?o }}"
containerGraphQuery: "#pragma describe.strategy cbd\nDESCRIBE <{{iri}}>"
9 changes: 0 additions & 9 deletions content/root-pages/publish/de.md

This file was deleted.

9 changes: 0 additions & 9 deletions content/root-pages/publish/en.md

This file was deleted.

5 changes: 0 additions & 5 deletions content/root-pages/publish/fr.md

This file was deleted.

5 changes: 0 additions & 5 deletions content/root-pages/publish/it.md

This file was deleted.

76 changes: 72 additions & 4 deletions locales/de.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,74 @@
{
"About": "Einführung",
"Datacatalog": "Daten Katalog",
"Query Data": "Daten Abfragen",
"Publish Data": "Publish Data"
"_Menu Top": "All Top Level Menu Points",
"Data Catalog": "Datensätze",
"Query Data": "Daten abfragen",
"Ecosystem": "Ökosystem",
"Data Usage": "Daten nutzen",
"Governance": "Governance",
"Know How": "Know How",
"Community": "Community",
"_Header": "All header elements",
"All federal authorities": "Alle Schweizer Bundesbehörden",
"All federal authorities Ref": "https://www.admin.ch/gov/de/start.html",
"_Footer": "All footer elements",
"About_us": "Über uns",
"About_us-long": "Das Bundesarchiv (BAR) stellt den Linked Data Service LINDAS bereit.",
"About_us-extra-not-published": "Das Schweizerische Bundesarchiv (BAR) sichert die Dokumentation staatlichen Handelns und macht diese zugänglich. Einige dieser Informationen existieren nur in digitaler Form in Datenbanken. LINDAS ist die Lösung, die den Inhalt dieser Datenbanken der Öffentlichkeit in Form von Wissensgraphen zugänglich macht, die direkt durchsuchbar sind und das größte Potenzial für die Wiederverwendung bieten.",
"Legal Framework": "Rechtliches",
"Legal Framework Ref": "https://www.admin.ch/gov/de/start/rechtliches.html",
"Contact": "Kontakt",
"Further Information": "Weitere Informationen",
"Copyright_SFA": "Schweizerisches Bundesarchiv BAR",
"Feedback Documentation": "Feedback zur Dokumentation",
"_Menu Ecosystem": "",
"About LINDAS short": "Über LINDAS",
"About LINDAS long": "Was ist LINDAS, wer sind die Ansprechstellen und was ist die Geschichte von LINDAS.",
"LINDAS Ecosystem short": "Das LINDAS Ökosystem",
"LINDAS Ecosystem long": "Welche Werkzeuge beinhaltet das LINDAS Ökosystem, um einen durchgehenden Datenfluss für Linked Data zu ermöglichen.",
"Publish Data short": "Daten publizieren",
"Publish Data long": "Wer kann auf LINDAS Daten publizieren, wie ist das Vorgehen und welche Anforderungen an den Datenschutz gelten.",
"Applications short": "Anwendungen",
"Applications long": "Welche Applikationen existieren bereits, die LINDAS Daten nutzen.",
"_Menu Data Usage": "",
"Data Overview short": "Überblick über die Daten",
"Data Overview long": "Welche Datensätze aus welchen Domänen sind auf LINDAS vorhanden. \n\n(nur in Englisch)",
"Search Datasets short": "Datensätze suchen",
"Search Datasets long": "Wie können Datensätze auf LINDAS gefunden werden. \n\n(nur in Englisch)",
"Data Usage Types short": "Möglichkeiten der Datennutzung",
"Data Usage Types long": "Welche technischen Möglichkeiten zur Nutzung von LINDAS Daten existieren. \n\n(nur in Englisch)",
"Fedlex short": "Fedlex",
"Fedlex long": "Alle Informationen über Linked Data der Bundesrechtsplattform Fedlex der Bundeskanzlei. \n\n(nur in Englisch)",
"_Menu Governance": "",
"Namespaces short": "Namespaces",
"Namespaces long": "Namespaces des Bundes, Anatomie und Überblick über mögliche Namespaces, neue Subdomains beantragen. \n\n(nur in Englisch)",
"URI Templates short": "URI Templates",
"URI Templates long": "Welche Templates werden genutzt, um URI für LINDAS zu konstruieren. \n\n(nur in Englisch)",
"Core Entities short": "Zentrale Entitäten",
"Core Entities long": "Was sind zentrale Entitäten, Listen von zentralen Entitäten und ihre Funktion. \n\n(nur in Englisch)",
"Concepts short": "Konzepte",
"Concepts long": "Informationen zu: Ontologien, Schemas, Controlled Vocabularies, Register, Shared Dimensions. \n\n(nur in Englisch)",
"Authorization short": "Zugriffssteuerung",
"Authorization long": "Konventionen zu Named Graphs als Element der Zugriffssteuerung und zu Benutzerinnennamen. \n\n(nur in Englisch)",
"_Menu Know How": "",
"About Linked Data short": "Über Linked Data",
"About Linked Data long": "Was ist Linked Data und welche Vorteile ergeben sich aus der Nutzung von Linked Data. \n\n(nur in Englisch)",
"Tutorials short": "Tutorials",
"Tutorials long": "Schritt für Schritt Anleitungen zum Arbeiten mit LINDAS Daten in Form von interaktiven Notebooks. \n\n(nur in Englisch)",
"Data Models short": "Datenmodelle",
"Data Models long": "Beschreibung verschiedener Datenmodelle, die in LINDAS zur Anwendung kommen. \n\n(nur in Englisch)",
"FA Queries short": "Frequently Asked Queries",
"FA Queries long": "Sammlung von häufig nachgefragten SPARQL Queries inklusive Erklärungen zu den Abfragen. \n\n(nur in Englisch)",
"Resources short": "Ressourcen",
"Resources long": "Links auf hilfreiche Ressourcen, um die Grundlagen von Linked Data zu lernen. \n\n(nur in Englisch)",
"_Menu Community": "",
"News short": "Neuigkeiten",
"News long": "Neuigkeiten rund um das Linked Data Ökosystem LINDAS.",
"Linked Data Day short": "Linked Data Day",
"Linked Data Day long": "Rück- und Ausblick zu den jährlichen Linked Data Days des Bundesarchivs.",
"Linked Data Meetup short": "Linked Data Meetup",
"Linked Data Meetup long": "Rück- und Ausblick zu den regelmässig stattfindenden PraktikerInnen-Treffen für Linked Data NutzerInnen.",
"Communication Channels short": "Kommunikationskanäle",
"Communication Channels long": "Welche Kommunikationskanäle rund um LINDAS existieren.",
"_Div": "",
"homePageYouTubeVideoID": "c9miuepW03A"
}
76 changes: 72 additions & 4 deletions locales/en.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,74 @@
{
"About": "About",
"Datacatalog": "Datacatalog",
"Query Data": "Query Data",
"Publish Data": "Publish Data"
"_Menu Top": "All Top Level Menu Points",
"Data Catalog": "Datasets",
"Query Data": "Querying Data",
"Ecosystem": "Ecosystem",
"Data Usage": "Using Data",
"Governance": "Governance",
"Know How": "Know-how",
"Community": "Community",
"_Header": "All header elements",
"All federal authorities": "All federal authorities",
"All federal authorities Ref": "https://www.admin.ch/gov/en/start.html",
"_Footer": "All footer elements",
"About_us": "About us",
"About_us-long": "The Swiss Federal Archives (SFA) provide the Linked Data Service LINDAS.",
"About_us-extra-not published here": "The Swiss Federal Archives preserve the documentation of government actions and make it accessible. Some of this information exist only available in digital form in databases. LINDAS is the solution that makes the content of these databases publicly available as knowledge graphs, directly searchable, and offering the best reuse potential.",
"Legal Framework": "Terms and conditions",
"Legal Framework Ref": "https://www.admin.ch/gov/en/start/terms-and-conditions.html",
"Contact": "Contact",
"Further Information": "Further Information",
"Copyright_SFA": "Swiss Federal Archives SFA",
"Feedback Documentation": "Feedback on the Documentation",
"_Menu Ecosystem": "",
"About LINDAS short": "About LINDAS",
"About LINDAS long": "What is LINDAS, who the contact are, and its history.",
"LINDAS Ecosystem short": "The LINDAS Ecosystem",
"LINDAS Ecosystem long": "What tools the LINDAS ecosystem offers to enable end-to-end flow of linked data.",
"Publish Data short": "Publishing Data",
"Publish Data long": "Who can publish data on LINDAS, what the procedure is, and what data protection requirements apply.",
"Applications short": "Applications",
"Applications long": "What applications already exist that use LINDAS data.",
"_Menu Data Usage": "",
"Data Overview short": "Overview of the Data",
"Data Overview long": "Which datasets from which domains are available on LINDAS.",
"Search Datasets short": "Searching for Datasets",
"Search Datasets long": "How to find datasets on LINDAS.",
"Data Usage Types short": "Ways of Using Data",
"Data Usage Types long": "What technical options exist for using LINDAS data.",
"Fedlex short": "Fedlex",
"Fedlex long": "Full information about linked data on the Federal Chancellery’s Fedlex federal law platform.",
"_Menu Governance": "",
"Namespaces short": "Namespaces",
"Namespaces long": "Federal government namespaces, anatomy and overview of possible namespaces, applying for new subdomains.",
"URI Templates short": "URI Templates",
"URI Templates long": "Which templates are used to construct URI for LINDAS.",
"Core Entities short": "Core Entities",
"Core Entities long": "What core entities are, lists of core entities and their function.",
"Concepts short": "Concepts",
"Concepts long": "Information on ontologies, schemas, controlled vocabularies, registers, shared dimensions.",
"Authorization short": "Access Control",
"Authorization long": "Conventions for named graphs as an element of access control and for user names.",
"_Menu Know How": "",
"About Linked Data short": "About Linked Data",
"About Linked Data long": "What linked data is and the benefits of using it.",
"Tutorials short": "Tutorials",
"Tutorials long": "Step-by-step instructions on how working with LINDAS data in the form of interactive notebooks.",
"Data Models short": "Data Models",
"Data Models long": "A description of various data models that are used in LINDAS.",
"FA Queries short": "Frequently Asked Queries",
"FA Queries long": "Collection of frequently asked SPARQL queries including explanations.",
"Resources short": "Resources",
"Resources long": "Links to useful resources for learning the basics of linked data.",
"_Menu Community": "",
"News short": "News",
"News long": "News about the Linked Data Ecosystem LINDAS.",
"Linked Data Day short": "Linked Data Day",
"Linked Data Day long": "A look back and ahead at the Federal Archives' annual Linked Data Days.",
"Linked Data Meetup short": "Linked Data Meetup",
"Linked Data Meetup long": "A look back and ahead at the regular practitioner meetings for linked data users.",
"Communication Channels short": "Communication Channels",
"Communication Channels long": "What communication channels exist around LINDAS.",
"_Div": "",
"homePageYouTubeVideoID": "FFrK0ZyYAl4"
}
Loading

0 comments on commit 859f09f

Please sign in to comment.