0.18.0 • Published 4 years ago
trowel-wiki v0.18.0
Trowel
Trowel is a simple express based web server built in Node.js that allows the user to view markdown files.
The primary reason to create this was to allow a read only alternative to gollum based wikis.
A simple demo of Trowel is available at trowel.doug-skinner.com.
Features
- Supports wiki links
[[filename]]
between markdown files in a directory - Supports any level of nesting of documents within that directory
- Comes with what I think is a pretty nice default css
- Configurable navigation at the top of the page
- Configurable Heading anchor symbols
Using Trowel
Installation
npm i -g trowel-wiki
Configuration
The configuration for Trowel is done through a JSON file that is passed in as a paramater on the commandline. Please refer to the chart below for values you can set, and see exampleConfig.json
in the repo for a valid example.
Config Value | Default | Options | Description |
---|---|---|---|
port | 5000 | Any number | The port that the webservice runs on |
homepage | 'index.md' | Any markdown files | The file that will be served when the user navigates to localhost:5000/ |
fileDirectory | '.' | Any directory of markdown files | The directory containing all of the files to be served |
showHeadingAnchors | false | true/false | Whether to show an indicator that allows linking to headers on each page |
headingAnchorIndicator | '⚓︎' | Any string | The indicator that will be shown to link to headers on each page, if showHeadingAnchors is set to true |
showContactEmail | false | true/false | Whether to show the contact me link at the bottom of the page |
contactEmail | 'someEmail@provider.com' | Any email address | The email address that will be used if showContactEmail is set to true |
navigationHeadings | [{ title: 'Homepage', link: '/' }] | An array containing objects consisting of title: '', link: ''} | These values populate the navigation headers that display across the top of the page. The title is what will be shown, and the link is where that title will point to. |
Use
To use Trowel, with or without a config file, simply do the following:
cd ./folder/where/notes/are
trowel [-w|--web-config configFile.json]
Then go into your web browser to http://localhost:5000
, changing the 5000
to whatever port you specify in your config.