Skip to content

Latest commit

 

History

History
76 lines (61 loc) · 1.91 KB

README.md

File metadata and controls

76 lines (61 loc) · 1.91 KB

Mote

Markdown Server for notes and other md files

Demo

mote-demo.mp4

Features

  • Syntax highlighting for code blocks
  • Diagrams using mermaid code blocks similar to Github
  • Light and Dark themes along with a switch
  • Live Preview
  • Works for any markdown file anywhere in the disk, cleaner URLs for files in motes_dir

Installation

  • git clone git@github.com:okmanideep/mote
  • cd mote
  • npm i (install all dependencies)
  • npm i -g (install the cli globally)

Starting Mote

mote start

Note: Interactively configures mote the first time

Configuration

{
  "site_port": 3000,
  "websocket_port": 8383,
  "motes_dir": "/Users/okmanideep/Dropbox/notes"
}

Windows: ~/AppData/Local/mote/config.json
Linux: ~/.config/mote/config.json
MacOs: ~/Library/Preferences/mote/config.json

Opening a file

mote open path/to/file.md

💡Protip: If you use vim, you can use the following vim script and have your preferred key-binding to open you notes or any markdown file in the browser

function s:OpenMote()
    let l:command = 'mote open '.expand('%:t')
    call system(l:command)
endfunction

command! OpenMote :call <SID>OpenMote()
" map to your preferred key combo
nnoremap gm <cmd>OpenMote<CR>
Expand for Lua Configuration
local open_mote = function ()
	local filename = vim.fn.expand('%:t')
	vim.fn.system({
		"mote",
		"open",
		filename,
	})
end

vim.keymap.set('n', 'gm', open_mote, { desc = "Open in Mote" })

Stopping Mote

  • mote stop

URL Schema

Files in motes_dir -> http://localhost:${site_port}/filename
Other files -> http://localhost:${site_port}/p/full%2Fpath%2Fto%2Ffile.md