# orator-wiki

> Orator Wiki plug-in module

Latest version **1.0.1** (published 2015-11-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install orator-wiki
pnpm add orator-wiki
yarn add orator-wiki
bun add orator-wiki
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-11-28 |
| First published | 2015-11-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Steven Velozo |
| Maintainers | paviasystems, stevenvelozo |
| Keywords | logging |

## Links

- npm: https://www.npmjs.com/package/orator-wiki
- Repository: https://github.com/stevenvelozo/orator-wiki
- Issues: https://github.com/stevenvelozo/orator-wiki/issues
- npm.io page: https://npm.io/package/orator-wiki

## Dependencies (2)

- [orator](https://npm.io/package/orator.md) ~1.0.2
- [restify](https://npm.io/package/restify.md) 4.0.3

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-11-28
- 0.1.15 — 2015-11-27

## README

# Orator Wiki

Wiki content server and basic web Content Management System.  Flexible enough to scale into various documentation and learning property uses.  Stores structured content in Markdown format.

[![Code Climate](https://codeclimate.com/github/stevenvelozo/orator-wiki/badges/gpa.svg)](https://codeclimate.com/github/stevenvelozo/orator-wiki) [![Coverage Status](https://coveralls.io/repos/stevenvelozo/orator-wiki/badge.svg?branch=master)](https://coveralls.io/r/stevenvelozo/orator-wiki?branch=master) [![Build Status](https://travis-ci.org/stevenvelozo/orator-wiki.svg?branch=master)](https://travis-ci.org/stevenvelozo/orator-wiki) [![Dependency Status](https://david-dm.org/stevenvelozo/orator-wiki.svg)](https://david-dm.org/stevenvelozo/orator-wiki) [![devDependency Status](https://david-dm.org/stevenvelozo/orator-wiki/dev-status.svg)](https://david-dm.org/stevenvelozo/orator-wiki#info=devDependencies)

## Basic Usage

You can see the content management system "work" without any style by downloading this git repository, then:

```sh
npm install
npm run serve
```
Which will start a basic web server on port 7000, and serve the simplest HTML possible.  The wiki content is served from an adjacent folder.  The markdown is in `Site/Content` by default and the actual web page/dependencies is in `Site/Html`.

## Extending This

The expectation for using this is that it will be extended.  You will want to create a node.js project of your own, and include this as a dependency.

1. *Initialize a project* by running `npm init` from the empty folder you want a project in
2. *Install the Orator dependency* by executing `npm install orator --save` from your project folder
3. *Install the Orator-Wiki dependency* by executing `npm install orator-wiki --save` from your project folder
4. *Create folders for the basic html site and markdown content* with `mkdir Html` and `mkdir Content` from within your project folder
5. *Copy the starter site from the orator-wiki project into your newly created Html folder* by running `cp -R node_modules/orator-wiki/Site/Html/* Html/` from within your project folder
6. *Copy the starter Table of Contents into your newly created Content folder* by running `cp -R node_modules/orator-wiki/Site/Content/* Content/` from within your project folder
7. *Create a basic script to run your site from* by running `touch MyServer.js` from within your project folder

Launch your favorite text editor and put something like this in your MyServer.js file:

```js
var libOrator = require('orator').new(
	{
		Product: 'MyContentServer',
		ProductVersion: require(__dirname+'/package.json').version,

		"APIServerPort": 7777,

		WikiContentFolder: __dirname+'/Content/',
		StaticContentFolder:__dirname+'/Html/'
	});

var libOratorWiki = require('./Orator-Wiki.js').new(libOrator);
libOratorWiki.initializeEndpoints();

libOrator.startWebServer();
```

Then you can start the server by running the following command in your project folder:

```sh
node MyServer.js
```

After that, a browser pointed to (http://localhost:7777) on the machine you run the server from should open a really basic, unstyled wiki content editor.

## Customizing

You can start to make changes to the Html folder to alter how the site looks, and changes to the Content folder to expand on the content.  Markdown will be automatically turned into html by the browser when it is in the Content folder, and binaries will serve properly.

Feel free to go nuts adding other Javascript and CSS libraries, but the ones in the page need to stay for the basic wiki functionality to work.  The bundled [marked](https://github.com/chjj/marked) library is stock, but the orator-wiki.js web file adds a layer to it for parsing out wiki text.

## Wiki Content

To link to other articles in the Content folder, you just use a basic mustache wiki syntax:

* `{MyDocumentTitle}` points to the `MyDocumentTitle.md` file in your content folder.
* `{Some/Path/AppleRecipe}` points to the `Some/Path/AppleRecipe.md` file in the content folder.

You may wish to use different text for links, which can be done with a pipe:

* `{Process/Devs|My Tasks}` points to the `Process/Devs.md` file in the content folder, but displays the link text as `My Tasks` in the browser.
* `{}`

If you want to get very fancy, you can create links that automatically scroll to a specific point in the content.  This is done with a third datapart in the wiki link:

* `{Process/Devs|Workboard Flow and Process>workboard-flow-and-process}` points to the `Process/Devs.md` file in the content folder, displays `Workboard Flow and Process` in the browser and automatically scrolls to the element on the page with the id `workboard-flow-and-process`.  _This is especially handy because the markdown parser automatically creates ids for title elements on the page, so if you create a line in the markdown document that says `#Workboard Flow and Process` this link would scroll down so that line is visible.

---
_Source: https://npm.io/package/orator-wiki · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
