1
1
Fork
You've already forked markdown-preview
0
Standalone repository for the Kitten Markdown Viewer example so it can be run with kitten run https://codeberg.org/aral/markdown-viewer.git
JavaScript 100%
2024年03月15日 11:39:11 +00:00
index.page.js Tweak command-line argument order to compensate for run command 2024年03月15日 11:37:34 +00:00
README.md Fix git repository URL 2024年03月15日 11:39:11 +00:00

Markdown Preview (kitten run version)

This is an example of a local web application that is designed to only run on someone’s own machine, not on a server.

In this case, it shows a live preview of a Markdown file.

You can either enter the path to a Markdown file on your system in the File: input box in the interface or you can specify the file to open from the command-line when invoking Kitten.

When doing the latter, you must pass the full path to the Markdown Preview application to Kitten as shown below (the actual location of the app will be different on your machine):

This version of the example is meant to be run using the kitten run command. This installs or updates the command to the latest version from its git repository before running it.

kitten run https://codeberg.org/aral/markdown-preview.git README.md --port=0 --open

That will make a live preview of the README.md file in the directory you issued the command from available at https://localhost.

Running as a command-line script

If you want a single, simple-to-use command, you can create a bash script (e.g., one called md in ~/.local/bin) that runs the Kitten command and also launches your default browser. Here’s the one I’m using on my Linux machine:

#!/usr/bin/env bash

kitten run https://codeberg.org/aral/markdown-preview.git 1ドル --port=0 --open