Reformat documentation

This commit is contained in:
Stéphane Goetz 2020-04-25 14:44:43 +02:00
parent ec8530b264
commit 4d312a44e6
21 changed files with 2455 additions and 2421 deletions

View File

@ -14,21 +14,21 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities

100
README.md
View File

@ -1,6 +1,5 @@
# Daux.io
[![Latest Version](https://img.shields.io/github/release/dauxio/daux.io.svg?style=flat-square)](https://github.com/dauxio/daux.io/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://github.com/dauxio/daux.io/blob/master/LICENSE.md)
[![Build Status](https://github.com/dauxio/daux.io/workflows/CI/badge.svg)](https://github.com/dauxio/daux.io/actions)
@ -8,45 +7,42 @@
[![Quality Score](https://img.shields.io/scrutinizer/g/dauxio/daux.io.svg?style=flat-square)](https://scrutinizer-ci.com/g/dauxio/daux.io)
[![Total Downloads](https://img.shields.io/packagist/dt/daux/daux.io.svg?style=flat-square)](https://packagist.org/packages/daux/daux.io)
**Daux.io** is a documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It helps you create great looking documentation in a developer friendly way.
## Features
* 100% Mobile Responsive
* CommonMark compliant (a Markdown specification)
* Supports Markdown tables
* Auto created homepage/landing page
* Auto Syntax Highlighting
* Auto Generated Navigation
* 4 Built-In Themes or roll your own
* Functional, Flat Design Style
* Shareable/Linkable SEO Friendly URLs
* Built On Bootstrap
* No Build Step
* Git/SVN Friendly
* Supports Google Analytics and Piwik Analytics
* Optional code float layout
* Static Output Generation
- 100% Mobile Responsive
- CommonMark compliant (a Markdown specification)
- Supports Markdown tables
- Auto created homepage/landing page
- Auto Syntax Highlighting
- Auto Generated Navigation
- 4 Built-In Themes or roll your own
- Functional, Flat Design Style
- Shareable/Linkable SEO Friendly URLs
- Built On Bootstrap
- No Build Step
- Git/SVN Friendly
- Supports Google Analytics and Piwik Analytics
- Optional code float layout
- Static Output Generation
## Demos
This is a list of sites using Daux.io:
- With a custom theme:
* [Crafty](https://swissquote.github.io/crafty)
* [Pixolution flow](https://docs.pixolution.org)
* [Soisy](https://doc.soisy.it/)
* [Vulkan Tutorial](https://vulkan-tutorial.com)
* [3Q](https://docs.3q.video/)
* [The Advanced RSS Environment](https://thearsse.com/manual/)
- [Crafty](https://swissquote.github.io/crafty)
- [Pixolution flow](https://docs.pixolution.org) \* [Soisy](https://doc.soisy.it/)
- [Vulkan Tutorial](https://vulkan-tutorial.com) \* [3Q](https://docs.3q.video/)
- [The Advanced RSS Environment](https://thearsse.com/manual/)
- With the default Theme
* [Daux.io](https://daux.io/)
* [DoctrineWatcher](https://dsentker.github.io/WatcherDocumentation/)
* [DrupalGap](http://docs.drupalgap.org/8/)
* [ICADMIN: An admin panel powered by CodeIgniter.](http://istocode.com/shared/ic-admin/)
* [Munee: Standalone PHP 5.3 Asset Optimisation & Manipulation](http://mun.ee)
* [Nuntius: A PHP framework for bots](https://roysegall.github.io/nuntius-bot/)
- [Daux.io](https://daux.io/)
_ [DoctrineWatcher](https://dsentker.github.io/WatcherDocumentation/)
_ [DrupalGap](http://docs.drupalgap.org/8/)
- [ICADMIN: An admin panel powered by CodeIgniter.](http://istocode.com/shared/ic-admin/)
- [Munee: Standalone PHP 5.3 Asset Optimisation & Manipulation](http://mun.ee)
- [Nuntius: A PHP framework for bots](https://roysegall.github.io/nuntius-bot/)
Do you use Daux.io? Send me a pull request or open an [issue](https://github.com/dauxio/daux.io/issues) and I will add you to the list.
@ -101,18 +97,18 @@ You must use underscores instead of spaces. Here are some example file names and
**Good:**
* 01_Getting_Started.md = Getting Started
* API_Calls.md = API Calls
* 200_Something_Else-Cool.md = Something Else-Cool
* _5_Ways_to_Be_Happy.md = 5 Ways To Be Happy
- 01_Getting_Started.md = Getting Started
- API_Calls.md = API Calls
- 200_Something_Else-Cool.md = Something Else-Cool
- \_5_Ways_to_Be_Happy.md = 5 Ways To Be Happy
**Bad:**
* File Name With Space.md = FAIL
- File Name With Space.md = FAIL
## Sorting
To sort your files and folders in a specific way, you can prefix them with a number and underscore, e.g. `/docs/01_Hello_World.md` and `/docs/05_Features.md` This will list *Hello World* before *Features*, overriding the default alpha-numeric sorting. The numbers will be stripped out of the navigation and urls. For the file `6 Ways to Get Rich`, you can use `/docs/_6_Ways_to_Get_Rich.md`
To sort your files and folders in a specific way, you can prefix them with a number and underscore, e.g. `/docs/01_Hello_World.md` and `/docs/05_Features.md` This will list _Hello World_ before _Features_, overriding the default alpha-numeric sorting. The numbers will be stripped out of the navigation and urls. For the file `6 Ways to Get Rich`, you can use `/docs/_6_Ways_to_Get_Rich.md`
## Landing page
@ -138,6 +134,7 @@ To customize the look and feel of your documentation, you can create a `config.j
The `config.json` file is a simple JSON object that you can use to change some of the basic settings of the documentation.
### Title
Change the title bar in the docs
```json
@ -147,12 +144,13 @@ Change the title bar in the docs
```
### Themes
We have 4 built-in Bootstrap themes. To use one of the themes, just set the `theme` option to one of the following:
* daux-blue
* daux-green
* daux-navy
* daux-red
- daux-blue
- daux-green
- daux-navy
- daux-red
```json
{
@ -161,7 +159,9 @@ We have 4 built-in Bootstrap themes. To use one of the themes, just set the `the
```
### More options
Many other options are available:
- [Global options](http://daux.io/Configuration/index)
- [HTML Options](http://daux.io/Configuration/Html_export)
- [Confluence options](http://daux.io/Configuration/Confluence_upload)
@ -193,8 +193,8 @@ daux --source=docs --destination=static
If you have set up a local or remote IIS web site, you may need a `web.config` with:
* A rewrite configuration, for handling clean urls.
* A mime type handler for less files, if using a custom theme.
- A rewrite configuration, for handling clean urls.
- A mime type handler for less files, if using a custom theme.
### Clean URLs
@ -208,10 +208,22 @@ The `web.config` needs an entry for `<rewrite>` under `<system.webServer>`:
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add
input="{REQUEST_FILENAME}"
matchType="IsFile"
negate="true"
/>
<add
input="{REQUEST_FILENAME}"
matchType="IsDirectory"
negate="true"
/>
</conditions>
<action type="Rewrite" url="index.php" appendQueryString="false" />
<action
type="Rewrite"
url="index.php"
appendQueryString="false"
/>
</rule>
</rules>
</rewrite>

View File

@ -6,49 +6,48 @@
### For Authors
* [Auto Generated Navigation / Page sorting](01_Features/Navigation_and_Sorting.md)
* [Internal documentation links](01_Features/Internal_links.md)
* [CommonMark compliant](01_Features/CommonMark_compliant.md)
* [Auto created homepage/landing page](01_Features/Landing_page.md)
* [Multiple Output Formats](01_Features/Multiple_Output_Formats.md)
* [Multiple Languages Support](01_Features/Multilanguage.md)
* [No Build Step](01_Features/Live_mode.md)
* [Static Output Generation](01_Features/Static_Site_Generation.md)
* [Table of Contents](01_Features/Table_of_contents.md)
- [Auto Generated Navigation / Page sorting](01_Features/Navigation_and_Sorting.md)
- [Internal documentation links](01_Features/Internal_links.md)
- [CommonMark compliant](01_Features/CommonMark_compliant.md)
- [Auto created homepage/landing page](01_Features/Landing_page.md)
- [Multiple Output Formats](01_Features/Multiple_Output_Formats.md)
- [Multiple Languages Support](01_Features/Multilanguage.md)
- [No Build Step](01_Features/Live_mode.md)
- [Static Output Generation](01_Features/Static_Site_Generation.md)
- [Table of Contents](01_Features/Table_of_contents.md)
### For Developers
* [Auto Syntax Highlighting](01_Features/Auto_Syntax_Highlight.md)
* [Extend Daux.io with Processors](01_For_Developers/Creating_a_Processor.md)
* Full access to the internal API to create new pages programatically
* Work with pages metadata
- [Auto Syntax Highlighting](01_Features/Auto_Syntax_Highlight.md)
- [Extend Daux.io with Processors](01_For_Developers/Creating_a_Processor.md)
- Full access to the internal API to create new pages programatically
- Work with pages metadata
### For Marketing
* 100% Mobile Responsive
* 4 Built-In Themes or roll your own
* Functional, Flat Design Style
* Optional code float layout
* Shareable/Linkable SEO Friendly URLs
* Supports Google Analytics and Piwik Analytics
- 100% Mobile Responsive
- 4 Built-In Themes or roll your own
- Functional, Flat Design Style
- Optional code float layout
- Shareable/Linkable SEO Friendly URLs
- Supports Google Analytics and Piwik Analytics
## Demos
This is a list of sites using Daux.io:
- With a custom theme:
* [Crafty](https://swissquote.github.io/crafty)
* [Pixolution flow](https://docs.pixolution.org)
* [Soisy](https://doc.soisy.it/)
* [Vulkan Tutorial](https://vulkan-tutorial.com)
* [3Q](https://docs.3q.video/)
- [Crafty](https://swissquote.github.io/crafty)
- [Pixolution flow](https://docs.pixolution.org) \* [Soisy](https://doc.soisy.it/)
- [Vulkan Tutorial](https://vulkan-tutorial.com)
- [3Q](https://docs.3q.video/)
- With the default Theme
* [Daux.io](https://daux.io/)
* [DoctrineWatcher](https://dsentker.github.io/WatcherDocumentation/)
* [DrupalGap](http://docs.drupalgap.org/8/)
* [ICADMIN: An admin panel powered by CodeIgniter.](http://istocode.com/shared/ic-admin/)
* [Munee: Standalone PHP 5.3 Asset Optimisation & Manipulation](http://mun.ee)
* [Nuntius: A PHP framework for bots](https://roysegall.github.io/nuntius-bot/)
- [Daux.io](https://daux.io/)
_ [DoctrineWatcher](https://dsentker.github.io/WatcherDocumentation/)
_ [DrupalGap](http://docs.drupalgap.org/8/)
- [ICADMIN: An admin panel powered by CodeIgniter.](http://istocode.com/shared/ic-admin/)
- [Munee: Standalone PHP 5.3 Asset Optimisation & Manipulation](http://mun.ee)
- [Nuntius: A PHP framework for bots](https://roysegall.github.io/nuntius-bot/)
Do you use Daux.io? Send us a pull request or open an [issue](https://github.com/dauxio/daux.io/issues) and I will add you to the list.
@ -81,10 +80,10 @@ docker run --rm -it -w /build -v "$PWD":/build daux/daux.io daux
Any parameter valid in the PHP version is valid in the Docker version
### Writing pages
Creating new pages is very easy:
1. Create a markdown file (`*.md` or `*.markdown`)
2. Start writing
@ -98,14 +97,14 @@ You must use underscores instead of spaces. Here are some example file names and
**Good:**
* 01_Getting_Started.md = Getting Started
* API_Calls.md = API Calls
* 200_Something_Else-Cool.md = Something Else-Cool
* _5_Ways_to_Be_Happy.md = 5 Ways To Be Happy
- 01_Getting_Started.md = Getting Started
- API_Calls.md = API Calls
- 200_Something_Else-Cool.md = Something Else-Cool
- \_5_Ways_to_Be_Happy.md = 5 Ways To Be Happy
**Bad:**
* File Name With Space.md = FAIL
- File Name With Space.md = FAIL
### See your pages
@ -153,7 +152,6 @@ Daux.io needs the following PHP extensions to work : `php-mbstring` and `php-xml
If you encounter an error similar to `utf8_decode() not found` this means that you're missing the `php-xml` package.
## Support
If you need help using Daux.io, or have found a bug, please create an issue on the <a href="https://github.com/dauxio/daux.io/issues" target="_blank">GitHub repo</a>.

View File

@ -1,17 +1,14 @@
As we support CommonMark, a broad range of markdown features is available to you.
Many of the features shown below were known as Github Flavored Markdown.
We all like making lists
------------------------
## We all like making lists
The above header should be an H2 tag. Now, for a list of fruits:
* Red Apples
* Purple Grapes
* Green Kiwifruits
- Red Apples
- Purple Grapes
- Green Kiwifruits
Let's get crazy:
@ -37,8 +34,7 @@ What about some code **in** a list? That's insane, right?
Some people seem to like definition lists
I am a robot
------------
## I am a robot
Maybe you want to print `robot` to the console 1000 times. Why not?
@ -54,8 +50,7 @@ How about we throw some angle braces and ampersands in there?
&copy; 2004 Foo Corporation
</div>
Set in stone
------------
## Set in stone
Preformatted blocks are useful for ASCII art:
@ -73,8 +68,7 @@ Preformatted blocks are useful for ASCII art:
___|_____________
</pre>
Playing the blame game
----------------------
## Playing the blame game
If you need to blame someone, the best way to do so is by quoting them:
@ -92,16 +86,14 @@ Or perhaps someone a little less eloquent:
> just put me under the spot here, and maybe I'm not as quick on my feet
> as I should be in coming up with one.
Table for two
-------------
## Table for two
ID | Name | Rank
---|:------:|------:
1 | Tom Preston-Werner | Awesome
2 | Albert Einstein | Nearly as awesome
| ID | Name | Rank |
| --- | :----------------: | ----------------: |
| 1 | Tom Preston-Werner | Awesome |
| 2 | Albert Einstein | Nearly as awesome |
Crazy linking action
--------------------
## Crazy linking action
I get 10 times more traffic from [Google][1] than from
[Yahoo][2] or [MSN][3].
@ -110,8 +102,7 @@ I get 10 times more traffic from [Google] [1] than from
[2]: http://search.yahoo.com/ "Yahoo Search"
[3]: http://search.msn.com/ "MSN Search"
Images
------
## Images
Here's an image.
@ -119,4 +110,4 @@ Here's an image.
Note: to use images on a landing page (index.md), prefix the image URL with the name of the directory it appears in, omitting the numerical prefix used to order the sections. For example in this section, to display this image on the landing page (index.md), the URL for the image would be "Features/sampleimage.png" to display the same image.
*View the [source of this content](https://github.com/dauxio/daux.io/blob/master/docs/01_Features/CommonMark_compliant.md).*
_View the [source of this content](https://github.com/dauxio/daux.io/blob/master/docs/01_Features/CommonMark_compliant.md)._

View File

@ -1,4 +1,3 @@
As you can see on the top of this page, you can add "Edit on Github" links to your pages, this feature can be enabled with a single parameter.
The value has to be the path to the root of your documentation folder in your repository.
@ -7,7 +6,6 @@ In the value you see below, Daux's documentation is in the `docs` folder in the
Daux.io will handle the rest
```json
{
"html": {
@ -22,7 +20,6 @@ While GitHub is the most popular, it isn't the only, collaborative VCS out there
As long as you can refer your files by a URL, you can create an edit link for your VCS with the following configuration:
```json
{
"html": {

View File

@ -10,7 +10,6 @@ The easiest is to use PHP's built-in server.
For that i've included a short command, run `daux serve` in the projects folder to start the local web server. By default the server will run at: <a href="http://localhost:8085" target="_blank">http://localhost:8085</a>
## Running Remotely
### Clean URLs configuration
@ -70,8 +69,8 @@ server {
If you have set up a local or remote IIS web site, you may need a `web.config` with:
* A rewrite configuration, for handling clean urls.
* A mime type handler for less files, if using a custom theme.
- A rewrite configuration, for handling clean urls.
- A mime type handler for less files, if using a custom theme.
### Clean URLs
@ -85,10 +84,22 @@ The `web.config` needs an entry for `<rewrite>` under `<system.webServer>`:
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add
input="{REQUEST_FILENAME}"
matchType="IsFile"
negate="true"
/>
<add
input="{REQUEST_FILENAME}"
matchType="IsDirectory"
negate="true"
/>
</conditions>
<action type="Rewrite" url="index.php" appendQueryString="false" />
<action
type="Rewrite"
url="index.php"
appendQueryString="false"
/>
</rule>
</rules>
</rewrite>

View File

@ -9,6 +9,7 @@ Add this to your config.json :
```
You will the need separate directories for each language in `docs/` folder.
```
├── docs/
│ ├── _index.md

View File

@ -6,16 +6,16 @@ Daux.io is extendable and comes by default with three export formats:
## Feature Matrix
Feature | HTML | Single Page HTML | Confluence
--------------:|:----:|:----------------:|:----------:
Multilanguage | √ | X (Planned) | X
Landing Pages | | X | X
Index Pages | √ | √ | √
Internal Links | √ | X (Planned) | √
Code Highlight | √ | X (Planned) | √ (Using macros)
Live Mode | √ | X | X
Pages Ordering | √ | √ | X (API Limitation)
Google / Piwik analytics | √ | √ | √ (Configured on Conflence)
| Feature | HTML | Single Page HTML | Confluence |
| -----------------------: | :--: | :--------------: | :-------------------------: |
| Multilanguage | √ | X (Planned) | X |
| Landing Pages | | X | X |
| Index Pages | √ | √ | √ |
| Internal Links | √ | X (Planned) | √ |
| Code Highlight | √ | X (Planned) | √ (Using macros) |
| Live Mode | √ | X | X |
| Pages Ordering | √ | √ | X (API Limitation) |
| Google / Piwik analytics | | √ | √ (Configured on Conflence) |
## Confluence Example

View File

@ -1,4 +1,3 @@
## Navigation
The navigation is generated automatically with all pages that end with `.md` or `.markdown`
@ -12,7 +11,7 @@ For example, `/docs/02_Examples` has a landing page for that section since there
## Sorting
To sort your files and folders in a specific way, you can prefix them with a number and underscore, e.g. `/docs/01_Hello_World.md` and `/docs/05_Features.md`.
This will list *Hello World* before *Features*, overriding the default alpha-numeric sorting.
This will list _Hello World_ before _Features_, overriding the default alpha-numeric sorting.
The numbers will be stripped out of the navigation and urls. For the file `6 Ways to Get Rich`, you can use `/docs/_6_Ways_to_Get_Rich.md`
You might also wish to stick certain links to the bottom of a page.

View File

@ -1,4 +1,3 @@
If you don't want to serve the live version of your site, you can also generate files, these can be one of the three supported formats :
- HTML output

View File

@ -23,5 +23,3 @@ You can enable this feature in your configuration
}
}
```

View File

@ -7,8 +7,9 @@ Highlight.js is a powerful but heavy library, since we don't know which language
The good news is; if you use a fenced code block (` ``` `) with the language defined, the rendering is done on server side and entirely skips loading Highlight.js on the page. While still having the same end-result on your code.
[TOC]
**Python**
## Python
```python
@requires_authorization
@ -24,7 +25,7 @@ class SomeClass:<br> pass
... prompt'''
```
**Python's profiler output**
## Python's profiler output
261917242 function calls in 686.251 CPU seconds
@ -35,8 +36,7 @@ class SomeClass:<br> pass
153900 1.296 rrule.py:399(_iter)
304393/151570 0.963 rrule.py:102(_iter_cached)
**Ruby**
## Ruby
class A < B; def self.create(object = User) object end end
class Zebra; def inspect; "X#{2 + self.object_id}" end end
@ -60,7 +60,7 @@ class SomeClass:<br> pass
Constant = 1
render action: :new
**Haml**
## Haml
!!! XML
%html
@ -77,7 +77,7 @@ class SomeClass:<br> pass
~variable4
The current year is #{DataTime.now.year}.
**Perl**
## Perl
# loads object
sub load
@ -107,7 +107,7 @@ class SomeClass:<br> pass
=head1 NAME
POD till the end of file
**PHP**
## PHP
require_once 'Zend/Uri/Http.php';
@ -143,7 +143,7 @@ class SomeClass:<br> pass
datahere */
datahere
**Scala**
## Scala
object abstractTypes extends Application {
abstract class SeqBuffer {
@ -178,7 +178,7 @@ class SomeClass:<br> pass
}
}
**Go**
## Go
package main
@ -221,7 +221,7 @@ class SomeClass:<br> pass
return
}
**XML**
## XML
<?xml version="1.0"?>
<response value="ok" xml:lang="en">
@ -233,8 +233,7 @@ class SomeClass:<br> pass
<a></a> <a/>
</response>
**HTML (with inline css and javascript)**
## HTML (with inline css and javascript)
<!DOCTYPE html>
<title>Title</title>
@ -250,7 +249,7 @@ class SomeClass:<br> pass
<!-- here goes the rest of the page -->
</body>
**Lasso**
## Lasso
<?LassoScript
/* Lasso 8 */
@ -295,7 +294,7 @@ class SomeClass:<br> pass
^}
?>
**Markdown**
## Markdown
# hello world
@ -318,7 +317,7 @@ class SomeClass:<br> pass
1. one thing (yeah!)
2. two thing `i can write code`, and `more` wipee!
**AsciiDoc**
## AsciiDoc
Hello, World!
============
@ -384,7 +383,7 @@ class SomeClass:<br> pass
NOTE: AsciiDoc is quite cool, you should try it.
**Django templates**
## Django templates
{% if articles|length %}
{% for article in articles %}
@ -403,7 +402,7 @@ class SomeClass:<br> pass
multiline.
{% endcomment %}
**Handlebars**
## Handlebars
<h3>Hours</h3>
@ -413,7 +412,7 @@ class SomeClass:<br> pass
{{/each}}
</ul>
**CSS**
## CSS
@media screen and (-webkit-min-device-pixel-ratio: 0) {
body:first-of-type pre::after {
@ -441,7 +440,7 @@ class SomeClass:<br> pass
width: 100%;
}
**SCSS**
## SCSS
@import "compass/reset";
@ -517,7 +516,7 @@ class SomeClass:<br> pass
}
}
**JSON**
## JSON
[
{
@ -532,7 +531,7 @@ class SomeClass:<br> pass
}
]
**JavaScript**
## JavaScript
function $initHighlight(block, flags) {
try {
@ -551,7 +550,7 @@ class SomeClass:<br> pass
}
}
**CoffeeScript**
## CoffeeScript
# Divisions
x = 6/foo/i
@ -610,7 +609,7 @@ class SomeClass:<br> pass
?: [-=]> # function
) ///
**ActionScript**
## ActionScript
package org.example.dummy {
import org.dummy.*;
@ -637,7 +636,7 @@ class SomeClass:<br> pass
}
}
**VB.NET**
## VB.NET
Import System
Import System.IO
@ -682,8 +681,7 @@ class SomeClass:<br> pass
End Class
End Namespace
**HTTP**
## HTTP
POST /task?id=1 HTTP/1.1
Host: example.org
@ -692,7 +690,7 @@ class SomeClass:<br> pass
{"status": "ok", "extended": true}
**Lua**
## Lua
--[[
Simple signal/slot implementation
@ -727,7 +725,7 @@ class SomeClass:<br> pass
[[ string
]] ]=] ]==]
**AppleScript**
## AppleScript
repeat 5 times
if foo is greater than bar then
@ -744,8 +742,7 @@ class SomeClass:<br> pass
do shell script "/bin/echo 'hello'"
**Delphi**
## Delphi
TList=Class(TObject)
Private
@ -778,7 +775,7 @@ class SomeClass:<br> pass
End;{Try}
End;{CopyFile}
**Java**
## Java
/**
* @author John Smith <john.smith@example.com>
@ -814,7 +811,7 @@ class SomeClass:<br> pass
}
}
**C++**
## C++
#include <iostream>
@ -831,7 +828,7 @@ class SomeClass:<br> pass
return -2e3 + 12l;
}
**Objective C**
## Objective C
#import <UIKit/UIKit.h>
#import "Dependency.h"
@ -877,7 +874,7 @@ class SomeClass:<br> pass
@end
**Vala**
## Vala
using DBus;
@ -926,7 +923,7 @@ class SomeClass:<br> pass
foo.method ();
}
**C**
## C
using System;
@ -954,7 +951,7 @@ class SomeClass:<br> pass
return urlContents.Length;
}
**F**
## F
open System
@ -1005,7 +1002,7 @@ class SomeClass:<br> pass
type s
let minutte = 60<s>
**D**
## D
#!/usr/bin/rdmd
// Computes average line length for standard input.
@ -1052,7 +1049,7 @@ class SomeClass:<br> pass
lines ? sumLength / lines : 0);
}
**RenderMan RSL**
## RenderMan RSL
#define TEST_DEFINE 3.14
/* plastic surface shader
@ -1070,7 +1067,7 @@ class SomeClass:<br> pass
Ci *= Oi;
}
**RenderMan RIB**
## RenderMan RIB
FrameBegin 0
Display "Scene" "framebuffer" "rgb"
@ -1098,7 +1095,7 @@ class SomeClass:<br> pass
WorldEnd
FrameEnd
**MEL (Maya Embedded Language)**
## MEL (Maya Embedded Language)
proc string[] getSelectedLights()
@ -1126,7 +1123,7 @@ class SomeClass:<br> pass
return $selectedLights;
}
**GLSL**
## GLSL
// vertex shader
#version 150
@ -1166,7 +1163,7 @@ class SomeClass:<br> pass
gl_FragColor = vec4(ex_Color, 1.0);
}
**SQL**
## SQL
BEGIN;
CREATE TABLE "topic" (
@ -1184,7 +1181,7 @@ class SomeClass:<br> pass
-- this line lacks ; at the end to allow people to be sloppy and omit it in one-liners
COMMIT
**SmallTalk**
## SmallTalk
Object>>method: num
"comment 123"
@ -1226,7 +1223,7 @@ class SomeClass:<br> pass
sorted add: rnd next]].
Transcript cr; show: 'Time for SortedCollection: ' , time printString , ' msecs'
**Lisp**
## Lisp
#!/usr/bin/env csi
@ -1251,7 +1248,7 @@ class SomeClass:<br> pass
(print (+ x y))
)
**Clojure**
## Clojure
; You must not remove this notice, or any other, from this software.
@ -1288,7 +1285,7 @@ class SomeClass:<br> pass
(. (var defn) (setMacro))
**Ini file**
## Ini file
;Settings relating to the location and loading of the database
[Database]
@ -1303,7 +1300,7 @@ class SomeClass:<br> pass
Glob=autoexec_*.ini
AskAboutIgnoredPlugins=0
**Apache**
## Apache
# rewrite`s rules for wordpress pretty url
LoadModule rewrite_module modules/mod_rewrite.so
@ -1322,7 +1319,7 @@ class SomeClass:<br> pass
RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L]
</Location>
**nginx**
## nginx
user www www;
worker_processes 2;
@ -1372,7 +1369,7 @@ class SomeClass:<br> pass
}
}
**Diff**
## Diff
Index: languages/ini.js
===================================================================
@ -1405,7 +1402,7 @@ class SomeClass:<br> pass
It is important to spell
**DOS batch files**
## DOS batch files
cd \
copy a b
@ -1432,7 +1429,7 @@ class SomeClass:<br> pass
xcopy %1\*.* %2
**Bash**
## Bash
#!/bin/bash
@ -1465,7 +1462,7 @@ class SomeClass:<br> pass
echo -e "# Host $1/$2 :"
}
**CMake**
## CMake
project(test)
cmake_minimum_required(VERSION 2.6)
@ -1492,7 +1489,7 @@ class SomeClass:<br> pass
target_link_libraries(test msimg32)
**Axapta**
## Axapta
class ExchRateLoadBatch extends RunBaseBatch {
ExchRateLoad rbc;
@ -1527,7 +1524,7 @@ class SomeClass:<br> pass
return ret;
}
**Oracle Rules Language**
## Oracle Rules Language
//This is a comment
ABORT "You experienced an abort.";
@ -1566,7 +1563,7 @@ class SomeClass:<br> pass
HNDL_1_ADD_VAL_MSG = INTDADDVMSG(HNDL_1,"Missing (Status Code 9) values found");
EMPTY_HNDL = INTDCREATEHANDLE('05/03/2006 00:00:00', '05/03/2006 23:59:59', 3600, "Y", "0", " ");
**1С**
## 1С
#Если Клиент Тогда
Перем СимвольныйКодКаталога = "ля-ля-ля"; //комментарий
@ -1585,7 +1582,7 @@ class SomeClass:<br> pass
d = '21.01.2008'
КонецПроцедуры
**AVR Assembler**
## AVR Assembler
;* Title: Block Copy Routines
;* Version: 1.1
@ -1607,7 +1604,7 @@ class SomeClass:<br> pass
.def ramtemp =r1 ;temporary storage register
.def ramsize =r16 ;size of block to be copied
**VHDL**
## VHDL
/*
* RS-trigger with assynch. reset
@ -1651,7 +1648,7 @@ class SomeClass:<br> pass
nQ <= not QT;
end architecture behaviour;
**Parser 3**
## Parser 3
@CLASS
base
@ -1688,7 +1685,7 @@ class SomeClass:<br> pass
# Isn't comment
$result[$.hash_item1[one] $.hash_item2[two]]
**TeX**
## TeX
\documentclass{article}
\usepackage[koi8-r]{inputenc}
@ -1708,7 +1705,7 @@ class SomeClass:<br> pass
$$
\end{document}
**Haskell**
## Haskell
{-# LANGUAGE TypeSynonymInstances #-}
module Network.UDP
@ -1751,7 +1748,7 @@ class SomeClass:<br> pass
pingUDPPort :: Socket -> SockAddr -> IO ()
pingUDPPort s a = sendTo s (Strict.singleton 0) a >> return ()
**Erlang**
## Erlang
-module(ssh_cli).
@ -1805,8 +1802,7 @@ class SomeClass:<br> pass
union_to_list(U1)
))).
**Erlang REPL**
## Erlang REPL
1> Str = "abcd".
"abcd"
@ -1836,7 +1832,7 @@ class SomeClass:<br> pass
11> 1.85e+3.
1850
**Rust**
## Rust
use std;
@ -1898,7 +1894,7 @@ class SomeClass:<br> pass
let a: list<int> = cons(7, @cons(13, @nil));
**Matlab**
## Matlab
n = 20; % number of points
points = [random('unid', 100, n, 1), random('unid', 100, n, 1)];
@ -1939,7 +1935,7 @@ class SomeClass:<br> pass
foo_matrix = [1, 2, 3; 4, 5, 6]''';
foo_cell = {1, 2, 3; 4, 5, 6}''.'.';
**R**
## R
library(ggplot2)
@ -2010,7 +2006,7 @@ class SomeClass:<br> pass
%"test"%
`"test"`
**Mizar**
## Mizar
::: ## Lambda calculus

View File

@ -1,2 +1,3 @@
### This is a landing page for the Examples section
Adding a landing page is pretty simple, all you need to do is add an "index.md" file to the related folder.

View File

@ -1,8 +1,9 @@
__Table of contents__
**Table of contents**
[TOC]
## Configuring the connection
The connection requires three parameters `base_url`, `user` and `pass`. While `user` and `pass` don't really need an explanation, for `base_url` you need to set the path to the server without `rest/api`, this will be added automatically.
```json
@ -16,6 +17,7 @@ The connection requires three parameters `base_url`, `user` and `pass`. While `u
```
## Where to upload
Now that the connection is defined, you need to tell it where you want your documentation to be uploaded.
For that you need a `space_id` (name that appears at the beginning of the urls) and an `ancestor_id`; the id of the page that will be the parent of the documentation's homepage.
@ -36,6 +38,7 @@ You can also provide a `root_id` instead of an `ancestor_id` in this case, you s
You can use that when you're uploading your documentation to the root of a Confluence Space or if your page already exists.
## Prefix
Because confluence can't have two pages with the same name in a space, I recommend you define a prefix for your pages.
```json
@ -45,6 +48,7 @@ Because confluence can't have two pages with the same name in a space, I recomme
```
## Update threshold
To make the upload quicker, we try to determine if a page changed or not, first with a strict comparison and if it's not completely identical, we compute the difference.
```json
@ -59,8 +63,8 @@ By default the threshold is 2%.
Setting the value to `0` disables the feature altogether.
## Delete old pages
When a page is renamed, there is no way to tell it was renamed, so when uploading to Confluence, the page will be uploaded and the old page will stay here.
By default, it will inform you that some pages aren't needed anymore and you can delete them by hand.
@ -73,8 +77,8 @@ By default, it will inform you that some pages aren't needed anymore and you can
By setting `delete` to `true` (or running `daux` with the `--delete` flag) you tell the generator that it can safely delete the pages.
## Information message
When you create your page. there is no indication that the upload process will override the content of the pages.
It happens sometimes that users edit the pages to add / fix an information.

View File

@ -1,10 +1,11 @@
__Table of contents__
**Table of contents**
[TOC]
## Analytics
### Google Analytics
This will embed the google analytics tracking code.
```json
@ -14,6 +15,7 @@ This will embed the google analytics tracking code.
```
### Piwik Analytics
This will embed the piwik tracking code.
```json
@ -31,6 +33,7 @@ You can Also give a specific Piwik ID as well.
```
### Plausible Analytics
This will embed the https://plausible.io/ tracking code.
```json
@ -40,10 +43,11 @@ This will embed the https://plausible.io/ tracking code.
```
## Automatic Table of Contents
You can add a table of contents on each page automatically, read about it [here](../01_Features/Table_of_contents.md)
## Buttons
You can add buttons to the landing page.
```json
@ -57,8 +61,9 @@ You can add buttons to the landing page.
```
## Breadcrumb titles
Daux.io provides the option to present page titles as breadcrumb navigation.
You can *optionally* specify the separator used for breadcrumbs.
You can _optionally_ specify the separator used for breadcrumbs.
```json
{
@ -70,6 +75,7 @@ You can *optionally* specify the separator used for breadcrumbs.
```
## Date Modified
By default, daux.io will display the last modified time as reported by the system underneath the title for each document.
To disable this, change the option in your config.json to `false`.
@ -80,6 +86,7 @@ To disable this, change the option in your config.json to `false`.
```
## GitHub Repo
Add a 'Fork me on GitHub' ribbon.
```json
@ -89,6 +96,7 @@ Add a 'Fork me on GitHub' ribbon.
```
## Inherit Index
This feature will instructs the navigation generator to seek the first available file to use when there is no index in a folder.
```json
@ -98,6 +106,7 @@ This feature will instructs the navigation generator to seek the first available
```
## Jump buttons
You can have previous/next buttons on each page.
They can be disabled by setting `jump_buttons` to `false`.
@ -108,9 +117,11 @@ They can be disabled by setting `jump_buttons` to `false`.
```
## Landing page
The automatic landing page can be disabled through the `auto_landing` option, read about it [here](../01_Features/Landing_page.md)
## Links
Include custom links in the sidebar.
```json
@ -126,15 +137,17 @@ Include custom links in the sidebar.
```
## Search
Daux has an embedded search engine read all about it [here](../01_Features/Search.md)
## Themes
We have 4 built-in Bootstrap themes. To use one of the themes, just set the `theme` option to one of the following:
* daux-blue
* daux-green
* daux-navy
* daux-red
- daux-blue
- daux-green
- daux-navy
- daux-red
```json
{
@ -151,6 +164,7 @@ To use a custom theme, just copy over the theme folder into the `themes` directo
```
## Toggling Code Blocks
Some users might wish to hide the code blocks & view just the documentation.
By setting the `toggle_code` property to `true`, you can offer a toggle button on the page.
@ -161,6 +175,7 @@ By setting the `toggle_code` property to `true`, you can offer a toggle button o
```
## Twitter
Include twitter follow buttons in the sidebar.
```json

View File

@ -1,10 +1,11 @@
To customize the look and feel of your documentation, you can create a `config.json` file in the of the `/docs` folder. The `config.json` file is a JSON object that you can use to change some of the basic settings of the documentation.
__Table of contents__
**Table of contents**
[TOC]
### Title
Change the title bar in the docs
```json
@ -14,6 +15,7 @@ Change the title bar in the docs
```
### Tagline
Change the tagline bar in the docs
```json
@ -23,6 +25,7 @@ Change the tagline bar in the docs
```
### Author
Change the documentation's author
```json
@ -32,6 +35,7 @@ Change the documentation's author
```
### Image
An image to show on the landing page. A relative path from the documentation root.
```json
@ -41,6 +45,7 @@ An image to show on the landing page. A relative path from the documentation roo
```
### Format
Change the output format. It is recommended you set only formats that support the live mode as this will also
be read by the integrated web server. And you set the other formats (like confluence) only by command line
@ -50,12 +55,13 @@ be read by the integrated web server. And you set the other formats (like conflu
}
```
- __html__ with [its options](./Html_export.md)
- __confluence__ with [its options](./Confluence_upload.md)
- **html** with [its options](./Html_export.md)
- **confluence** with [its options](./Confluence_upload.md)
Available formats are __HTML__ and __Confluence__
Available formats are **HTML** and **Confluence**
### Ignore
Set custom files and entire folders to ignore within your `/docs` folder. For files make sure to include the file extension in the name. For both files and folders, names are case-sensitive.
```json
@ -68,6 +74,7 @@ Set custom files and entire folders to ignore within your `/docs` folder. For fi
```
### Timezone
If your server does not have a default timezone set in php.ini, it may return errors when it tries to generate the last modified date/time for docs. To fix these errors, specify a timezone in your config file. Valid options are available in the [PHP Manual](http://php.net/manual/en/timezones.php).
```json
@ -77,6 +84,7 @@ If your server does not have a default timezone set in php.ini, it may return er
```
### Multi-language
Enables multi-language support which needs separate directories for each language in `docs/` folder.
```json
@ -86,6 +94,7 @@ Enables multi-language support which needs separate directories for each languag
```
Directory structure:
```
├── docs/
│ ├── _index.md
@ -139,6 +148,7 @@ A string that isn't found will fall back to english.
```
### Processor
You can set the processor in the documentation or as an option to the command line. If you need it when running the server, you should add it to the configuration.
More information on how to create a Processor can be found [here](!For_Developers/Creating_a_Processor).

View File

@ -92,4 +92,3 @@ public function addGenerators()
return ['custom_generator' => '\Todaymade\Daux\Extension\MyNewGenerator'];
}
```

View File

@ -11,7 +11,9 @@ Here is an example `config.json` file :
"favicon": "<theme_url>img/favicon.png",
"css": ["<theme_url>css/theme.min.css"],
"js": [],
"fonts": ["https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
"fonts": [
"https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"
],
"variants": {
"blue": {
"favicon": "<theme_url>img/favicon-blue.png",
@ -27,19 +29,19 @@ Here is an example `config.json` file :
There are five options :
- __`favicon`__: The URL to your favicon
- __`css`__: An array of CSS Stylesheets to add to the page
- __`js`__: An array of JavaScript files to load
- __`fonts`__: An array of Font sources, these are added as stylesheets
- __`variants`__: An object containing sub-themes. Each sub theme, can provide the same configurations as the main theme (`favicon`, `css`, `js`, `fonts`)
- **`favicon`**: The URL to your favicon
- **`css`**: An array of CSS Stylesheets to add to the page
- **`js`**: An array of JavaScript files to load
- **`fonts`**: An array of Font sources, these are added as stylesheets
- **`variants`**: An object containing sub-themes. Each sub theme, can provide the same configurations as the main theme (`favicon`, `css`, `js`, `fonts`)
You will also notice this `<theme_url>` in the url.
This is automatically substituted with the final url to the theme when generating the final page.
There are two possible substitutions :
- __`<theme_url>`__: The url to the current theme
- __`<base_url>`__: The url to the documentation root
- **`<theme_url>`**: The url to the current theme
- **`<base_url>`**: The url to the documentation root
## Theme variants
@ -85,6 +87,7 @@ You can create a folder named `templates` in your theme, copy-paste the original
You can even do it one template at a time if you wish to do only small changes.
By default, we have the following templates :
- `content.php`: The content page.
- `home.php`: The landing page.
- `error.php`: The page to show when a page is not found or some other error happened.

View File

@ -13,37 +13,37 @@
#### For Authors
* [Auto Generated Navigation / Page sorting](01_Features/Navigation_and_Sorting.md)
* [Internal documentation links](01_Features/Internal_links.md)
* [CommonMark compliant](01_Features/CommonMark_compliant.md)
* [Auto created homepage/landing page](01_Features/Landing_page.md)
* [Multiple Output Formats](01_Features/Multiple_Output_Formats.md)
* [Multiple Languages Support](01_Features/Multilanguage.md)
* [No Build Step](01_Features/Live_mode.md)
* [Static Output Generation](01_Features/Static_Site_Generation.md)
* [Table of Contents](01_Features/Table_of_contents.md)
- [Auto Generated Navigation / Page sorting](01_Features/Navigation_and_Sorting.md)
- [Internal documentation links](01_Features/Internal_links.md)
- [CommonMark compliant](01_Features/CommonMark_compliant.md)
- [Auto created homepage/landing page](01_Features/Landing_page.md)
- [Multiple Output Formats](01_Features/Multiple_Output_Formats.md)
- [Multiple Languages Support](01_Features/Multilanguage.md)
- [No Build Step](01_Features/Live_mode.md)
- [Static Output Generation](01_Features/Static_Site_Generation.md)
- [Table of Contents](01_Features/Table_of_contents.md)
</div>
<div class="Row__third">
#### For Developers
* [Auto Syntax Highlighting](01_Features/Auto_Syntax_Highlight.md)
* [Extend Daux.io with Processors](01_For_Developers/Creating_a_Processor.md)
* Full access to the internal API to create new pages programatically
* Work with pages metadata
- [Auto Syntax Highlighting](01_Features/Auto_Syntax_Highlight.md)
- [Extend Daux.io with Processors](01_For_Developers/Creating_a_Processor.md)
- Full access to the internal API to create new pages programatically
- Work with pages metadata
</div>
<div class="Row__third">
#### For Marketing
* 100% Mobile Responsive
* 4 Built-In Themes or roll your own
* Functional, Flat Design Style
* Optional code float layout
* Shareable/Linkable SEO Friendly URLs
* Supports Google Analytics and Piwik Analytics
- 100% Mobile Responsive
- 4 Built-In Themes or roll your own
- Functional, Flat Design Style
- Optional code float layout
- Shareable/Linkable SEO Friendly URLs
- Supports Google Analytics and Piwik Analytics
</div>
</div>
@ -52,7 +52,7 @@
### Installation and usage
If you have __PHP__ and Composer installed
If you have **PHP** and Composer installed
```bash
composer global require daux/daux.io
@ -61,7 +61,7 @@ composer global require daux/daux.io
daux generate
```
Or if you wish to use __Docker__
Or if you wish to use **Docker**
```bash
# Next to your `docs` folder, run