Knowledge Wiki Forever
This page collects working examples of features available in the updated NeoWiki installation on this wiki.
Subject rendering with {{#view}}[edit]
The updated NeoWiki can render a Subject directly on a page.
Source:
{{#view:s1demo1aaaaaaa1}}
Result:
Read values inline with {{#neowiki_value}}[edit]
This parser function lets wikitext read structured data without writing Lua or Cypher.
Source:
Founded year: {{#neowiki_value:Founded at|page=ACME Inc}}
Products: {{#neowiki_value:Products|page=ACME Inc|separator=, }}
Museum visitors: {{#neowiki_value:Annual visitors|page=Rijksmuseum}}
Website: {{#neowiki_value:Websites|page=ACME Inc}}
Result:
- Founded year: 2005
- Products: Foo,Bar,Baz
- Museum visitors: 2700000
- Website: https://acme.example
Run read-only Cypher with {{#cypher_raw}}[edit]
The updated NeoWiki keeps the raw Cypher parser function for debugging and exploration.
Source:
{{#cypher_raw:MATCH (m:Museum) RETURN m.name AS name, m.`Annual visitors` AS visitors ORDER BY visitors DESC LIMIT 5}}
Result:
[
{
"name": "Mus\u00e9e d'Orsay",
"visitors": 3270000
},
{
"name": "Museo del Prado",
"visitors": 3200000
},
{
"name": "Rijksmuseum",
"visitors": 2700000
},
{
"name": "Kunsthistorisches Museum",
"visitors": 1800000
}
]
Special pages and page-level subject management[edit]
The newer UI adds or improves dedicated management surfaces.
- Special:Schemas for schema administration
- Special:Layouts for layout administration
- ACME Inc data tab for page-level subject management
Lua API via mw.neowiki[edit]
The newer Lua API is one of the biggest additions. It exposes structured data directly to Scribunto modules.
local nw = require( 'mw.neowiki' )
local founded = nw.getValue( 'Founded at', { page = 'ACME Inc' } )
local products = nw.getAll( 'Products', { page = 'ACME Inc' } )
local subject = nw.getMainSubject( 'ACME Inc' )
local sameSubject = nw.getSubject( 's1demo1aaaaaaa1' )
local children = nw.getChildSubjects( 'ACME Inc' )
local schema = nw.getSchema( 'Company' )
local museums = nw.query(
'MATCH (m:Museum) RETURN m.name AS name, m.`Annual visitors` AS visitors ORDER BY visitors DESC LIMIT 3'
)
Functions now documented and available in the updated extension include:
getValuegetAllgetMainSubjectgetSubjectgetChildSubjectsgetSchemaquery
REST API examples[edit]
NeoWiki now has a documented REST surface under /neowiki/v0/*.
GET /rest.php/neowiki/v0/subject/s1demo1aaaaaaa1
GET /rest.php/neowiki/v0/schema/Company
GET /rest.php/neowiki/v0/layout/{layoutName}
GET /rest.php/neowiki/v0/layouts
GET /rest.php/neowiki/v0/page/{pageId}/subjects
PUT /rest.php/neowiki/v0/subject/{subjectId}
If you want the generated OpenAPI spec exposed on this wiki, enable it in LocalSettings.php:
$wgRestAPIAdditionalRouteFiles[] = 'includes/Rest/specs.v0.json';
Newer property-type support[edit]
The updated NeoWiki adds stronger support for select and dateTime property types, including better validation and editing behavior.
Example schema snippets:
{
"name": "Status",
"type": "select",
"options": [
{ "id": "active", "label": "Active" },
{ "id": "paused", "label": "Paused" }
]
}
{
"name": "Launch time",
"type": "dateTime",
"required": true
}
Layouts and multiple presentations[edit]
Layouts now have a more complete editing and management workflow. The key entry point is Special:Layouts.
The idea is that one Subject can be shown in multiple ways depending on context, while the underlying structured data remains the same.
Notes[edit]
This page is intentionally a compact feature showcase for the newer NeoWiki build now running on this wiki.