tkhm / ditanote-template

Simple Private Knowledge Base with DITA Markdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ditanote

Simple Private Knowledge Base with DITA Markdown

Prerequisite

Setup

Before you start, you need to finish the following tasks:

  1. Create .backstage/note.properties and add the followings. Also you need to replace <<PATH_TO_THIS_PROJECT>> with your environment.

    # Task
    args.gen.task.lbl = YES
    
    # Location of the copied .css file relative to the output:
    args.csspath = css
    
    # Copy css
    args.copycss = YES
    
    args.css = style.css
    args.cssroot = <<PATH_TO_THIS_PROJECT>>/ditanote/.backstage/
    
  2. Create dir and put the markdown contents

    This template includes sample dir tech, but if you need to add another dir, you need to follow steps:

    1. Create a dir (e.g. food)

    2. Put a index.md into the dir with the following content.

      # Food {.topic}
      Food related topic
      
    3. Add the relative path to the above index.md into the note.ditamap under the project root dir

    4. Add the relative path to the above created dir into the ditadirs.txt under the .backstage dir

Commands

You can find the command in Makefile The flow is Create Map File (which files will be converted and displayed) -> Build Output using Map File.

You can put these output into your web server(e.g. nginx) for your private knowledge base.

html output

  • Build html: make html

    The output will be put into out dir

The output is should be like the following:

html output image

book output

Before you start, you need to run sudo npm i -g gitbook-cli

  • Build gitbook: make book

    The output will be put into out/_book dir

  • Build gitbook and serve: make book-serve

The output is should be like the following:

book output image

Notes

  • These links might be your help.

  • Gitbook CLI is under the maintainance mode and active development is stopped. This project is using it for gitbook based output creation. We need to pay attention to the Gitbook CLI's project status and npm repo's condition.

About

Simple Private Knowledge Base with DITA Markdown


Languages

Language:CSS 79.6%Language:Shell 17.5%Language:Makefile 3.0%