From ae81e3767e125cb84f7fb216ade3cd2d406727c5 Mon Sep 17 00:00:00 2001 From: Dillon Date: Thu, 27 Feb 2020 20:14:40 +0800 Subject: fix(srcatch): fix srcatch bugs --- .../content/posts/Basic-Markdown-Preview.zh.md | 10 +- exampleSite/content/posts/rich-content.en.md | 8 +- exampleSite/content/posts/test-mermaid.zh.md | 105 +++++++++++++++++++++ exampleSite/content/posts/test.zh.md | 82 ++++++++-------- 4 files changed, 156 insertions(+), 49 deletions(-) create mode 100644 exampleSite/content/posts/test-mermaid.zh.md (limited to 'exampleSite') diff --git a/exampleSite/content/posts/Basic-Markdown-Preview.zh.md b/exampleSite/content/posts/Basic-Markdown-Preview.zh.md index 58e62c4..49f8db3 100644 --- a/exampleSite/content/posts/Basic-Markdown-Preview.zh.md +++ b/exampleSite/content/posts/Basic-Markdown-Preview.zh.md @@ -289,11 +289,11 @@ func main() { ### 4.5 表格 ```markdown -| _颜色_ | 水果 | 蔬菜 | -| ---------- |:---------------:| -----------:| -| 红色 | *苹果* | 辣椒 | -| ~~橙色~~ | 橘子 | **胡萝卜** | -| 绿色 | ~~***梨子***~~ | 菠菜 | +| _颜色_ | 水果 | 蔬菜 | +| ----------- |:-------------:| ---------- -:| +| 红色 | *苹果* | 辣椒 | +| ~~橙色~~ | 橘子 | **胡萝卜** | +| 绿色 | ~~***梨子***~~ | 菠菜 | ``` | _颜色_ | 水果 | 蔬菜 | diff --git a/exampleSite/content/posts/rich-content.en.md b/exampleSite/content/posts/rich-content.en.md index c3d4555..d7c02a8 100644 --- a/exampleSite/content/posts/rich-content.en.md +++ b/exampleSite/content/posts/rich-content.en.md @@ -27,9 +27,9 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme --- -## Instagram Simple Shortcode +## Instagram Shortcode -{{< instagram_simple BGvuInzyFAe hidecaption >}} +{{< instagram BGvuInzyFAe hidecaption >}}
@@ -43,9 +43,9 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme --- -## Twitter Simple Shortcode +## Twitter Shortcode -{{< twitter_simple 1085870671291310081 >}} +{{< twitter 1085870671291310081 >}}
diff --git a/exampleSite/content/posts/test-mermaid.zh.md b/exampleSite/content/posts/test-mermaid.zh.md new file mode 100644 index 0000000..d4e4cd6 --- /dev/null +++ b/exampleSite/content/posts/test-mermaid.zh.md @@ -0,0 +1,105 @@ +--- +title: "Test Mermaid" +date: 2020-02-27T15:41:42+08:00 +lastmod: 2020-02-27T15:41:42+08:00 +draft: true +author: "" +authorLink: "" +description: "" +license: "" + +tags: [] +categories: [] +hiddenFromHomePage: false + +featuredImage: "" +featuredImagePreview: "" + +toc: false +autoCollapseToc: true +lightgallery: true +math: false +comment: true +--- + + + +## Flow + +{{< mermaid >}} +graph TD +A[Hard] -->|Text| B(Round) +B --> C{Decision} +C -->|One| D[Result 1] +C -->|Two| E[Result 2] +{{< /mermaid >}} + +## Sequence + +{{< mermaid >}} +sequenceDiagram +Alice->>John: Hello John, how are you? +loop Healthcheck + John->>John: Fight against hypochondria +end +Note right of John: Rational thoughts! +John-->>Alice: Great! +John->>Bob: How about you? +Bob-->>John: Jolly good! +{{< /mermaid >}} + +## Gantt + +{{< mermaid >}} +gantt + title A Gantt Diagram + dateFormat YYYY-MM-DD + section Section + A task :a1, 2014-01-01, 30d + Another task :after a1 , 20d + section Another + Task in sec :2014-01-12 , 12d + another task : 24d +{{< /mermaid >}} + +## Class + +{{< mermaid >}} +classDiagram +Class01 <|-- AveryLongClass : Cool +<> Class01 +Class09 --> C2 : Where am i? +Class09 --* C3 +Class09 --|> Class07 +Class07 : equals() +Class07 : Object[] elementData +Class01 : size() +Class01 : int chimp +Class01 : int gorilla +class Class10 { + <> + int id + size() +} +{{< /mermaid >}} + +## State + +{{< mermaid >}} +stateDiagram +[*] --> Still +Still --> [*] +Still --> Moving +Moving --> Still +Moving --> Crash +Crash --> [*] +{{< /mermaid >}} + +## Pie + +{{< mermaid >}} +pie +"Dogs" : 386 +"Cats" : 85 +"Rats" : 15 +{{< /mermaid >}} diff --git a/exampleSite/content/posts/test.zh.md b/exampleSite/content/posts/test.zh.md index bd6b229..6f80992 100644 --- a/exampleSite/content/posts/test.zh.md +++ b/exampleSite/content/posts/test.zh.md @@ -20,10 +20,9 @@ autoCollapseToc: true lightgallery: true math: true comment: false -dev: true --- -## & :(fas fa-rocket): This is a test page +## :(fas fa-rocket): This is a test page [https://www.aol.com/article/entertainment/2020/02/10/oscars-viewership-hits-new-low-with-236-million-viewers/23923047/](https://www.aol.com/article/entertainment/2020/02/10/oscars-viewership-hits-new-low-with-236-million-viewers/23923047/) @@ -131,44 +130,47 @@ _Blog.chroma = function () { ## Test ECharts -{{< dev/echarts >}} -title : { - text: '某站点用户访问来源', - subtext: '纯属虚构', - x:'center' -}, -tooltip : { - trigger: 'item', - formatter: "{a}
{b} : {c} ({d}%)" -}, -legend: { - orient: 'vertical', - left: 'left', - data: ['直接访问','邮件营销','联盟广告','视频广告','搜索引擎'] -}, -series : [ - { - name: '访问来源', - type: 'pie', - radius : '55%', - center: ['50%', '60%'], - data:[ - {value:335, name:'直接访问'}, - {value:310, name:'邮件营销'}, - {value:234, name:'联盟广告'}, - {value:135, name:'视频广告'}, - {value:1548, name:'搜索引擎'} - ], - itemStyle: { - emphasis: { - shadowBlur: 10, - shadowOffsetX: 0, - shadowColor: 'rgba(0, 0, 0, 0.5)' - } - } - } -] -{{< /dev/echarts >}} +{{< echarts >}} +title: + text: 某站点用户访问来源 + subtext: 纯属虚构 + x: center +tooltip: + trigger: item + formatter: '{a}
{b} : {c} ({d}%)' +legend: + orient: vertical + left: left + data: + - 直接访问 + - 邮件营销 + - 联盟广告 + - 视频广告 + - 搜索引擎 +series: + - name: 访问来源 + type: pie + radius: 55% + center: + - 50% + - 60% + data: + - value: 335 + name: 直接访问 + - value: 310 + name: 邮件营销 + - value: 234 + name: 联盟广告 + - value: 135 + name: 视频广告 + - value: 1548 + name: 搜索引擎 + itemStyle: + emphasis: + shadowBlur: 10 + shadowOffsetX: 0 + shadowColor: 'rgba(0, 0, 0, 0.5)' +{{< /echarts >}} ## Test Mermaid -- cgit v1.2.3