markdown-css-smartisan
一个基于锤子便签的markdown主题。
Demo
Install
Download manually, from CDNJS, or with npm or yarn:
# use npm
$ npm install markdown-css-smartisan
# use yarn
$ yarn add markdown-css-smartisan
Usage
import 'markdown-css-smartisan'
Import the github-markdown.css
file and add a markdown-body
class to the container of your rendered Markdown and set a width for it.
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/markdown-css-smartisan/github-markdown.css" />
<style>
.markdown-body {
width: 80%;
margin: 0 auto;
}
</style>
<article class="markdown-body">
<h1>Unicorns</h1>
<p>All the things</p>
</article>
If you want code syntax highlighted, use GitHub Flavored Markdown rendered from GitHub's /markdown
API.
How
See generate-github-markdown-css
for how it's generated and ability to generate your own.