Skip to content

Corgi-Coding/markdown-theme

Repository files navigation

corgicoding-theme-css

Render css based on the markdown format modified by typo.css.


version 1.0.4: fix li pre style
version 1.0.4: fix li pre style
version 1.0.5: add feat global style version 1.0.6: remove global style | fix some error

*version 2.0.0: vite build

How to use

There are two ways to use it

NPM

  1. Install package
    npm install @corgicoding/theme
  1. Import css file to the page.
import '@corgicoding/theme';
  1. Add the cc__markdown-theme class to the dom element to be rendered.
<div class="cc__markdown-theme">
  <h1>hello</h1>
  <div></div>
</div>

HTML

  1. DownLoad this Repository.
  2. Unzip
  3. Add the cc__markdown-theme class to the dom element to be rendered.
  4. Add the following code to the page.
<!--   Prevent compatibility issues caused by different browsers   -->
<link rel="stylesheet" href="./dist/normalize.css" />
<!--   corgicoding.theme   -->
<link rel="stylesheet" href="./dist/corgicoding.theme.min.css" />
<!--   github style code render   -->
<link rel="stylesheet" href="./dist/github.css" />

<div class="cc__markdown-theme">
  <h1>hello</h1>
  <div></div>
</div>

Option Classes

  • header title no counter
<div class="cc__markdown-theme disabled-counter">
  <h1>hello</h1>
  <div></div>
</div>
  • dark mode
<html class="dark">
  <div class="cc__markdown-theme disabled-counter">
    <h1>hello</h1>
    <div></div>
  </div>
  <html></html>
</html>

markdown-it support

import '@corgicoding/theme';

<div class="cc__markdown-theme">
  <MarkdownRender v-model="textValue" style="padding: 20px"></MarkdownRender>
</div>

About

markdown or html document theme style

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published