wiki-plugin-meta
v0.1.0
Published
Holds a page's link typing and other metadata in one item, renders it as a typed link list, and publishes it as a data source.
Readme
wiki-plugin-meta
A Federated Wiki plugin that holds a page's link typing, and its other metadata, in one item — so links keep their meaning without being herded into sections.
It then uses what it knows to weight the page's links, to draw the page's graph,
and to stand in for the # See list.
The item
Line oriented, following the fedwiki DSL convention. An UPPERCASE first word
names a typed link, a lowercase key: line carries a scalar, and VIEW is
reserved for choosing the display.
CONCEPT From and To
CONCEPT Data Source
FROM Type by Section
TO Page Metadata Plan
VIEW list
purpose: link typing without sectionsAny uppercase word is a valid type. The plugin stores what a page declares
rather than owning the vocabulary; CONCEPT is the only type it treats
specially, because that is the one the display leans on.
Weighting the links
Links named as a CONCEPT take full colour and weight. Every other internal
link on the page recedes — underline kept, colour dropped — and returns to full
strength on hover and on keyboard focus.
Nothing is hidden. A quiet link is still a link, still underlined, still reachable by tab. Colour is never the only signal: the two treatments differ by luminance (10.04:1 and 5.00:1 against white, 2.01 between them) as well as by hue, weight and underline style.
A page whose meta item names no concepts is left exactly as the wiki drew it. There is no treatment without a signal.
Views
| VIEW | shows |
| --- | --- |
| list | the typed links as a bulleted list — what a # See section looks like today |
| graph | the typed links as a directed graph |
| backlinks | what points at this page, drawn from graphviz's own BACKLINKS primitive |
| journal | the page's own history |
Buttons in the corner of the item switch view for reading. They do not edit the
item, so the VIEW line stays the page's persisted default.
The graph views need wiki-plugin-graphviz, which is loaded on demand. No graph
code lives here: this plugin produces DOT and delegates the drawing.
As a data source
The item marks itself meta-source and exposes getMeta() on its DOM node,
following the convention wiki-plugin-roster (roster-source / getRoster)
and wiki-plugin-force (force-source / forceData) already use.
Consumers take the nearest preceding item carrying the class and call the
accessor, falling back to wiki.getData(). So a source must sit above
anything that reads it — an item in a page footer is a terminus, not a source.
That is what lets a graph, a table, or anything written later read a page's typed links without knowing this plugin exists.
Install
npm install wiki-plugin-metaThen restart the wiki — the plugin and factory maps are built at startup.
Development
npm install
npm test # node --test
npm run build # esbuild -> client/meta.jsLicence
MIT — see LICENSE.
