progrium / viewdocs

Read the Docs meets Gist.io for simple Markdown project documentation

Home Page:http://viewdocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

viewdocs.io compatible Bootstrap3, Angularjs template

marfarma opened this issue · comments

It's still a 'work in progress' but I'm happy enough with it that I thought I'd announce.

I've built a viewdocs.io compatible Bootstrap3, Angularjs template. Due to github's anti-hot linking policy, I had to inline css, javascript and templates, so the code's ugly as sin. It would be really nice if viewdocs.io would server other file types, css, js, json are the three that come to mind.

Navbar menu items are controlled by the contents of a markdown file that contains an array of names and href values in json format. The file has a .md extension because, due to 'same origin' security issues, the async call over to github.com failed. Since viewdocs.io won't server json files, I named it nav.md, and parse the returned html file to extract the json.

A sidebar menu linking to page sections - with an menu item for each h1 tag in the primary content -- is generated. Example: http://marfarma.viewdocs.io/angular-pouch-model/api

The template was coded to support other projects, but there's probably some bits I overlooked. If you try it out, let me know what you have to change to make it work for your project.

The tempate: https://github.com/MarFarMa/angular-pouch-model/blob/master/docs/template.html
The nav.md: https://github.com/MarFarMa/angular-pouch-model/blob/master/docs/nav.md

Written with StackEdit.

Seems legit. I think the viewdocs template will stay as is - pretty barebones and simple - but I'd definitely encourage users to look at your template to see how things could work.

For reference, here is the current dokku homepage - home.html template - and the main docs here - template.html template.