Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 2.08 KB

readme.md

File metadata and controls

60 lines (41 loc) · 2.08 KB

markdown-css-smartisan

一个基于锤子便签的markdown主题。

体验编辑器

Markdown 主题

可以体验编辑器 , 或预览我们的主题,和锤子便签对比一下。

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.