This note outlines the steps taken to build a Massive Wiki static
website. The code outlined is mwb.py
, version 2.1.0.
The mwb.py
main
function steps:
initialize: parse command line arguments
store configuration
get Jinja2 env
set up lunr filename and sitepath indices
render the wiki:
remove and recreate output directory
generate dict of filenames and wikipaths to support wikilinks (first loop through all files)
copy wiki to output; render .md files as HTML
build lunr search index (if specified)
set up search web page
build all_pages web page
/Users/peterkaminski/Documents/GitHub/developer-massive-wiki/Wiki Theory and Culture/Link As You Think.md
.md
, .html
, .json
/Users/peterkaminski/Documents/GitHub/developer-massive-wiki/.massivewikibuilder/output/Wiki_Theory_and_Culture/Link_As_You_Think.md
/Users/peterkaminski/Documents/GitHub/developer-massive-wiki/.massivewikibuilder/output/Wiki_Theory_and_Culture/Link_As_You_Think.html
/Users/peterkaminski/Documents/GitHub/developer-massive-wiki/.massivewikibuilder/output/Wiki_Theory_and_Culture/Link_As_You_Think.json
r'([ _?\#]+)'
characters replaced with _
)
/rootdir/Wiki_Theory_and_Culture/Link_As_You_Think.html
All non-hidden files of any type:
All non-hidden Markdown files:
.html
version is saved to the location that will be next to the .md
file.json
extract of the YAML frontmatter is saved to the location that will be next to the .md
fileIf we accumulate all links seen during Markdown parsing, after all Markdown files are parsed, we can compare that to the list of wikilink targets, and determine:
These lists could also be output as log messages.
MassiveWikiBuilder V3-pseudocode