This repo contains a CLI for Wiki.js written in Python (1). (1) because I master Python
For some reason free software Wiki implementations are a bit complicated...
In the past, I used the MoinMoin Wiki but MoinMoin2 was never released as stable.
Then I used Redmine Wiki but it is not well suited for smartphone and this component is not the most maintained, moreover it require an extension for dangling pages.
I also tried MediaWiki but it is specialised for Wikipedia, written in PHP and customising the CSS is a nightmare.
Then I discovered Wiki.js and its modern look-and-feel.
o
But later I discovered that in fact it was not ready for production and had several issues.
Wiki.js was developed by only one person, that implemented successively three versions, but none was ever completed. Some users call it a vaporware. Maybe too much people expect free support for such a tool...
Despite this situation, Wiki.js features a GraphQL API which permits to interact with the server.
Wiki.js 2 client uses the Vue.js - The Progressive JavaScript Framework | Vue.js
framework. The vega branch aka version 3 uses Quasar Framework.
This CLI is just a tool to leverage the current implementation (Wiki.js 2). It features these commands:
-
input completions for page and file name
-
commands to list pages, assets, ...
-
cd
andls
command to navigate in the page and asset hierarchy -
dump a page to disk
-
update a page from disk
for example, to edit the page using a true editor (Emacs) and perform spell checking I have issues with Firefox WithExEditor and LanguageTool extensions and ckeditor
-
create a page from disk
-
move pages
-
upload asset
-
a check tool
for example, to check for dangling links
-
a disk export (with network transparency)
-
a Git export and sync
I was unable to use this feature of Wiki.js.
We could implement Fuse, but the file-system API can only report errno
errors (No such file or directory, I
6DA1
/O error, Permission denied, File exists, ...) which is a limitation to report Wiki errors like conflict. However, it does not apply for a read-only implementation.
-
A deleted page is really deleted and disappear of the history !
This is weird behaviour and this feature should not be used. Instead to delete, move the page in a dedicated trash folder.
-
Some asset management functions are not implemented !
We can only upload, rename, delete and asset, and create folders. We cannot move an asset. Workaround is to download, delete, and upload.
-
Page creation
There are multiple ways to create a new pages: From the New Page button. By clicking a link pointing to a non-existing page. Manually type the path in the browser address bar.
We can create a page relative to another one
[Title](foo/bar)
. Notice the title is required and is independent of the page title ! And, the HTML anchor will be invisible if the title is empty. But, contrary to every wiki, we cannot just add a link[[MyNewWikiPage]]
to the page you want to create. However, the drawback of this common approach, is to have to deal with dangling pages. Redmine requires an extension to show those pages else...Usually, it is cumbersome to create a page and organize things in Wiki.js ! We have to perform a lot of clicks and to type a path and a title etc. We have to define a slug for the page path.
-
Folder Hierarchy
A page does not have a parent but an absolute path from witch the folder hierarchy is inferred. We have to create a folder page, to customize the folder title. If we want to move a node of the folder hierarchy, then we have to move each page manually one by one (i.e. rename the path). This is ridiculously inefficient !
-
Page update
Wiki.js does not update the rendering of a page when a target (link) page is updated.
Curated documentation links:
Curated Wiki links:
Curated Javascript Library links:
- Knex.js — SQL Query Builder for Javascript
- Objection.js — ORM for Node.js
- Apollo GraphQL
- markdown-it: Markdown parser
- Cheerio — Javascript library for parsing and manipulating HTML and XML
Curated source code links:
-
dev/build/DockerFile
Yarn commands to buildIt could be the developer is working on Windows VsCode. Thus there is any process to build from the Linux command line. see also
dev/webpack
-
server/models
-
server/db/migrations
hand written DB migrations2.0.0.js
is root DB creation I suspect all migrations are executed for a new wiki instance. See sql - create table from model in objection.js - Stack OverflowObjection does not support any ways to create migrations from models. You need to write migration files to create schema and then write Models that matches DB schema...
-
server/graph/resolvers
GraphQL APIsee also
server/graph/schemas -
server/jobs`task to render page -
server/modules/storage
storage plugins -
server/modules/rendering/markdown-core/renderer.js
convet to HTML -
server/modules/rendering/html-core/renderer.js
handle HTML anchors
- gierens/wikijs-rs: API bindings, CLI client and FUSE filesystem for Wiki.js written in Rust. According to the Readme, it seems to be very limited. And the number of lines of code is amazing in comparison to this 2k loc library! It does not make sense to use Rust and low level programming for such application...