Make your project documentation (or blog, or something else) with Markdown.
- HTML-generating on-the-fly from the Markdown files.
- Generating of navigation on-the-fly.
- Dynamic permissions management:
- Each user has a list of roles (roles are like GitHub's organization's groups).
- Each page and directory should have a list of roles.
- User can see the page (in navigation too) if he has at least one role from page's list.
- Search on all pages depending on access rights of current user.
- Preview of result html page in creating page.
- All settings and access rights are fully configurable (using admin panel or changing the code).
- Too easy to add new setting — admin panel is generated too. You simply need to add new setting and default value, and then you will be able to configure it in admin panel.
- You can simply copy your markdown files to
views/pages/
and (if it necessary) manage access to paths — and then your documentation is ready :) All new pages and directories will be indexed at next page loading. - Nice looking & adaptive design for all screen sizes.
- Other small but useful features:
- Each header has
#link
to it - Most code snippets will have copy button on header above
- You can use all
kramdown
features Main pages folder
from configuration will be always on top in navigation on each page.- Pages will have default access rights from config and will be placed in
Main pages folder
if you wont specify path or roles. - Advanced error handling (page with information about error will be shown for each error, so no crashes must occur)
- Each header has
This readme page after rendering:
And mobile version (iPhone 8 Plus):
- NodeJS (+ npm)
- MongoDB (used for
passport
sessions, user and paths info) - Ruby (for
kramdown
library) babel
node-sass
(not so necessary if you don't want to change the existing styles, and you still can use plain css)
- Clone the repo. I'm not gonna to upload project to npm, etc.
git clone https://github.com/petersamokhin/markdown-site
- Install dependencies
cd markdown-site
npm i
- Rebuild project sources with
babel
(also static files will be copied to/dist
)
npm run rebuild
Run on http://localhost:3006/markdown-knowledge-base
npm start
- babel
- bcrypt-nodejs
- cheerio
- CodeMirror
- connect-mongo
- consolidate
- cookie-parser
- directory-tree
- eslint
- express
- express-session
- jQuery
- Kotlin Website styles
- kramdown
- materialize
- mkdirp
- mongoose
- morgan
- mustache
- passport
- passport-local
- tags-input
MIT
Copyright (c) 2018 PeterSamokhin
https://petersamokhin.com/