• Stars
    star
    139
  • Rank 262,954 (Top 6 %)
  • Language
    JavaScript
  • Created over 7 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

Easily build a searchable documentation app using markdown files in your Github Repo or local Markdown files.

Githubdocs

Easily build a searchable documentation Single Page Application (SPA) using markdown files in your Github Repo or local Markdown files. Github docs is a lightweight alternative to Gitbooks allowing simple but powerful Markdown generate documentation websites.

Website from Github Repo

Installation

  1. Clone Repository: git clone https://github.com/mrvautin/githubdocs.git && cd githubdocs
  2. Install dependencies: npm install
  3. Start application: npm start
  4. Go to http://127.0.0.1:5555 in your browser

Demo

https://githubdocs.markmoffat.com

Markdown files

The docs menu and files are built using files from your Github repo set in the config. Files should have the title of the doc in a single markdown hash/# (HTML = H1) tag in the file. This is used to build the slug of the doc and the menu title etc.

See example docs here: https://github.com/mrvautin/githubdocs/tree/master/docs

Search

Search is built using js-search. The index is built and stored in memory on startup. When searched from the client the API is called returning any matching docs. The menu will then display the match docs. When the search term is removed, the full list of docs is returned.

Config

The config file is located here: /config/config.json.

An example config:

{
    "title": "githubdocs",
    "githubRepoOwner": "mrvautin",
    "githubRepoName": "githubdocs",
    "githubRepoPath": "exampleDocs",
    "updateDocsCron": "*/5 * * * *",
    "addAnchors": true,
    "menuItems": [
        {
            "menuTitle": "About",
            "menuLink": "/about"
        },
        {
            "menuTitle": "Contact",
            "menuLink": "/contact"
        }
    ],
    "static": false
}
Setting Description
title Sets the value to be displayed at the top of the page
githubRepoOwner Owner/username of the Github repo
githubRepoName Name of the repo holding the Markdown files
githubRepoPath Directory relative to the root of the repo holding the Markdown files
updateDocsCron A cron schedule to reindex your Markdown files/docs from Github or static
addAnchors Transforms H1, H2, H3, H4, H5 info HTML anchor points for easy sharing
menuItems Not sure how useful this is. Set the menu items in the top navigation
static Reads Markdown files statically from /docs folder. Defaults to false

Static websites

It's also possible to create a site from local Markdown files rather than using a Github repo.

Starting

You can start your website using the following command from the root of your app:

node app.js

Static

To do this you place your Markdown files into the docs folder and set static to true in your config.

An example config.json for a static site:

{
    "title": "githubdocs",
    "githubRepoOwner": "mrvautin",
    "githubRepoName": "githubdocs",
    "githubRepoPath": "exampleDocs",
    "updateDocsCron": "*/5 * * * *",
    "addAnchors": true,
    "menuItems": [
        {
            "menuTitle": "About",
            "menuLink": "/about"
        },
        {
            "menuTitle": "Contact",
            "menuLink": "/contact"
        }
    ],
    "static": true
}

Layouts

You can also specify your own layout file. The default views/layouts/layout.hbs file is used unless you specify a different file in your config.json.

{
    "layoutFile": "material.hbs"
}

Included is a material.hbs design template and a Bootstrap template (default.hbs).

More Repositories

1

adminMongo

adminMongo is a Web based user interface (GUI) to handle all your MongoDB connections/databases needs.
JavaScript
3,875
star
2

expressCart

A fully functioning Node.js shopping cart with Stripe, PayPal, Authorize.net, PayWay, Blockonomics, Adyen, Zip and Instore payments.
JavaScript
2,252
star
3

openKB

Open Source Nodejs Markdown based knowledge base (FAQ) app
JavaScript
654
star
4

squido

A dead simple static HTML website builder which can be hosted anywhere for super fast websites and very little effort
JavaScript
64
star
5

typewrite

A javascript typewriter library which animates the typing, deleting, and selecting of text on a page
JavaScript
48
star
6

metaget

A Node.js module to fetch HTML meta tags (including Open Graph) from a remote URL
JavaScript
23
star
7

downa

A teeny tiny Markdown to HTML renderer which works in Node and the browser.
JavaScript
21
star
8

myNotebook

A cross-platform (Electron) SPA application which can be used to take notes, edit Markdown, create blog posts, keep screenshots and be used as a general diary
JavaScript
20
star
9

helpkb

A superfast and easy to use knowledge base to help your customers get the info they need, when they need it most.
JavaScript
15
star
10

nextjs-checkout

A superfast shopping cart built with Next.js and Prisma.
TypeScript
10
star
11

minipaas

A push-to-deploy PaaS system = 'git add' > 'git commit' > 'minipaas deploy'
JavaScript
8
star
12

wee-db

A 'wee' and simple embedded JSON database built on `lowdb` with some traditional query benefits/syntax
JavaScript
5
star
13

authorStats

Fetch the daily/weekly/monthly download stats for all your NPM packages/modules and print to a pretty unicode table.
JavaScript
5
star
14

react-shoppingcart

A React Context provider for quickly and easily building a shopping cart using Next.js or any other React framework.
TypeScript
3
star
15

moostaka

A light weight and easy to use Single Page Application (SPA) framework based on views in Mustache format
JavaScript
3
star
16

bootstrapDatepickr

A bootstrap styled datepicker
JavaScript
2
star
17

win-ls

Use the 'ls' command on Windows.
JavaScript
2
star
18

squido-theme-folio

This is a theme repository for squido static website generator: https://github.com/mrvautin/squido
Handlebars
2
star
19

docka

A CLI helper for all things Docker
JavaScript
2
star
20

squido-blog-example

This is the demo repository for squido static website generator: https://github.com/mrvautin/squido
Handlebars
2
star
21

zonie

A timezone library allowing you to get the current date/time in any timezone of the world.
JavaScript
2
star
22

octo-db

A flatfile JSON db for prototyping
JavaScript
2
star
23

ghostStrap

A minimalist and responsive Bootstrap theme for the Ghost blogging platform
HTML
2
star
24

parsa

Parsa ya data! An all purpose module to parse, sanitize, extract and validate data.
JavaScript
2
star
25

vscode-selecta

Used for selecting lines with regex. Line starts with, ends with or contains
JavaScript
1
star
26

vscode-theme-everly

A beautiful and clean theme for VSCode
1
star
27

squido-theme-sympl

This is a theme repository for squido static website generator: https://github.com/mrvautin/squido
Handlebars
1
star
28

bootstrapTagger

Quickly add Bootstrap styled tags to any form input
1
star
29

matstrap

CSS
1
star
30

squido-theme-faq

This is a theme repository for squido static website generator: https://github.com/mrvautin/squido
Handlebars
1
star
31

envz

A dead simple module for storing and managing your environment variables in a simple and easy to read yaml file.
JavaScript
1
star
32

squido-docs

Handlebars
1
star
33

sidey

Quickly and easily add an offcanvas sidebar to any page
HTML
1
star
34

squido-theme-cart

Handlebars
1
star
35

smart-matter

Parses front matter Yaml from a file path or a string and returns an Object. Used by https://squido.markmoffat.com.
TypeScript
1
star