Date: 2023-10-20
参考链接:
最开始遇到的一个典型的html元素显示的问题截图:
通过上面这两张图可以看到,常规markdown图片的语法可以显示,但是html语言的img元素无法显示。
流程图(mermaid)
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
emoji和tabs的显示
::Tabs :::TabTitle Rendered Markdown Sometimes you want to around a bit and add some to your . Well we have a gift for you: You can use emoji anywhere GitLab Flavored Markdown is supported. You can use it to point out a or warn about patches. If someone improves your really code, send them some . People you for that. If you're new to this, don't be . You can join the emoji . Just look up one of the supported codes. Consult the Emoji Cheat Sheet for a list of all supported emoji codes. :::TabTitle Code
Sometimes you want to 🐒 around a bit and add some 🌟 to your 💬. Well we have a gift for you:
⚡ You can use emoji anywhere GitLab Flavored Markdown is supported. ✌️
You can use it to point out a 🐛 or warn about 🙊 patches. And if someone improves your really 🐌 code, send them some 🎂. People ❤️ you for that.
If you're new to this, don't be 😨. You can join the emoji 👪. Just look up one of the supported codes.
Consult the Emoji Cheat Sheet for a list of all supported emoji codes. 👍
::EndTabs
win系统自带的emoji
😀🐵👩👩🏾👩🏿🎈🍕🚗❤
inline diff
- {+ addition 1 +}
- [+ addition 2 +]
- {- deletion 3 -}
- [- deletion 4 -]
math
This math is inline:
This math is on a separate line using a ````math` block:
This math is on a separate line using inline $$
:
This math is on a separate line using a $$...$$
block:
task lists
- Completed task
- [~] Inapplicable task
- Incomplete task
- Sub-task 1
- [~] Sub-task 2
- Sub-task 3
- Completed task
- [~] Inapplicable task
- Incomplete task
- Sub-task 1
- [~] Sub-task 2
- Sub-task 3
table of contents
只需要一个TOC词即可生成目录
[[TOC]]
Change the image or video dimensions(typora不支持)
试一下typora的修改图片大小
嵌入视频和音频(typora也不支持,得用html元素,gitlab docs上也无法显示,但repository里面阅读markdown可以显示)
Inline HTML(typora的单个html元素中不允许有多余的空行)
- Definition list
- Is something people use sometimes.
- Markdown in HTML
- Does *not* work **very** well. HTML tags do work, in most cases.
- Markdown in HTML
- Does *not* work **very** well. HTML tags work, in most cases.
- Markdown in HTML
-
Does not work very well. HTML tags work, in most cases.
Collapsible section(下面这段是details标签,可以再在外面套上p标签)
Click this to collapse/fold.
These details remain hidden until expanded.PASTE LOGS HERE
-
This line shows a link that also has title text
-
This line links to [a section on a different Markdown page, using a "#" and the header ID](03-git和gitlab答疑.md#2. gitlab远程仓库上误删除了文件咋办)
-
This line links to a different section on the same page, using a "#" and the header ID
Using references:
- This line shows a reference-style link, see below
- You can use numbers for reference-style link definitions, see below
- Or leave it empty and use the link text itself, see below.
Some text to show that the reference links can follow later.
Superscripts / Subscripts, Keyboard
The formula for water is H2O while the equation for the theory of relativity is E = mc2.
Press Enter to go to the next page.
表格(常规,对齐,br换行)
header 1 | header 2 | header 3 |
---|---|---|
cell 1 | cell 2 | cell 3 |
cell 4 | cell 5 is longer | cell 6 is much longer than the others, but that's ok. It eventually wraps the text when the cell is too large for the display size. |
cell 7 | cell 9 |
Left Aligned | Centered | Right Aligned |
---|---|---|
Cell 1 | Cell 2 | Cell 3 |
Cell 4 | Cell 5 | Cell 6 |
Name | Details |
---|---|
Item1 | This text is on one line |
Item2 | This item has: - Multiple items - That we want listed separately |
两种内嵌task(typora均不支持)
header 1 | header 2 |
---|---|
cell 1 | cell 2 |
cell 3 |
|
header 1 | header 2 |
---|---|
cell 1 | cell 2 |
cell 3 | - [ ] Task one - [ ] Task two |
{
"fields" : [
{"key": "a", "label": "AA", "sortable": true},
{"key": "b", "label": "BB"},
{"key": "c", "label": "CC"}
],
"items" : [
{"a": "11", "b": "22", "c": "33"},
{"a": "211", "b": "222", "c": "233"}
]
}
首先调整下账号设置:
- github - settings - appearance,
- github - settings - repositories,设置默认分支为master而不是main
在github上新建一个repository,再到本地仓库中上传内容
git remote add github https://github.com/piwind/git_and_gitlab.git
git push -u github master
实测情况如下:
- 支持inline html,以及img元素,但img中的style没有生效,其他修改图片大小方式也不行
- 支持流程图
- 不支持tabs
- 支持emoji
- 不支持inline diff
- 支持math
- 不支持TOC
- 无法嵌入视频音频
- 支持Collapsible section
- 不支持两种跳转标题的link
- 支持Using references link
- 表格全部适配,但是json表格不支持