The Markdown editor in the Nuggets community was praised by many, and many users turned to the Nuggets community for this reason; However, some of the problems with the editor have long been teased by diggs, such as the lack of support for code highlighting and a single theme.
In order to solve this problem, rong Jian, our front-end leader, came up with a more playable way for digging friends — Markdown theme customization, which can meet everyone’s personalized creation needs. The specific effects are as follows:
Theme preview: github.com/xitu/juejin…
Method of use
Add meta information in front Matter format 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 Theme
The theme | The author |
---|---|
smartblue | The Denver nuggets GitHub |
cyanosis | The Denver nuggets GitHub |
channing-cyan | The Denver nuggets GitHub |
Code highlighting
Using highlight to specify the theme, you can use all the styles in highlight.js:
- The style list
- Style preview
How can I contribute to the Markdown theme
- Create a public repository using the Github default template (click the green Use This Template button)
- Will be one of the
juejin.scss
Replace with your own style, currently supports Sass, Less and CSS - Fork this repository and clone it locally, in
themes.js
File specifies the path to the style file,ref
To commit hash - in
README.md
Add your topic and author information to the Community Topics section of the - Submit a pull request
At present, enthusiastic digger friends have contributed several themes, successful contributors and successful PR partners can add your theme in the topic list!! Come and experience it!
References:
Dig friends small handsome contribution tutorial: hand touch hand teach you to develop nuggets article topic
Preview of his theme: