Skip to content

Yes, another static site generator for markdown but with infinite left menu instead two levels of mkdocs-material, docusaurus 2, justthedocs, etc

Notifications You must be signed in to change notification settings

docs4all/docs4all

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docs4all

Yes, another static site generator for markdown but with infinite left menu instead two levels of mkdocs-material, docusaurus 2, justthedocs, etc

Docs4all is a Knowledgebase platform for Node.js that uses static Markdown files to power the team knowledgebase.

Docs4all also can be called a "static site generator" of sorts as it doesn't require a database. All of your content is stored in the markdown folder in Markdown (.md) files and the entire knowledgebase structure and content is generated by docs4all.

Demo

https://docs4all.github.io

Run your own demo

npm install
npm run dev
  • for production with node
npm install
npm run start

Open http://localhost:8080

Publish as static web

npm install
npm run build
npm run publish
  • This will create a site folder with the static files ready to deploy on any http server. Change the name of this folder using the DOCS4ALL_SITE_FOLDER environment variable.

Home Page

UI Customizations

Html Title

image

To customize, create a settings.yaml file at the workspace root with the following value

site_name: Docs4all

Text logo

To customize, create a settings.yaml file at the workspace root with the following value

logo: Foo Bar Baz

Result will be:

image

Image file

To customize, create a settings.yaml file at the workspace root with the following value

logo: ./nodejs-logo.png
  • It is mandatory to start with ./
  • In this example nodejs-logo.png should be at the root of workspace

Result will be:

image

Image url

To customize, create a settings.yaml file at the workspace root with the following value

logo: https://i.ibb.co/zm3Xs2R/docs4all-logo-image.png

To get a better dimensions, use our template or an image of 210 × 42 px

Variables

To use variables in your markdown files, create a settings.yaml file at the workspace root with the following values

global_csr_variables:
  best_language: Java

Home page

  • To customize the home page, add a root.md
  • To add a content to a folder itself, just add a markdown with index.md name

Sort pages

By default the markdown and folder are alphabetical ordered. To customize it:

For files, add this comment at the beginning of markdown file:

<!--
{
  "order":1,
  "title": "Markdown Sample"
}
-->

For folders, add a file called meta.json inside of it with this content:

{
  "order":2
}

How to secure?

To add a login page, check the following links:

Simple Login

Just export these variables before the start

export LOGIN_TYPE=simple
export USER_jane=changeme
export USER_kurt=secret

More details here: https://github.com/jrichardsz-software-architect-tools/nodeboot-web-security-starter#how-it-works

Microsoft Login

Just export these variables before the start

export LOGIN_TYPE=microsoft
export BASE_URL=www.acmedocs.com
export LOGIN_OAUTH2_CLIENT_ID=*****
export LOGIN_OAUTH2_CLIENT_SECRET=*****
export ALLOWED_USERS="jane_doe@microsoft.com,kurt_weller@hotmail.com"

More details here: https://github.com/jrichardsz-software-architect-tools/mkdocs-mod-template/wiki/Add-microsoft-login

Custom markdown folder

To override the default markdown folder, just export this variable before the start

export DOCS4ALL_MARKDOWN_FOLDER=my-docs

Road map

  • breadcrumb
  • add unit test and coverage
  • use npm for css and js
  • improve seo
  • highlight search results with Highlight.js
  • docker
  • minify and optimize javascript files
  • add google login
  • more documentation
  • add video tutorials
  • publish to npm repository: https://www.npmjs.com/package/repository

Technologies and Inspiration

Contributors


JRichardsz

About

Yes, another static site generator for markdown but with infinite left menu instead two levels of mkdocs-material, docusaurus 2, justthedocs, etc

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published