Getting Started
This page, we build a basic Hello World page with This Is Not A Wiki.
This Is Not A Wiki is formed of two parts: a script and a MediaWiki extension. To simplify the whole building process, a docker image is provided and this guide will show the usage.
- Requirement
If Docker is ready, you could go to the next step.
Create two directories, src
and
dist
.
$ mkdir src dist
Then create a wikitext file. Any file ends with .wikitext
is considered as a wiki
article by This Is Not A Wiki.
$ echo 'Hello, World!' > src/index.wikitext
And run Docker with volume mounting:
$ docker run \
--rm \
-v "$(pwd)"/src:/workspace/src \
-v "$(pwd)"/dist:/workspace/dist \
ghcr.io/lens0021/this-is-not-a-wiki
Open "$(pwd)"/dist/index.html
on your browser.
Setting the title of the site
For configurations, you must create .nowiki.json
file in your
src
directory.
$ cat <<EOF > src/.nowiki.json
{
"wg": {
"Sitename": "My Site"
}
}
EOF
Then build again.
$ docker run \
--rm \
-v "$(pwd)"/src:/workspace/src \
-v "$(pwd)"/dist:/workspace/dist \
ghcr.io/lens0021/this-is-not-a-wiki
$ mkdir src dist
$ echo 'Hello, World!' > src/index.wikitext
$ cat <<EOF > src/.nowiki.json
{
"wg": {
"Sitename": "My Site"
}
}
EOF
$ docker run \
--rm \
-v "$(pwd)"/src:/workspace/src \
-v "$(pwd)"/dist:/workspace/dist \
ghcr.io/lens0021/this-is-not-a-wiki
$ ls dist
ext.ThisIsNotAWiki.styles.css
index.html
jquery.makeCollapsible.styles.css
Main_Page.html
mediawiki.action.history.styles.css
mediawiki.feedlink.css
mediawiki.helplink.css
mediawiki.htmlform.ooui.styles.css
mediawiki.htmlform.styles.css
mediawiki.interface.helpers.styles.css
mediawiki.special.changeslist.css
mediawiki.ui.button.css
mediawiki.ui.icon.css
mediawiki.widgets.DateInputWidget.styles.css
mediawiki.widgets.styles.css
oojs-ui-core.icons.css
oojs-ui-core.styles.css
oojs-ui.styles.indicators.css
skins.vector.icons.css
skins.vector.styles.css