skohub-io / skohub-vocabs

A lightweight tool to publish SKOS Vocabularies
https://skohub.io/
Apache License 2.0
34 stars 25 forks source link

Support local namespaces #26

Closed acka47 closed 6 months ago

acka47 commented 5 years ago

It would be great to just publish a SKOS vocab on GitHub and then be able to have all the functionality in SkoHub without setting up a redirect.

Background

I wanted to publish https://github.com/tawahle/destatis_faecherklassifikation/blob/master/faecherklassifikation.rdf with SkoHub for interested parties to inspect the vocabulary. Everything worked quite well, the classification was shown as expected. However, clicking on a concept made a problem of course, because the concept URIs (namespace https://onto.tib.eu/destf/cs/) do not redirect to SkoHub (in fact, they do not go anywhere).

As I am not in control of the domain and did not want to use another HTTP namespace where I'd have to setup a redirect myself, I tried to use a local namespaces. This did not work, and in fact sometimes even broke the other Skohub-published vocab in the repo:

literarymachine commented 5 years ago

+1

I had the same issue when publishing https://test.skohub.io/literarymachine/skos/purl.org/dcx/lrmi-vocabs/educationalAudienceRole/

acka47 commented 5 years ago

Hmm, but it does work for https://test.skohub.io/literarymachine/skos/purl.org/dcx/lrmi-vocabs/educationalAudienceRole/. What did you do differenly?

literarymachine commented 5 years ago

Hmm, but it does work for https://test.skohub.io/literarymachine/skos/purl.org/dcx/lrmi-vocabs/educationalAudienceRole/. What did you do differenly?

What I meant is that I published it using a purl.org namespace without redirect configuration to skohub. What was different though, is that in my case the tree navigation used relative links. There was a bug preventing this for https URIs which I fixed in https://github.com/hbz/skohub-ssg/pull/22/commits/4951621d5f178561fd0b8e4a70bd937c02c831e0:

https://test.skohub.io/literarymachine/skos/onto.tib.eu/destf/cs/

acka47 commented 5 years ago

Ok, this fixes the problem I had. Leaving the issue open nonetheless although the priority is not very high by now.

sebilasse commented 2 years ago

tree navigation used relative links

workaround: if we publish to github pages we can change pathPrefix in gatsby-config to the name of the repo, example

module.exports = {
  siteMetadata: {
    title: `SkoHub-Vocabs`,
    description: `Static site generator for Simple Knowledge Management Systems (SKOS)`,
    author: `@gatsbyjs`,
  },
  pathPrefix: `/vocab/`,
  ...
}
sroertgen commented 6 months ago

This is possible with https://github.com/skohub-io/skohub-vocabs/pull/272

You can provide a customDomain in the config file and it will be used to build your vocabulary.

acka47 commented 6 months ago

Actually, I am not sure whether this really works. Reopening until I see a running example.

The use case it this:

I tried this at https://github.com/acka47/testing-skohub-vocabs and the build won't work. Did I do something wrong?

acka47 commented 6 months ago

The original use case is covered with https://github.com/skohub-io/skohub-vocabs/issues/271 & https://github.com/skohub-io/skohub-docker-vocabs/issues/21. Closing this ticket now.