Defined in: lib/config.js
String | assetRoot |
String | outputDir |
String | title |
Boolean | emitFiles |
Boolean | showExtensionInURLs |
String | motto |
String | favicon |
String | assets |
String | stylesheet |
String | styleOverrides |
Boolean | gitStats |
String | footer |
Object | hotness |
Number | hotness.count |
days|weeks|months|years | hotness.interval |
Object | disqus |
Boolean | launchExternalLinksInNewTabs |
Boolean | resizableSidebar |
Boolean | collapsibleSidebar |
Boolean | scrollSpying |
Object | layoutOptions |
Object | rewrite |
Boolean | singlePageMode |
Array.<BannerLink> | bannerLinks |
Object | syntaxHighlighting |
Array.<String> | syntaxHighlighting.languages |
Object | syntaxHighlighting.aliases |
Array.<Config~Template> | customLayouts |
String
Absolute path to the root directory from which all files should be located. This is automatically set to the directory containing megadoc.conf.js when you run the compiler.
String
Path to where the built assets (index.html and friends) will be saved to.
Note that most scanner plugins will implicitly use this path to save their own assets so that they're accessible relative from the index.html entry file.
Defaults to: "doc/compiled"
String
Starting window title.
Defaults to: "megadoc"
Boolean
Whether we should generate .html files for every document.
Defaults to: true
Boolean
Set this to false if you do not want .html
to appear in the links or the
URL bar. If you do this, you must configure your webserver so that it does
either of the following:
a) serve the right file even when the .html extension is omitted
b) redirect to /index.html and set the original request as a query
parameter named uid
Defaults to: true
String
A brief sentence describing what this is about. It will be displayed right next to the title in a small type.
String
Path to where a favicon can be found. Clear this if you don't want any.
String
An array of paths to files you want to copy to the output directory.
They will be found under assets/
with their full source path.
For example:
exports.assets = [ 'app/images/box.png' ];
Will be found at:
/assets/app/images/box.png
Defaults to: []
String
Absolute path to a .css or .less file to include in the CSS bundle. If you provide a .less file, you can (re)use the variables that the UI's stock stylesheets use.
If you want to override the variables, say for custom branding, look at the @styleOverrides parameter.
Example:
exports.stylesheet = "doc/mega.less";
String
Absolute path to a .less stylesheet file that re-defines variables used in the stock UI's stylesheets. This allows for complete theming without messing with the source files, or having to use !important directives, etc.
Example:
exports.styleOverrides = "doc/mega/overrides.less";
Boolean
Turn this on if you want to parse git stats for the README file, like last commit date and the file's authors.
Defaults to: false
String
A small message (can be Markdown) to display at the bottom of the app.
Set this to an empty string, or null, if you don't want the footer to be shown.
Defaults to: "Made with ♥ using [megadoc](https://github.com/megadoc)."
Object
The "Hot Item" feature configuration.
An item could be marked as "hot" if its last commit timestamp falls within a certain interval you specify below. This is useful for readers to easily tell which items have changed recently so that they should check them out.
Defaults to: {
"count": 1,
"interval": "weeks"
}
Number
The number of [interval] (like days or weeks) that we should consider an item to be hot.
Defaults to: 1
days|weeks|months|years
The actual interval. Works with @count defined above.
Defaults to: "weeks"
Object
disqus configuration if you want the ability for users to comment. Get this stuff from https://disqus.com/.
Defaults to: {
"enabled": false,
"shortname": "",
"baseUrl": "http://localhost"
}
Boolean
Whether links to external sites should be opened in new tabs.
Defaults to: true
Boolean
Whether the side-bar should be resizable. Affects all layouts that show a sidebar.
Defaults to: true
Boolean
Whether to show a button for collapsing the sidebar.
Defaults to: false
Boolean
Turn this on if you want the side-bar links to become active as the user is scrolling the page.
Only works when using the single page layout.
Defaults to: false
Object
Defaults to: {
"rewrite": {},
"singlePageMode": false,
"bannerLinks": []
}
Object
Override the default URL for certain documents. You must use UIDs to specify the documents you want to rewrite.
Defaults to: {}
Boolean
Launch megadoc into "single-page" mode where you want to present all the contents in a single page. This flag MUST be turned in order for links to work online and offline.
See the Single Page Mode guide for more information.
Defaults to: false
Array.<BannerLink>
Defaults to: []
Object
Configuration for the syntax highlighter, which uses Prism.js.
Defaults to: {
"defaultLanguage": "javascript",
"languages": [
"bash",
"clike",
"c",
"javascript",
"markdown",
"ruby"
],
"aliases": {}
}
Array.<String>
A list of language definitions to enable highlighting for. This has to map to Prism's available grammars, which you can find at http://prismjs.com/#languages-list.
Defaults to: [
"bash",
"clike",
"c",
"javascript",
"markdown",
"ruby"
]
Object
A map of language names to alias. For example, if you're used to using "shell" as a language but Prism only has "bash", this map allows you to alias "bash" as "shell".
Defaults to: {}
Array.<Config~Template>
Made with ♥ using megadoc.