2016-07-27 22:00:35 +02:00
# Daux.io
2017-09-13 21:43:40 +02:00
[![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)
2020-05-01 22:09:02 +02:00
![GitHub Workflow Status ](https://img.shields.io/github/workflow/status/dauxio/daux.io/CI?style=flat-square )
2017-09-13 21:43:40 +02:00
[![Coverage Status ](https://img.shields.io/scrutinizer/coverage/g/dauxio/daux.io.svg?style=flat-square )](https://scrutinizer-ci.com/g/dauxio/daux.io/code-structure)
[![Quality Score ](https://img.shields.io/scrutinizer/g/dauxio/daux.io.svg?style=flat-square )](https://scrutinizer-ci.com/g/dauxio/daux.io)
2017-11-07 23:17:05 +01:00
[![Total Downloads ](https://img.shields.io/packagist/dt/daux/daux.io.svg?style=flat-square )](https://packagist.org/packages/daux/daux.io)
2016-07-27 22:00:35 +02:00
2017-05-18 22:51:59 +02:00
**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.
2014-08-23 10:15:14 +02:00
## Features
2020-04-25 14:44:43 +02:00
- 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
2014-08-23 10:15:14 +02:00
## Demos
This is a list of sites using Daux.io:
2020-04-25 14:44:43 +02:00
- 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/ )
- 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/ )
2014-08-23 10:15:14 +02:00
2017-09-13 21:43:40 +02:00
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.
2014-08-23 10:15:14 +02:00
2016-07-29 23:20:01 +02:00
## Install
2014-08-23 10:15:14 +02:00
2017-09-13 23:27:19 +02:00
### PHP and Composer
If you have PHP and Composer installed, you can install the dependency
```bash
2017-10-14 06:18:00 +02:00
composer global require daux/daux.io
2017-09-13 23:27:19 +02:00
# Next to your `docs` folder, run
daux generate
2016-07-29 23:20:01 +02:00
```
You can then use the `daux` command line to generate your documentation.
If the command isn't found, ensure your `$PATH` contains `~/.composer/vendor/bin`
2017-09-13 23:27:19 +02:00
### Docker
Or if you wish to use Docker, the start of the command will be :
```bash
2019-02-24 14:25:24 +01:00
docker run --rm -it -w /build -v "$PWD":/build -u "$(id -u):$(id -g)" daux/daux.io daux
2017-09-13 23:27:19 +02:00
```
2016-07-29 23:20:01 +02:00
## Run on a server
Download this repository as a zip, unpack, and put your documentation in the `docs` folder, you can then serve it with Apache or Nginx.
## `daux`
The command line tool has two commands: `generate` and `serve` , running Daux.io without an argument will automatically run the `generate` command.
You can run `daux --help` to get more details about each command.
2014-08-23 10:15:14 +02:00
## Folders
By default, the generator will look for folders in the `docs` folder. Add your folders inside the `docs` folder. This project contains some example folders and files to get you started.
You can nest folders any number of levels to get the exact structure you want. The folder structure will be converted to the nested navigation.
If you'd prefer to keep your docs somewhere else (like outside of the daux.io root directory) you can specify your docs path in the `global.json` file.
## Files
2016-07-29 23:20:01 +02:00
The generator will look for Markdown files (`*.md` and `*.markdown` ) inside the `docs` folder and any of the subfolders within `docs` .
2014-08-23 10:15:14 +02:00
You must use underscores instead of spaces. Here are some example file names and what they will be converted to:
**Good:**
2020-04-25 14:44:43 +02:00
- 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
2014-08-23 10:15:14 +02:00
**Bad:**
2020-04-25 14:44:43 +02:00
- File Name With Space.md = FAIL
2014-08-23 10:15:14 +02:00
## Sorting
2020-04-25 14:44:43 +02:00
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`
2014-08-23 10:15:14 +02:00
## Landing page
If you want to create a beautiful landing page for your project, simply create a `index.md` file in the root of the `/docs` folder. This file will then be used to create a landing page. You can also add a tagline and image to this page using the config file like this:
```json
{
2020-04-25 14:44:43 +02:00
"title": "Daux.io",
"tagline": "The Easiest Way To Document Your Project",
"image": "app.png"
2014-08-23 10:15:14 +02:00
}
```
2014-08-23 10:16:12 +02:00
Note: The image can be a local or remote image. Use the convention `<base_url>` to refer to the root directory of the Daux instance.
2014-08-23 10:15:14 +02:00
## Section landing page
If you are interested in having a landing page for a subsection of your docs, all you need to do is add an `index.md` file to the folder. For example, `/docs/01_Examples` has a landing page for that section since there exists a `/docs/01_Examples/index.md` file. If you wish to have an index page for a section without a landing page format, use the name `_index.md`
## Configuration
2016-07-29 23:20:01 +02:00
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 simple JSON object that you can use to change some of the basic settings of the documentation.
2014-08-23 10:15:14 +02:00
2017-04-05 16:05:05 +02:00
### Title
2020-04-25 14:44:43 +02:00
2014-08-23 10:15:14 +02:00
Change the title bar in the docs
```json
{
2020-04-25 14:44:43 +02:00
"title": "Daux.io"
2014-08-23 10:15:14 +02:00
}
```
2017-04-05 16:05:05 +02:00
### Themes
2020-04-25 14:44:43 +02:00
2014-08-23 10:15:14 +02:00
We have 4 built-in Bootstrap themes. To use one of the themes, just set the `theme` option to one of the following:
2020-04-25 14:44:43 +02:00
- daux-blue
- daux-green
- daux-navy
- daux-red
2014-08-23 10:15:14 +02:00
```json
{
2020-04-25 14:44:43 +02:00
"html": { "theme": "daux-green" }
2014-08-23 10:15:14 +02:00
}
```
2017-05-16 22:24:28 +02:00
### More options
2020-04-25 14:44:43 +02:00
2017-05-16 22:24:28 +02:00
Many other options are available:
2020-04-25 14:44:43 +02:00
- [Global options ](http://daux.io/Configuration/index )
- [HTML Options ](http://daux.io/Configuration/Html_export )
- [Confluence options ](http://daux.io/Configuration/Confluence_upload )
2014-08-23 10:15:14 +02:00
## Running Remotely
2020-02-07 22:38:01 +01:00
Copy the files from the repo to a web server that can run PHP 7.2.0 or newer.
2014-08-23 10:15:14 +02:00
## Running Locally
2017-10-27 11:05:55 +02:00
There are several ways to run the docs locally.
2020-04-25 14:44:43 +02:00
The recommended way is to run `daux serve` which will execute PHP's embedded server.
2014-08-23 10:15:14 +02:00
2017-10-27 11:05:55 +02:00
By default the server will run at: < a href = "http://localhost:8085" target = "_blank" > http://localhost:8085< / a >
2014-08-23 10:15:14 +02:00
2017-10-27 11:05:55 +02:00
This is really only intended be used when you are writing/updating a ton of docs and want to preview the changes locally.
2014-08-23 10:15:14 +02:00
## Generating a set of static files
These can be uploaded to a static site hosting service such as pages.github.com
Generating a complete set of pages, with navigation
```bash
2016-07-29 23:20:01 +02:00
daux --source=docs --destination=static
2014-08-23 10:15:14 +02:00
```
## Running on IIS
If you have set up a local or remote IIS web site, you may need a `web.config` with:
2020-04-25 14:44:43 +02:00
- A rewrite configuration, for handling clean urls.
- A mime type handler for less files, if using a custom theme.
2014-08-23 10:15:14 +02:00
### Clean URLs
The `web.config` needs an entry for `<rewrite>` under `<system.webServer>` :
```xml
< configuration >
2020-04-25 14:44:43 +02:00
< system.webServer >
< rewrite >
< rules >
< 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"
/>
< / conditions >
< action
type="Rewrite"
url="index.php"
appendQueryString="false"
/>
< / rule >
< / rules >
< / rewrite >
< / system.webServer >
2014-08-23 10:15:14 +02:00
< / configuration >
```
To use clean URLs on IIS 6, you will need to use a custom URL rewrite module, such as [URL Rewriter ](http://urlrewriter.net/ ).
2016-08-10 08:56:55 +02:00
## PHP Requirements
2016-07-27 21:47:36 +02:00
2020-04-25 14:44:43 +02:00
Daux.io is compatible with the [officially supported ](https://www.php.net/supported-versions.php ) PHP versions; 7.2.0 and up.
2016-08-10 08:56:55 +02:00
### Extensions
2020-02-07 22:38:01 +01:00
Daux.io needs the following PHP extensions to work : `php-mbstring` and `php-xml` .
2016-08-10 08:56:55 +02:00
2018-10-12 08:00:23 +02:00
If you encounter an error similar to `utf8_decode() not found` this means that you're missing the `php-xml` package.
2016-07-27 21:47:36 +02:00
2014-08-23 10:15:14 +02:00
## Support
2017-09-13 21:43:40 +02:00
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 > .