Vivify brings your (Markdown) files to life in the browser!
- various Markdown features
- links to other files: relative links like in GitHub as well as absolute file links
- view non-markdown files with code syntax highlighting
- view & navigate directories, hidden "back to parent directory" button at the top-left of the file viewer
- easy to integrate with any editor for live synchronization (see editor support)
- Vivify server starts lazily and automatically shuts down when no more viewers are connected
- various config options
If you need any additional features, feel free to open an issue or contribute!
- heading/anchor links
- Katex math
- GitHub-style task-lists
- GitHub-style emojis like
:smile:
- syntax highlighting for code
- graphviz/dot graphs
- Pandoc-style definition/description lists
Vivify has a simple API to integrate your favorite editor so the viewer live updates to any changes as you are typing and the scrolling is smoothly synchronized!
See below for a list of existing editor plugins. In case your favorite editor is not yet supported, use these as an example to write your own and add it to the list!
- for Vim and Neovim: vivify.vim
Vivify will look for an optional config file at ~/.vivify/config.json
and
~/.vivify.json
. This file should contain a JSON object that can have the
following optional keys:
"styles"
a path to a custom style sheet, see the default styles for examples"port"
the port Vivify's server should run on; this will be overwritten by the environment variableVIV_PORT
(default is 31622)"timeout"
how long the server should wait in ms before shutting down after the last client disconnected; this will be overwritten by the environment variableVIV_TIMEOUT
(default is 10000)"openCmd"
the commandviv
uses to open your browser at a given URL; this will be overwritten by the environment variableVIV_OPEN
(default will tryopen
and fall back toxdg-open
)"katexOptions"
available KaTeX options, such as{ "errorColor": "#cc0000", "macros": { "\\RR": "\\mathbb{R}" } }
"pageTitle"
JavaScript code that will be evaluated to determine the viewer's page title. Here, the variablecomponents
is set to a string array of path components for the current file, e.g.['/', 'Users', 'you', 'file.txt']
. If this evaluation fails, the title will be custom title error and you will see the error message on the page. The default title are the last two components joined with the path separator, e.g.you/file.txt
"mdExtensions"
An array of file extensions that Vivify will parse as Markdown. All other files will be displayed as monospaced text with code highlighting if available. Default Markdown extensions are['markdown', 'md', 'mdown', 'mdwn', 'mkd', 'mkdn']
Once you have Vivify installed, use it by running viv
with any text file or
directory as an argument!
- AUR, e.g. install with
yay -S vivify
- make sure you have
jq
installed - download & unpack the latest release for your system (macOS or Linux)
- add the two executables to your
$PATH
Is something not working or do you have any questions? Open an issue!
I have been using iamcco/markdown-preview.nvim for the longest time and started this project because
- I wanted a Markdown viewer that works with and without Vim and
- I wanted a Markdown viewer that supports file links like in GitHub.
Looking at
iamcco/markdown-preview.nvim
helped in development, particularly with regard to which npm
packages to use.