pingcap / website-docs

The next generation of PingCAP Docs. Powered by Gatsby ⚛️.
https://docs.pingcap.com/
MIT License
22 stars 34 forks source link

Support displaying copyable code blocks with different prefixes #110

Closed ireneontheway closed 3 years ago

ireneontheway commented 3 years ago

在新文档站的实现下,有没有更加高效的方式来实现 https://internal.pingcap.net/jira/browse/ICM-95 所提到的所有需求?原来每加一个 code block 都要在前面加一行 snippet 有点傻。@YiniXu9506

YiniXu9506 commented 3 years ago

@ireneontheway Could you please point out which part make you feel a little bit stupid? The {{ copyable }} or the language remark inside code block?

Since not all code blocks need to be copyable, I cannot guess which code you want it to be copyable, so you have to remark the code block using snippet code.

There is no need to add copyable snippet code if you don't want the code to be copyable. I think this has been applied to most code blocks.

YiniXu9506 commented 3 years ago

@ireneontheway Reopen it if you have any problem.