• Stars
    star
    886
  • Rank 51,520 (Top 2 %)
  • Language
    Ruby
  • Created almost 13 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pretty documentation generator for Github projects with proper Readme.

DocumentUp

This site has been generated with DocumentUp (eat your own dog food, people)

Automatically generated documentation sites for your markdown files! There are various ways of getting your documentation going:

Hosted

DocumentUp hosts your documentation sites. Just visit http://documentup.com/username/repository to generate a site from your README.md.

Recommended if you have a public Github repository.

CNAME

You can point a CNAME to project.username.documentup.com.

Post-Receive Hook

If you want your readme to be recompiled, please add a Post-Receive Hook to your Github repository pointing to: http://documentup.com/recompile

Manual Recompile

Visit http://documentup.com/username/repository/__recompile to manually tell the server to recompile your readme.

Useful when changes are made to the stylesheets on the server but the compilation hasn't been triggered for a while.

Configuration

Add a .documentup.yml dotfile file to the root of your repository. Refer to the options section below for its contents. Feel free to consult this repository's .documentup.yml

JSONP example with jQuery

$.ajax({
  url: "http://documentup.com/compiled",
  dataType: "jsonp",
  data: {
    content: "# test",
    name: "Test JSONP!"
  },
  success: function(resp){
    // `status` is always provided
    if (resp.status == 200) {
      // Write to your document
      document.open();
      document.write(resp.html);
      document.close();
    }
  }
});

gh-pages

For those wanting to stay within the comfort of their gh-pages branch, it's still possible by using an index.html file similar to this:

<!DOCTYPE html>
<html>
  <head>
    <script src="documentup.min.js"></script>
    <script>
      DocumentUp.document("username/repository");
    </script>
  </head>
  <body></body>
</html>

Make sure to change the "username/repository" to the repository's name and user's username.

Use the documentup.min.js file in this repository, not the one what used to be on cdnjs.com, it's deprecated.

Configuration

DocumentUp.document accepts either a String or an Object representing your desired configuration. If an object is used, remember to add a repo option containing the path "username/repository" to your github repository.

All options detailed in the options section are available.

In addition to those, one special option is available to "gh-pages version" of DocumentUp:

afterRender (Function)
A function to be executed after the document has been replaced with the compiled HTML.

Example

DocumentUp.document({
  repo:  "jeromegn/documentup",
  name: "DocumentUp",
  twitter: [
    "jeromegn",
    "DocumentUp"
  ],
  afterRender: function(){
    alert("rendered");
  }
});

What this script does

It does what's written in the JSONP section, without the jQuery dependency. It uses a endpoint like: http://documentup.com/username/repository?callback= to fetch the cached copy of the repository and then replaces the page's html with the generated documentation.

Formatting guide

Just like you normally would. DocumentUp also supports "Github Flavored Markdown" and we recommend you use it for syntax highlighting.

It doesn't support tables as it is supported on Github, but you can use inline HTML.

h1's (# in markdown) will appear as first level navigation in the sidebar while h2's (##) will appear under them as sub-navigation.

Example:

# Project name / Title (won't appear in the sidebar)

Some intro text if you want.

## Top level-navigation

### Sub-navigation

#### This wouldn't show up in the sidebar

Options

name

String, default: repository name

Name of your project. It'll appear in the header of the sidebar. Defaults to the repository substring of the repo option.

color

String, default: "#336699"

CSS-like color representing the color for the links both in the sidebar and the content.

theme

String, default: null

Name of the theme to use. Refer to the themes sections.

issues

Boolean, default: true

Adds a link to the sidebar for the issues tab of the repository if true. Also accepts a string if your issues are managed elsewhere.

travis

Boolean, default: false

Indicate if the project is being tested by Travis-CI. If true, it'll add the small travis badge in the sidebar.

twitter

String / Array of strings, default: null

Add follow buttons for one or more Twitter accounts to your sidebar. Useful to gather followers.

google_analytics

String default: null

This is your Google Analytics "UA" unique ID. Adds GA tracking to your generated documentation.
e.g.: "UA-5201171-14"

Themes

Default

The one you're looking at now.

V1

For the nostalgic. Use v1 in your theme config option.

V1

Roadmap

  • Private repositories
  • Multi-page aggregation

Thank you

  • Thanks to Jean-Marc Denis for the freely downloadable bow tie I used in the logo.

Changelog

2.0 (June 15, 2015)

Full rewrite of the app:

  • Deprecated on-demand /compiled endpoint
  • Renamed manual recompile endpoint to username/repo/__recompile
  • Uses Ruby on Rails
  • Uses SASS
  • Laid the foundation for multiple pages (it works right now, just not linked or explained, needs some work)
  • Uses PostgreSQL

Hosted version (Feb 2, 2012)

Versioning is going to be difficult now since this is now a service. Deployment will be continuous.

0.1.1 (Jan 26, 2012)

  • Files now parsed in UTF-8
  • Namespaced repositories in localStorage (thanks to tbranyen)
  • A few README fixes

0.1.0 (Jan 25, 2012)

  • Initial release

License

Copyright (c) 2015 Jerome Gravel-Niquet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

Backbone.localStorage

A localStorage adapter for Backbone.js
JavaScript
1,897
star
2

slang

Slim-inspired templating language for Crystal
Crystal
232
star
3

kilt

Generic template interface for Crystal
Crystal
148
star
4

localtodos

Simple Todos App built on Backbone.js
JavaScript
99
star
5

protobuf.cr

Protobuf generator, encoder and decoder.
Crystal
95
star
6

poutine

MongoDB ORM for Node.js
CoffeeScript
35
star
7

docker.cr

Docker API client in Crystal.
Crystal
26
star
8

influxdb.cr

InfluxDB driver for Crystal
Crystal
25
star
9

bson.cr

BSON implementation written in Crystal
Crystal
24
star
10

v8.cr

V8 bindings for Crystal
C++
16
star
11

dry-types-rails

Dry::Types railties
Ruby
11
star
12

beautifier

A safari extension which smooths fonts!
10
star
13

Warping-Shadow-CSS3

Warping Shadows can be done in CSS3
Ruby
8
star
14

mongol

Light modeling for MongoDB.
JavaScript
8
star
15

jeromegn.github.com

Personal site
HTML
5
star
16

rapid

Redis ORM-ish api for nodejs
JavaScript
3
star
17

backbone.pjax

Backbone utilities for web apps using PJAX.
JavaScript
3
star
18

rhai-tpl

Simple template engine using rhai for logic
Rust
2
star
19

qml.cr

QML library for Crystal
Crystal
2
star
20

lg-ultrafine-brightness

Control LG Ultrafine brightness on linux
Rust
1
star
21

containerd-rs

Rust
1
star
22

Radiophonique

Objective-C
1
star
23

quinn-plaintext

QUIC pluggable crypto to use the protocol as plaintext (for use when cryptography is already handled at another layer, e.g. Wireguard)
Rust
1
star
24

documentup.js

experimental DocumentUp running on fly.io
JavaScript
1
star
25

portfolio

My portfolio, built with StaticMatic
JavaScript
1
star
26

node-api-boilerplate

Simple Node.js API server boilerplate using CoffeeScript and Express
CoffeeScript
1
star