8
0
Datei suchen
Eisbehr a7185c41bb fix 'jump_buttons' check to prevent errors
it could cause problems while generating, when 'jump_buttons' is not present
2017-05-17 09:46:01 +02:00
bin Add the daux --serve command to simplify writing documentation and reading. 2016-07-29 21:56:10 +02:00
daux Applied fixes from StyleCI 2016-07-29 21:56:09 +02:00
docker Add a docker-compose configuration to try to reproduce #386 2016-08-05 23:10:23 +02:00
docs Improve documentation add missing examples, adds to #453 2017-05-16 22:24:28 +02:00
examples/multilanguage Fix multilanguage, make an example, fixes #416 2017-01-10 10:28:58 +01:00
libs Fix homepage title when auto_landing is disabled fixes #456 2017-05-16 23:17:06 +02:00
templates fix 'jump_buttons' check to prevent errors 2017-05-17 09:46:01 +02:00
tests Added a test for mailto: links 2017-01-23 23:28:56 +01:00
themes Update npm dependencies, use yarn 2017-01-09 17:50:45 +01:00
tipuesearch Tweak search on mobile, fixes #432 2017-01-23 23:24:09 +01:00
.editorconfig Add an .editorconfig file 2014-08-23 10:26:01 +02:00
.gitattributes Add a .gitattributes file 2014-08-23 11:18:10 +02:00
.gitignore Improve readability of the theme, fixes #363 2016-05-05 23:43:37 +02:00
.htaccess Update htaccess 2015-07-20 20:51:48 +02:00
.travis.yml Add badges and code coverage 2016-07-29 21:56:10 +02:00
composer.json Allow to use Processors through the new CLI 2016-11-17 17:02:12 +01:00
composer.lock Downgrade phpunit for php 5.5 2016-09-26 20:58:36 +02:00
daux.phar Compile latest daux.phar 2016-08-30 22:56:04 +02:00
generate Add the daux --serve command to simplify writing documentation and reading. 2016-07-29 21:56:10 +02:00
global.json add jump_buttons config to globals.json 2017-05-15 11:09:05 +02:00
gulpfile.js Update npm dependencies, use yarn 2017-01-09 17:50:45 +01:00
index.php Applied fixes from StyleCI 2016-07-29 21:56:10 +02:00
LICENSE Adding the MIT License 2013-07-19 07:41:06 -05:00
package.json Update npm dependencies, use yarn 2017-01-09 17:50:45 +01:00
phpunit.xml First unit tests & TDD Refactoring 2015-10-28 00:01:41 +01:00
README.md Improve documentation add missing examples, adds to #453 2017-05-16 22:24:28 +02:00
serve Update documentation 2015-07-20 20:51:48 +02:00
yarn.lock Update npm dependencies, use yarn 2017-01-09 17:50:45 +01:00

Daux.io

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

Daux.io is an 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
  • Supports GitHub Flavored Markdown
  • 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:

Do you use Daux.io? Send me a pull request or open an issue and I will add you to the list.

Install

composer global require justinwalsh/daux.io

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

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.

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

The generator will look for Markdown files (*.md and *.markdown) inside the docs folder and any of the subfolders within docs.

You must use underscores instead of spaces. Here are some example file names and what they will be converted to:

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

Bad:

  • 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

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:

{
	"title": "Daux.io",
	"tagline": "The Easiest Way To Document Your Project",
	"image": "app.png"
}

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.

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

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.

Title

Change the title bar in the docs

{
	"title": "Daux.io"
}

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
{
  "html": { "theme": "daux-green" }
}

More options

Many other options are available:

Running Remotely

Copy the files from the repo to a web server that can run PHP 5.4 or greater.

Running Locally

There are several ways to run the docs locally. You can use something like MAMP or WAMP. If you are like me and use alot of Node.js and Grunt.js, then you can use the optional grunt command I have packaged with the project which will start a PHP web server for you in the project folder.

The Grunt.js task uses the built in web server in PHP 5.4 to host the docs on your local machine. This is really only intended be used when you are writing/updating a ton of docs and want to preview the changes locally.

To use the optional Grunt command you will need:

  • Node.js
  • npm
  • Grunt.js
  • PHP 5.5 or greater

This project contains a package.json file, so once you have the requirements installed, you can simply run a npm install and then grunt in the projects folder to start the local web server. By default the server will run at: http://localhost:8085

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

daux --source=docs --destination=static

Running on IIS

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.

Clean URLs

The web.config needs an entry for <rewrite> under <system.webServer>:

<configuration>
	<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>
</configuration>

To use clean URLs on IIS 6, you will need to use a custom URL rewrite module, such as URL Rewriter.

Docker

A docker configuration is also provided to run daux within a container, you can either run daux with php5 or php7.

cd docker
docker-compose -f docker-compose.7.yml up -d

You can then point your browser to http://localhost:8086

PHP Requirements

Daux.io is compatible with PHP 5.5 and up.

The reason is because some dependencies we have (mainly Symfony and Guzzle) do not support php 5.4 anymore.

Extensions

PHP Needs the following extension 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. (We've seen it happen only on PHP 7)

Support

If you need help using Daux.io, or have found a bug, please create an issue on the GitHub repo.