@kopflos-cms/plugin-query
v1.0.0
Published
This Kopflos plugin provides a SPARQL query interface and proxy.
Readme
@kopflos-cms/plugin-query
This Kopflos plugin provides a SPARQL query interface and proxy.
Features
- YASGUI Interface: Serves a static HTML page with YASGUI loaded from CDN at
/-/query. - SPARQL Proxy: Routes at
/-/query/{endpoint}proxy SPARQL queries to the endpoints configured in your Kopflos configuration.
Installation
npm install @kopflos-cms/plugin-queryUsage
Add the plugin to your kopflos.config.ts:
import { KopflosConfig } from '@kopflos-cms/core'
import QueryPlugin from '@kopflos-cms/plugin-query'
export default <KopflosConfig>{
// ... other config
sparql: {
default: 'https://your-sparql-endpoint.com/query',
// ... other endpoints
},
plugins: [
// ... other plugins
new QueryPlugin(),
],
}Once registered, you can access the query interface at /-/query.
The plugin will automatically register proxy routes for all SPARQL endpoints defined in your configuration.
