Giter VIP home page Giter VIP logo

gh-markdown-preview's Introduction

gh markdown-preview

GitHub CLI extension to preview Markdown looks like GitHub :octocat:

gh markdown-preview is a GitHub CLI extension to preview your markdown such as README.md. The gh markdown-preview command start a local web server to serve the markdown document. gh markdown-preview renders the HTML got from GitHub official markdown API and uses the CSS extracted from GitHub web site. The styles are almost the same!

You can see rendered README before uploading to GitHub!

Features

  • No-dependencies - You need gh command only.
  • Zero-configuration - You don't have to set the GitHub access token.
  • Looks exactly the same - You can see same as GitHub.
  • Live reloading - You don't need reload the browser.
  • Auto open browser - Your browser will be opened automatically.
  • Auto find port - You don't need find an available port if default is used.

Screenshots

Open your browser:

Screenshot of gh markdown-preview

Live reloading:

Screenshot of gh markdown-preview

Installation

gh extension install yusukebe/gh-markdown-preview

Upgrade:

gh extension upgrade markdown-preview

Usage

The usage:

gh markdown-preview README.md

Or this command will detect README file in the directory automatically.

gh markdown-preview

Then access the local web server such as http://localhost:3333 with Chrome, Firefox, or Safari.

Available options:

    --dark-mode           Force dark mode
    --disable-auto-open   Disable auto opening your browser
    --disable-reload      Disable live reloading
-h, --help                help for gh-markdown-preview
    --host string         Hostname this server will bind (default "localhost")
    --light-mode          Force light mode
-p, --port int            TCP port number of this server (default 3333)
    --verbose             Show verbose output
    --version             Show the version

Related projects

Author

Yusuke Wada http://github.com/yusukebe

License

Distributed under the MIT License.

gh-markdown-preview's People

Contributors

yusukebe avatar byaruhaf avatar joshbainbridge avatar shortarrow avatar parroty 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.