0023. Writing on GitHub
1. 📝 概述
- 介绍了 GitHub 对 Markdown 的扩展功能,包括使用 Emoji 和 Alerts 来增强文档的表达效果。
2. 🔗 Writing on GitHub
- https://docs.github.com/en/get-started/writing-on-github
- Writing on GitHub
- You can structure the information shared on GitHub with various formatting options.
- GitHub 官方文档详细介绍了如何使用 Markdown 以及其他一些特性来编写内容。
- https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
- Create sophisticated formatting for your prose and code on GitHub with simple syntax.
- GitHub 对 Markdown 进行了扩展,有些写法是 GitHub 上特定支持的,在本地编写 markdown 时也许看不到效果。
- 如果在 github 上查看其他人写的文档时,发现一些特殊的效果不知道如何使用 markdown 来编写,那么可以到
Writing on GitHub
这篇官方提供的文档中找找看相应的语法介绍。比如下面这些emoji
、Alerts
。 - 这篇笔记所记录的内容,其实就是 Github 对 markdown 的特殊语法支持,比如
emoji
、Alerts
。 - 具体还有哪些其他特性,直接上官方文档
Writing on GitHub
查阅即可。
3. 📒 github 对传统的 markdown 做了一些扩展
- 以本节的俩 demo 为例,如果在本地展示的话,效果如下:
- 这使用的是 VSCode 中的
markdown preview enhanced
插件来预览 markdown 的效果截图。
- 如果上传到 github 上,展示效果如下:
3.1. 💻 demo - Using emojis
md
@octocat :+1: This PR looks great - it's ready to merge! :shipit:
1
实际渲染效果:
@octocat 👍 This PR looks great - it's ready to merge! :shipit:
3.2. 💻 demo - Alerts
md
> [!NOTE] Useful information that users should know, even when skimming content.
> [!TIP] Helpful advice for doing things better or more easily.
> [!IMPORTANT] Key information users need to know to achieve their goal.
> [!WARNING] Urgent info that needs immediate user attention to avoid problems.
> [!CAUTION] Advises about risks or negative outcomes of certain actions.
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
实际渲染效果:
Useful information that users should know, even when skimming content.
Helpful advice for doing things better or more easily.
Key information users need to know to achieve their goal.
Urgent info that needs immediate user attention to avoid problems.
Advises about risks or negative outcomes of certain actions.