2011-07-04 06:58:15 +02:00
|
|
|
# Configuration Options
|
2010-06-24 16:22:41 +02:00
|
|
|
|
2011-07-04 06:58:15 +02:00
|
|
|
## Registering what to document
|
2010-06-24 16:22:41 +02:00
|
|
|
|
2014-09-07 01:26:12 +02:00
|
|
|
By default the documentation system will parse all the directories in your
|
2014-09-07 07:09:28 +02:00
|
|
|
project and include the documentation from those modules `docs` directory.
|
2010-06-24 16:22:41 +02:00
|
|
|
|
2014-09-07 07:09:28 +02:00
|
|
|
If you want to only specify a few folders or have documentation in a non
|
|
|
|
standard location you can disable the autoload behaviour and register your
|
|
|
|
folders manually through the `Config` API.
|
2010-06-24 16:22:41 +02:00
|
|
|
|
2014-09-07 07:09:28 +02:00
|
|
|
In YAML this looks like:
|
2010-06-24 16:22:41 +02:00
|
|
|
|
2014-09-07 07:09:28 +02:00
|
|
|
`mysite/_config/docsviewer.yml`
|
2011-07-04 06:58:15 +02:00
|
|
|
|
2014-09-07 07:09:28 +02:00
|
|
|
:::yaml
|
|
|
|
---
|
|
|
|
name: docsviewer
|
|
|
|
after: docsviewer#docsviewer
|
|
|
|
---
|
|
|
|
DocumentationManifest:
|
|
|
|
automatic_registration: false
|
|
|
|
register_entities:
|
|
|
|
-
|
|
|
|
Path: "framework/docs/"
|
|
|
|
Title: "Framework Documentation"
|
2011-07-04 06:58:15 +02:00
|
|
|
|
2010-10-22 04:09:15 +02:00
|
|
|
|
|
|
|
## Permalinks
|
|
|
|
|
2011-07-04 06:58:15 +02:00
|
|
|
Permalinks can be setup to make nicer urls or to help redirect older urls
|
|
|
|
to new structures.
|
2010-10-22 04:09:15 +02:00
|
|
|
|
|
|
|
DocumentationPermalinks::add(array(
|
2011-07-04 06:58:15 +02:00
|
|
|
'debugging' => 'sapphire/en/topics/debugging',
|
|
|
|
'templates' => 'sapphire/en/topics/templates'
|
2010-10-22 04:09:15 +02:00
|
|
|
));
|
|
|
|
|
|
|
|
|
2013-05-22 18:35:26 +02:00
|
|
|
## Custom metadata and pagesorting
|
2010-10-22 04:09:15 +02:00
|
|
|
|
2013-05-22 18:35:26 +02:00
|
|
|
Custom metadata can be added to the head of the MarkDown file like this:
|
|
|
|
|
|
|
|
title: A custom title
|
|
|
|
|
|
|
|
Make sure to add an empty line to separate the metadata from the content of
|
2013-05-22 21:35:03 +02:00
|
|
|
the file.
|
2013-05-22 18:35:26 +02:00
|
|
|
|
2014-09-07 07:09:28 +02:00
|
|
|
The currently utilized metadata tags for the module are
|
2013-05-22 18:35:26 +02:00
|
|
|
|
2014-09-07 07:09:28 +02:00
|
|
|
title: 'A custom title for menus, breadcrumbs'
|
|
|
|
summary: 'A custom introduction text'
|
2013-05-22 18:35:26 +02:00
|
|
|
|
2014-09-07 07:09:28 +02:00
|
|
|
### Custom page sorting
|
2014-09-07 01:26:12 +02:00
|
|
|
|
2014-09-07 07:09:28 +02:00
|
|
|
By default pages in the left hand menu are sorted as how they appear in the file
|
|
|
|
system. You can manually set the order by prefixing filenames with numbers. For
|
|
|
|
example:
|
2014-09-07 01:26:12 +02:00
|
|
|
|
2014-09-07 07:09:28 +02:00
|
|
|
00_file-first.md
|
|
|
|
01_second-file.md
|
2014-09-07 01:26:12 +02:00
|
|
|
|
2014-09-07 07:09:28 +02:00
|
|
|
The leading numbers will be scrubbed from the URL and page link.
|
2014-09-07 01:26:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Syntax
|
|
|
|
|
|
|
|
Documentation should be written in markdown with an `.md` extension attached.
|
|
|
|
To view the syntax for page formatting check out [Daring Fireball](http://daringfireball.net/projects/markdown/syntax).
|
|
|
|
|
|
|
|
To see how to use the documentation from examples, I recommend opening up this
|
|
|
|
file in your text editor and playing around. As these files are plain text, any
|
|
|
|
text editor will be able to open and write markdown files.
|
|
|
|
|
|
|
|
|
|
|
|
## Creating Hierarchy
|
|
|
|
|
|
|
|
The document viewer supports a hierarchical folder structure so you can categorize
|
|
|
|
documentation and create topics.
|
|
|
|
|
|
|
|
## Directory Listing
|
|
|
|
|
|
|
|
Each folder you create should also contain a __index.md__ file which contains
|
|
|
|
an overview of the module and related links. If no index is available, the
|
|
|
|
default behaviour is to display an ordered list of links.
|
|
|
|
|
|
|
|
## Table of Contents
|
|
|
|
|
|
|
|
The table of contents on each module page is generated based on where and what
|
2014-09-07 07:09:28 +02:00
|
|
|
headers you use.
|
2014-09-07 01:26:12 +02:00
|
|
|
|
|
|
|
## Images and Files
|
|
|
|
|
|
|
|
If you want to attach images and other assets to a page you need to bundle those
|
|
|
|
in a directory called _images at the same level as your documentation.
|