Giter VIP home page Giter VIP logo

md-fileserver's Introduction

md-fileserver

Locally view markdown files in a browser.

NPM version

Starts a local server to render "markdown" files within your browser:

  • Runs on localhost:4000
  • Supports Markdown Syntax with GFM.
  • Markdown rendering based on markdown-it.
    Enabled Plugins for:
    • Emojis
    • Task lists
    • Footnotes
  • Includes markedpp as preprocessor.
  • Supports syntax highlighting using highlight.js
  • For supported markdown Syntax see Cheatsheet.
  • Automatic update in browser after saving edited file. (Tested on Linux, MacOS, Windows)

Table of Contents

Installation

npm install -g md-fileserver

Usage

Start the Local Server

In your terminal type:

mdstart

Note: The local server can only be reached from your local computer on port 4000. Any remote access from other computers to your files is denied.

Open a markdown file

Open http://localhost:4000 in your browser and navigate to the markdown file.

Alternatively type in your terminal:

mdopen <file>

This will open the default browser with the processed markdown file.

Cheatsheet

mdopen test/cheatsheet.md

Cheatsheet

Personalisation

In config.js you can change several settings to fit your needs. These include:

  • Browser: Default browser of MacOS, Linux or Windows is used.
  • Style: Styles are located in ./assets/. Currently only a GFM like style is supported. Others are welcome.
  • Markdown options: Change the options how markdown-it processes your markdown files.
  • Markdown PP options: Change the options how markedpp pre-processes your markdown files.

Install personalized version:

  1. Clone this repo
    git clone https://github.com/commenthol/md-fileserver.git
    cd md-fileserver
    
  2. Make your changes in ./config.js
  3. Install with npm i -g from same folder.
    If there are issues with installing you'll need to uninstall first with npm un -g

Contribution

If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work.

License

Copyright (c) 2016-present commenthol
Software is released under MIT License.

References

md-fileserver's People

Contributors

commenthol avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.