jokesterfr / easydoc

A simple technical documentation site with markdown files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to Easydoc !

What's the deal ?

Easydoc is a tiny web server that publish your documentation written in markdown.

It provides you a file index for browsing, and a full-text search.

It's very basic, and very easy to use and customize.

Installation

  1. You'll need the appropriate NodeJs installation on your system.
  2. Download the latest version of easydoc and unzip it
  3. From the command line, build it with: npm install -g
  4. Also from the command line, run it: easydoc

How can I use it ?

Once the server is running, simply drops your documentation files written in markdown and with the 'md' extension in the docs folder. Let's say your file is named myfile.md, with a browser, go to http://localhost/myfile.md.

That's it !

How do I customize the look&feel ?

You can find all the client-side files in the ./public directory:

  • ./public/style. contain the css files, for rendering customizations
  • ./public/tpl. contain the templates
  • ./public/build. contain aggregated/minified stuff, for performance

Templates are using the handlebars templating language, it is based on mustache syntax, very easy to use. They are pre-compiled at run time by the server, into one single templates.js file. Pre-compiling handlebars template make it easier for the browser to process parsing. handlerbars.runtime.js is a subset of the handlebars library, a lower file to download...

Fot rendering customizations, feel free to customize the style/style.css file.

I need to customize the root folder !

When launching the server, you can specify your root folder.

Here is the command line documentation of the server:

Usage: ./easydoc [options]

Options:

    -h, --help            output usage information
    -V, --version         output the version number
    -r, --root [docs]     Absolute or relative path to the root folder containing static and markdown files.
    -t, --title label     Title of the site as printed in the tab or title bar of the browser.
    -p, --port [80]       Local port of the created Http server.
    -h, --host [0.0.0.0]  Hostname of the created Http server.
    --no-cache            Disable mustache template caching (for dev purposes)
from clement import *
class toto:
    self.toto(a):
        return a

Well this is great, but isn't that feugy's work?

I actually forked it to break limitations, and enhance markdown parsing ;)

My easydoc fork add some features to feugy's work:

  • Display the docs file tree
  • Dynamic table of contents
  • Markdown parsed with pandoc
  • Templating engine switched from mustache to handlebars
  • Support of pre-compiled templates
  • Autonomous ./public folder for client-side application
  • Supporting of subfolders, index.md should be the default file to look at
  • Editing a markdown file auto-magically updates the client (if document is browsed)

Are their limitations ?

Yes, plenty !

  • Async get erros not handled
  • File deletion not supported
  • Ugly file tree
  • File tree to update on file system changes
  • Markdown files must have the .md extension
  • Impossible to display raw markdown
  • No editing form
  • Search functionnality has not been checked again
  • Tests are fucked up
  • I'm not satisfied of express routes naming I chose

Have fun !

About

A simple technical documentation site with markdown files


Languages

Language:JavaScript 89.2%Language:CSS 10.8%