当前位置:网站首页>Markdown tricks
Markdown tricks
2020-11-06 21:19:00 【itread01】
` Label , It's easy to use them in Markdown Implement code block folding in . ````html
post-signature.js
```javascript // Build essay signatures import { pageName } from '@tools' import { getBlogname, getCurrentPostUrl } from '@cnblog' import { postSignatureConfig } from '@config/plugins' const containerId = 'post-signature' /** * Building containers */ const buildContainer = () => { const author = getBlogname() const href = getCurrentPostUrl() const el = `
The author of this article :${author}
This article links :${href}
` $('#cnblogs_post_body').append(el) } /** * Build copyright information * @param {Boolean} enableLicense * @param {String} licenseName * @param {String} licenseLink */ const buildLicense = ( enableLicense, licenseName, licenseLink, ) => { if (!enableLicense) return const agreement = licenseName.length ? licenseName : ' Knowledge sharing signature - Non commercial use - No deduction 2.5 Mainland China ' const el = `
Copyright notice : This work adopts ${agreement} License agreement to license .
` $(`#${containerId}`).append(el) } /** * Build custom content * @param {Array} content */ function buildContent(content) { let el = '' for (let i = 0; i < content.length; i++) { el += '
' + content[i] + '
' } $(`#${containerId}`).append(el) } export default devOptions => { const { enable, enableLicense, content, licenseName, licenseLink, } = postSignatureConfig(devOptions) if (!enable) return if (pageName() !== 'post') return buildContainer() buildLicense(enableLicense, licenseName, licenseLink) buildContent(content) } ```
````
post-signature.js
```javascript // Build essay signatures import { pageName } from '@tools' import { getBlogname, getCurrentPostUrl } from '@cnblog' import { postSignatureConfig } from '@config/plugins' const containerId = 'post-signature' /** * Building containers */ const buildContainer = () => { const author = getBlogname() const href = getCurrentPostUrl() const el = `
The author of this article :${author}
This article links :${href}
` $('#cnblogs_post_body').append(el) } /** * Build copyright information * @param {Boolean} enableLicense * @param {String} licenseName * @param {String} licenseLink */ const buildLicense = (enableLicense, licenseName, licenseLink) => { if (!enableLicense) return const agreement = licenseName.length ? licenseName : ' Knowledge sharing signature - Non commercial use - No deduction 2.5 Mainland China ' const el = `
Copyright notice : This work adopts ${agreement} License agreement to license .
` $(`#${containerId}`).append(el) } /** * Build custom content * @param {Array} content */ function buildContent(content) { let el = '' for (let i = 0; i < content.length; i++) { el += '
' + content[i] + '
' } $(`#${containerId}`).append(el) } export default devOptions => { const { enable, enableLicense, content, licenseName, licenseLink } = postSignatureConfig(devOptions) if (!enable) return if (pageName() !== 'post') return buildContainer() buildLicense(enableLicense, licenseName, licenseLink) buildContent(content) } ```
You can even fold anything , Just put `` Replace the contents between tags with other contents to be folded . > Please note , stay `` Leave a blank line above and below the content between tags . ### Reference blocks stay Markdown In general, through `>` To announce a Markdown Reference blocks : > This is a reference block . But their styles are fixed , We often need reference blocks with hints , Like the following : ![image.png](https://cdn.nlark.com/yuque/0/2020/png/745037/1604657982597-f2a41d59-fbaa-4619-afac-f4b02de675fc.png#align=left&display=inline&height=548&margin=%5Bobject%20Object%5D&name=image.png&originHeight=548&originWidth=834&size=28692&status=done&style=none&width=834) stay Markdown In aid of HTML and CSS It can also be done . ```html
《 Red and black 》 yes 19 A monument to French and European literature in the 20th century . The novel focuses on the protagonist Yulian's personal struggle and two love experiences , It reveals the turbulent class struggle in the period of restoration Dynasty , Reflecting the political darkness 、 Church corruption , The broad picture of life in which the noble reactionary and the bourgeoisie's lust for profit are imbued . Yu Lian's two love motives are based on love possession, and finally achieve their own political goals .
```
《 Red and black 》 yes 19 A monument to French and European literature in the 20th century . The novel focuses on the protagonist Yulian's personal struggle and two love experiences , It reveals the turbulent class struggle in the period of restoration Dynasty , Reflecting the political darkness 、 Church corruption , The broad picture of life in which the noble reactionary and the bourgeoisie's lust for profit are imbued . Yu Lian's two love motives are based on love possession, and finally achieve their own political goals .
## Tools I chose the language sparrow as the main tool . ### Insert a picture It's very easy to insert pictures with a finch ,Crtl+ c Copy the picture ,Crtl + v Post the picture directly to the content , It will automatically help you upload to the language bird's server . Or you can use the illustration button on the toolbar , Select local image to insert . I usually use windows Self contained screenshot tool ( Shortcut key :win+ shift+s) Take a screenshot and post , Because the screenshot tool will automatically copy the image to the cutting board . stay mac There are similar solutions . ![Video_2020-11-06_163206.gif](https://cdn.nlark.com/yuque/0/2020/gif/745037/1604651748114-d2f66e6d-f3c1-47e2-bf20-505d967564ff.gif#align=left&display=inline&height=282&margin=%5Bobject%20Object%5D&name=Video_2020-11-06_163206.gif&originHeight=282&originWidth=640&size=1753415&status=done&style=none&width=640) ### Insert table stay markdown It's very cumbersome to insert tables into , But it's very easy in a finch : Click the insert button , Slide the mouse to select the number of rows and columns the table needs to have , It can automatically help you generate . ![Video_2020-11-06_163953.gif](https://cdn.nlark.com/yuque/0/2020/gif/745037/1604652194203-4bfaafde-0739-45f4-89ea-2f4e01e59fc3.gif#align=left&display=inline&height=480&margin=%5Bobject%20Object%5D&name=Video_2020-11-06_163953.gif&originHeight=480&originWidth=509&size=2001308&status=done&style=none&width=509) You can also add or delete columns and rows, and set the alignment of the table content at any time during the editing process . ### Insert formula Mathematical formulas are just needed for some people , Language sparrow supports insertion LaTeX The formula . The important thing is , The platform you want to release may not support rendering markdown The mathematical formula . Voice sparrow support is exporting markdown Check export when you want LaTeX The formula is picture . ![image.png](https://cdn.nlark.com/yuque/0/2020/png/745037/1604652657472-6825c238-c2c1-4220-a278-fe617ecdc81d.png#align=left&display=inline&height=364&margin=%5Bobject%20Object%5D&name=image.png&originHeight=364&originWidth=639&size=19428&status=done&style=none&width=639) ### Making mind maps Usually , Insert a mind map into markdown The following steps may be required : 1. Open mind mapping tool xmind wps etc. 2. Start making mind maps 3. Use screenshots or export images as pictures 4. Upload the picture to the picture bed to get the picture link 5. Use markdown Syntax insert picture To use a language bird, you just need to : 1. Directly in markdown Make mind map in 1. Automatically convert to picture when exporting > It's just as easy to insert a flowchart . ### Export The language bird can export the content as Markdown Source code , Seamless connection to other communities , I just release the content to the blog Garden , No problems have been found at present . You can go through my [ Invitation link ](https://www.yuque.com/login?platform=wechat&inviteToken=d97efa6c62973d671ad88d38b9b4d9c9b62201921c22c6bfc60ec5889295e00d) Add words or direct [ Join in ](https://www.yuque.com/). Thank you for reading !
post-signature.js
```javascript // Build essay signatures import { pageName } from '@tools' import { getBlogname, getCurrentPostUrl } from '@cnblog' import { postSignatureConfig } from '@config/plugins' const containerId = 'post-signature' /** * Building containers */ const buildContainer = () => { const author = getBlogname() const href = getCurrentPostUrl() const el = `The author of this article :${author}
This article links :${href}
Copyright notice : This work adopts ${agreement} License agreement to license .
` $(`#${containerId}`).append(el) } /** * Build custom content * @param {Array} content */ function buildContent(content) { let el = '' for (let i = 0; i < content.length; i++) { el += '' + content[i] + '
' } $(`#${containerId}`).append(el) } export default devOptions => { const { enable, enableLicense, content, licenseName, licenseLink, } = postSignatureConfig(devOptions) if (!enable) return if (pageName() !== 'post') return buildContainer() buildLicense(enableLicense, licenseName, licenseLink) buildContent(content) } ```post-signature.js
```javascript // Build essay signatures import { pageName } from '@tools' import { getBlogname, getCurrentPostUrl } from '@cnblog' import { postSignatureConfig } from '@config/plugins' const containerId = 'post-signature' /** * Building containers */ const buildContainer = () => { const author = getBlogname() const href = getCurrentPostUrl() const el = `The author of this article :${author}
This article links :${href}
Copyright notice : This work adopts ${agreement} License agreement to license .
` $(`#${containerId}`).append(el) } /** * Build custom content * @param {Array} content */ function buildContent(content) { let el = '' for (let i = 0; i < content.length; i++) { el += '' + content[i] + '
' } $(`#${containerId}`).append(el) } export default devOptions => { const { enable, enableLicense, content, licenseName, licenseLink } = postSignatureConfig(devOptions) if (!enable) return if (pageName() !== 'post') return buildContainer() buildLicense(enableLicense, licenseName, licenseLink) buildContent(content) } ```` Leave a blank line above and below the content between tags . ### Reference blocks stay Markdown In general, through `>` To announce a Markdown Reference blocks : > This is a reference block . But their styles are fixed , We often need reference blocks with hints , Like the following : ![image.png](https://cdn.nlark.com/yuque/0/2020/png/745037/1604657982597-f2a41d59-fbaa-4619-afac-f4b02de675fc.png#align=left&display=inline&height=548&margin=%5Bobject%20Object%5D&name=image.png&originHeight=548&originWidth=834&size=28692&status=done&style=none&width=834) stay Markdown In aid of HTML and CSS It can also be done . ```html
《 Red and black 》 yes 19 A monument to French and European literature in the 20th century . The novel focuses on the protagonist Yulian's personal struggle and two love experiences , It reveals the turbulent class struggle in the period of restoration Dynasty , Reflecting the political darkness 、 Church corruption , The broad picture of life in which the noble reactionary and the bourgeoisie's lust for profit are imbued . Yu Lian's two love motives are based on love possession, and finally achieve their own political goals .
```
《 Red and black 》 yes 19 A monument to French and European literature in the 20th century . The novel focuses on the protagonist Yulian's personal struggle and two love experiences , It reveals the turbulent class struggle in the period of restoration Dynasty , Reflecting the political darkness 、 Church corruption , The broad picture of life in which the noble reactionary and the bourgeoisie's lust for profit are imbued . Yu Lian's two love motives are based on love possession, and finally achieve their own political goals .
## Tools I chose the language sparrow as the main tool . ### Insert a picture It's very easy to insert pictures with a finch ,Crtl+ c Copy the picture ,Crtl + v Post the picture directly to the content , It will automatically help you upload to the language bird's server . Or you can use the illustration button on the toolbar , Select local image to insert . I usually use windows Self contained screenshot tool ( Shortcut key :win+ shift+s) Take a screenshot and post , Because the screenshot tool will automatically copy the image to the cutting board . stay mac There are similar solutions . ![Video_2020-11-06_163206.gif](https://cdn.nlark.com/yuque/0/2020/gif/745037/1604651748114-d2f66e6d-f3c1-47e2-bf20-505d967564ff.gif#align=left&display=inline&height=282&margin=%5Bobject%20Object%5D&name=Video_2020-11-06_163206.gif&originHeight=282&originWidth=640&size=1753415&status=done&style=none&width=640) ### Insert table stay markdown It's very cumbersome to insert tables into , But it's very easy in a finch : Click the insert button , Slide the mouse to select the number of rows and columns the table needs to have , It can automatically help you generate . ![Video_2020-11-06_163953.gif](https://cdn.nlark.com/yuque/0/2020/gif/745037/1604652194203-4bfaafde-0739-45f4-89ea-2f4e01e59fc3.gif#align=left&display=inline&height=480&margin=%5Bobject%20Object%5D&name=Video_2020-11-06_163953.gif&originHeight=480&originWidth=509&size=2001308&status=done&style=none&width=509) You can also add or delete columns and rows, and set the alignment of the table content at any time during the editing process . ### Insert formula Mathematical formulas are just needed for some people , Language sparrow supports insertion LaTeX The formula . The important thing is , The platform you want to release may not support rendering markdown The mathematical formula . Voice sparrow support is exporting markdown Check export when you want LaTeX The formula is picture . ![image.png](https://cdn.nlark.com/yuque/0/2020/png/745037/1604652657472-6825c238-c2c1-4220-a278-fe617ecdc81d.png#align=left&display=inline&height=364&margin=%5Bobject%20Object%5D&name=image.png&originHeight=364&originWidth=639&size=19428&status=done&style=none&width=639) ### Making mind maps Usually , Insert a mind map into markdown The following steps may be required : 1. Open mind mapping tool xmind wps etc. 2. Start making mind maps 3. Use screenshots or export images as pictures 4. Upload the picture to the picture bed to get the picture link 5. Use markdown Syntax insert picture To use a language bird, you just need to : 1. Directly in markdown Make mind map in 1. Automatically convert to picture when exporting > It's just as easy to insert a flowchart . ### Export The language bird can export the content as Markdown Source code , Seamless connection to other communities , I just release the content to the blog Garden , No problems have been found at present . You can go through my [ Invitation link ](https://www.yuque.com/login?platform=wechat&inviteToken=d97efa6c62973d671ad88d38b9b4d9c9b62201921c22c6bfc60ec5889295e00d) Add words or direct [ Join in ](https://www.yuque.com/). Thank you for reading !
版权声明
本文为[itread01]所创,转载请带上原文链接,感谢
边栏推荐
- [self taught unity2d legendary game development] map editor
- Flink's datasource Trilogy 2: built in connector
- What the hell is fastthreadlocal? The existence of ThreadLocal!!
- 代码重构之法——方法重构分析
- Road to simple HTML + JS to achieve the most simple game Tetris
- jenkins安装部署过程简记
- Elasticsearch Part 6: aggregate statistical query
- Multi robot market share solution
- Outsourcing is really difficult. As an outsourcer, I can't help sighing.
- What is alicloud's experience of sweeping goods for 100 yuan?
猜你喜欢
Elasticsearch database | elasticsearch-7.5.0 application construction
ERD-ONLINE 免费在线数据库建模工具
递归、回溯算法常用数学基础公式
Metersphere developer's Manual
Can you do it with only six characters?
ES中删除索引的mapping字段时应该考虑的点
Junit测试出现 empty test suite
Why is quicksort so fast?
Using an example to understand the underlying processing mechanism of JS function
美团内部讲座|周烜:华东师范大学的数据库系统研究
随机推荐
CloudQuery V1.2.0 版本发布
2020-09-04:函数调用约定了解么?
Tron smart wallet PHP development kit [zero TRX collection]
[forward] how to view UserData in Lua
如何对数据库账号权限进行精细化管理?
An article taught you to download cool dog music using Python web crawler
Understanding formatting principles
2020-08-30:裸写算法:二叉树两个节点的最近公共祖先。
DC-1靶機
C# 调用SendMessage刷新任务栏图标(强制结束时图标未消失)
行为型模式之备忘录模式
Filecoin has completed a major upgrade and achieved four major project progress!
统计项目代码行数
Git rebase is in trouble. What to do? Waiting line
如何在终端启动Coda 2中隐藏的首选项?
Some operations kept in mind by the front end foundation GitHub warehouse management
实用工具类函数(持续更新)
ES6 learning notes (5): easy to understand ES6's built-in extension objects
【ElasticSearch搜索引擎】
上海巨微专用蓝牙广播芯片