Skip to content
hotokuPublic

About

livereloading server for markdown editing

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

129 Commits

Folders and files

Repository files navigation

fosi

livereloading server for markdown editing

usage

usage

Run this command.

$ fosi -i document.md

Then,

  1. A process starts watching your document.md and automatically compiles it to html when updated. The html goes to a temporary file that is removed when fosi exits, so nothing is left next to document.md. Pass -d if you want to keep the output.
  2. The compiled html is served at http://localhost:3000/ and the file will be reloaded when it is updated. If the port is already in use, the next free one is chosen; the actual url is printed when the servers start.
  3. The files in the folders under the one where document.md exists are also watched and served, your browser will reload when these files are updated.

Other command line options are following:

Options:
      --help     Show help                                             [boolean]
      --version  Show version number                                   [boolean]
  -i             input file                    [string] [default: "./README.md"]
  -d             output file. if not given, a temporary file is created and
                 removed on exit.                                       [string]
  -f             overwrite existing output                             [boolean]

install

$ npm i -g @hotoku/fosi

for use from emacs (optional)

This repo includes very simple function that launches a fosi process from Emacs. The source file is here.

You can install the elisp by the following steps.

  1. Download the raw file from github. eg. curl -o /tmp/fosi.el https://raw.githubusercontent.com/hotoku/fosi/main/elisp/fosi.el
  2. Install the file by invoking M-x package-install-file and input the path you downloaded in the previous step.
  3. Put (require 'fosi) in your init.el.

license

This software is published under MIT license.

credit

About

livereloading server for markdown editing

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages