https://github.com/csabapalfi/github-markdown-html
💅 .md -> .html with styles
https://github.com/csabapalfi/github-markdown-html
css html markdown npm-package webpack
Last synced: 2 days ago
JSON representation
💅 .md -> .html with styles
- Host: GitHub
- URL: https://github.com/csabapalfi/github-markdown-html
- Owner: csabapalfi
- Created: 2016-10-02T22:18:36.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-10T22:13:01.000Z (over 5 years ago)
- Last Synced: 2025-03-09T09:39:52.003Z (10 months ago)
- Topics: css, html, markdown, npm-package, webpack
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/github-markdown-html
- Size: 109 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# github-markdown-html
[](https://travis-ci.org/csabapalfi/github-markdown-html)
[](https://greenkeeper.io/)
Markdown to HTML with webpack
Uses webpack to perform the following:
* turns your markdown into HTML markup (markdown-loader)
* highlights fenced code blocks (highlight-loader)
* drops the rendered markup in a basic HTML template (html-webpack-plugin)
* embeds styles to make your page just like Github by default (github-markdown-css)
* 🔜 or use your custom styles (TODO)
* cleans embedded styles of any unused CSS rules (html-webpack-uncss-plugin)
## installation
```sh
npm install github-markdown-html
```
## simple use-case
Once installed (globally) you can go into any of your repos with a `README.md` then execute `github-markdown-html build`.
This will drop an `index.html` in the same directory that you can simply publish with the [gh-pages](https://www.npmjs.com/package/gh-pages) module:
```sh
gh-pages -d . -s index.html
```
(You can also gitignore `/index.html` to keep your master branch clean.)
## usage
```sh
github-markdown-html [script]
```
* `script` is one of `build` or `dev` (optional, defaults to `dev`)
### available scripts
* `build` drops the built HTML in the current directory
```sh
github-markdown-html build # open index.html
```
* `dev` starts the webpack-dev-server
```sh
github-markdown-html start # open http://localhost:8080
```
### 🔜 custom config (TODO)