The Markdown editor in the Mining community has been praised and many users have turned to the mining community for this reason; However, some of the problems with the editor have long been teased by friends, such as the lack of support for code highlighting and the relatively simple theme.

In order to solve this problem, rongjian, our front end boss, has come up with a more playable way for digging friends -Markdown theme customization, which can meet your personalized creative needs. The specific effects are as follows:

Theme preview: github.com/xitu/juejin…

Method of use

Add front Matter meta information to the content of the article:

---
theme: juejin
highlight: juejin
---
Copy the code

Markdown theme

Use theme to specify a theme

Built-in themes

  • juejin
  • github

Community Author Topics

The theme The author
smartblue The Denver nuggets GitHub
cyanosis The Denver nuggets GitHub
channing-cyan The Denver nuggets GitHub

Code highlighting

To specify a theme using highlight, you can use all the styles in highlight.js:

  • The style list
  • Style preview

How can I contribute to Markdown topics

  1. Create a public repository using the Github default template (click the green Use This Template button)
  2. Will be one of thejuejin.scssReplace with your own style, currently supports Sass, Less and CSS
  3. Fork the repository and clone it locally, atthemes.jsFile specifies the path to the style file,refTo commit hash
  4. inREADME.mdAdd your topic and author information to the community Topics section in the
  5. Submit a pull request

So far enthusiastic digs have contributed several themes, successful contributors and successful PR partners will be able to add your theme to the list!! Come and experience it!

References:

Digs friend small handsome contribution tutorial: hand touch hand to teach you to develop nuggets article theme

Preview of his theme: