Git Product home page Git Product logo

jdoc's Introduction

JDoc

Pretty documentation generator for large projects

Description

JDoc is a Jekyll plugin that lets you organize your documentation into a hierarchical file structure. It was created primarily to generate Project Pages for large projects where the documentation needs to be organized hierarchically across multiple files.

For example, this code produces this result.

Getting Started

  1. Install jekyll
  2. Clone jdoc-example recursively to include its submodule:
    git clone --recursive git://github.com/tombenner/jdoc-example.git
  3. Start jekyll using jekyll --server (read more) and see the site here
  4. Edit the files in documentation/ to start documenting!

Tips:

  • You might want to use jekyll --server --auto to automatically regenerate the site when you modify files.
  • You can change the root URL of the site with the baseurl value in _config.yml.

File Structure

Documentation is organized in the documentation directory in root Jekyll directory. The file structure looks like this:

documentation/
    first_topic/
        _sort.yml
        first_subtopic.md
        second_subtopic.md
        index.md
    second_topic.md

This structure will be rendered into a hierarchical menu. index.md is the content that's shown for first_topic.

_sort.yml is optional. If it's included in a directory, it specifies the order in which that directory's topics are rendered in the menu. In the example above, it might look like this:

first_subtopic
second_subtopic

Documentation Syntax

Each file behaves just like a Jekyll file does, except that the YAML header isn't required. An initial --- is required, though:

---
Here's some documentation on this topic.

The title is inferred from the file's name, but you can explicitly set the title using the YAML header

---
title: My Custom Title
---
Here's some documentation on this topic.

Tags

doc_link

Creates a link to another topic. The first argument is the path to the topic; the second is the text:

{% doc_link first_topic My custom text %}

<a href="/first_topic/">My custom text</a>

If the second argument is omitted, the title of the topic will be used:

{% doc_link first_topic/second_subtopic %}

<a href="/first_topic/second_subtopic/">Second Subtopic</a>

doc_children

Renders all of the current topic's children in a single page. Here's an example of the output.

{% doc_children %}

doc_menu

Renders the hierarchical menu of topics.

{% doc_menu %}

jdoc's People

Contributors

nocash avatar tombenner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

erutan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.