https://github.com/natlibfi/skosmos-widget-wiki
https://github.com/natlibfi/skosmos-widget-wiki
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/natlibfi/skosmos-widget-wiki
- Owner: NatLibFi
- Created: 2017-12-07T07:01:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-30T12:09:58.000Z (almost 4 years ago)
- Last Synced: 2025-01-21T14:46:13.811Z (over 1 year ago)
- Language: CSS
- Size: 78.1 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Skosmos plugin for displaying wikipedia articles on concept pages
### Motivation
In order to improve user experience for users of a Skosmos installation, display the corresponding wikipedia page in a plugin.
### How does it work?
This plugin fulfills the requirements for [Skosmos](https://github.com/NatLibFi/Skosmos) [plugins](https://github.com/NatLibFi/Skosmos/wiki/Plugins). Functionality-wise, reads concept data as JSON-LD and searches for the possible wikidata link. If one is found, looks for the best available content language wikipedia page (which is determined by the preferred language order of the Skosmos vocabulary) and asynchronically queries that via the [Wikipedia REST API](https://en.wikipedia.org/api/rest_v1/). Finally, the response is rendered to the user.
### Noteworthy
- Pollutes the global namespace with `WIKI`.
- If one wants to update the wiki css, run `prepender.py --input $INPUT --output $OUTPUT --prepend-with "#wiki"` (see the file for details) on an unminified file to prepend the input file CSS selectors with `#wiki` in order to avoid polluting the global css definitions.
- Please also remember to add LICENSE information for each CSS file (also supported in `prepender.py`).