Skip to content

Display a sidebar like HackMD book mode

Notifications You must be signed in to change notification settings

magcho/codimd-book

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodiMD Book mode

Display a sidebar like HackMD book mode

Available on Chrome Web Store.

Disclaimer

  • This extension is NOT developed by HackMD team.
  • I develop this extension for personal use.
    There may be defects I haven't noticed. Please think twice before use.

Requested Permissions

  • webRequest
  • webRequestBlocking

Notice

  • Hostname must contains hackmd or codimd; otherwise, this extension will not enable book mode. In the other words, if you host CodiMD without domain name, this extension is not for you.
  • After markdown is parsed by MarkdownIt, tags in the following will be reserved and others will be removed.
    h1
    h2
    h3
    h4
    h5
    h6
    ul
    ol
    li
    a
    b
    strong
    i
    em
    s
    sub
    sup
    mark
    

Get Started

  1. Install npm dependencies
    npm install
    
  2. Build it
    npm run build
    

How to use?

  1. Install extension
  2. Open your note for book index
    https://codimd.your.domain/note
    
  3. Add book to query string
    https://codimd.your.domain/note?book
    
  4. Enjoy it

Difference between book mode in HackMD

  • Links will be opened in new tab
    • HackMD (Reference)
      • [target=_blank] is added explicitly
      • Starts with http (non-SSL)
    • This extension
      • [target=_blank] is added explicitly
      • Not same-origin

About

Display a sidebar like HackMD book mode

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 80.7%
  • SCSS 19.3%