Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cef62/documentor
Make documentation for Web projects
https://github.com/cef62/documentor
Last synced: about 1 month ago
JSON representation
Make documentation for Web projects
- Host: GitHub
- URL: https://github.com/cef62/documentor
- Owner: cef62
- License: mit
- Created: 2015-10-05T16:23:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-05T21:24:17.000Z (over 9 years ago)
- Last Synced: 2023-04-01T06:59:04.462Z (almost 2 years ago)
- Language: JavaScript
- Size: 4.15 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# documentor
[![Travis-CI](https://travis-ci.org/cef62/documentor.svg)](https://travis-ci.org/cef62/documentor)Documentor is an automated docs builder based on **[metalsmith](www.metalsmith.io)**.
> The tools is in active development and the current API it's likely to change often. Any feedback is welcome.
## Contents
- [Plugins](#plugins)
- [metalsmith](#metalsmith)
- [ markdown-it](#markdown-it)
- [templates](#templates)
- [Getting Started](#getting-started)
- [CLI invocation](#cli-invocation)## Plugins
### metalsmith
**documentor** depends on the following _metalsmith_ plugins:
* metalsmith-assets
* metalsmith-babel
* metalsmith-drafts
* metalsmith-lunr
* metalsmith-markdownit
* metalsmith-navigation
* metalsmith-templates
* metalsmith-text-replaceInternally documentor use more plugins, soon this plugins will be moved on separated repositories.
### markdown-it
**documentor** depends on the following _markdown-it_ plugins:
* markdown-it-checkbox
* markdown-it-container
* markdown-it-emoji
* markdown-it-footnoteInternally documentor use more plugins and custom renderers, soon this plugins will be moved on separated repositories.
### templates
Templates are defined using **handlebars** syntax.
## Getting Started
**documentor** can be used as CLI command or via Javascript.
### CLI invocation
Invoked from CLI **documentor** accept and require a single arguments: `--config`. **config** should be the path to a javascript module exporting a configuration object:
```javascript
// ./docs/index.js
var path = require('path');// compose full path to sources and build folders
function compose() {
var params = [].splice.call(arguments,0);
params.unshift(__dirname);
return slash(path.join.apply(null, params));
}modeule.exports = {
folders: {
source: compose('data'),
build: compose('build'),
}
};
```At least `source` and `destination` folder must be defined.
In you package.json add a script:
```json
"script": {
"build:doc": "documentor --config ./docs/index.js"
},
```