Comments (6)
@leaxoy
最新会更新一下 exampleSite,里面会有使用流程图的文档,大致示例如下
{{< mermaid >}}
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
{{< /mermaid >}}
使用的是 mermaidjs 库
from loveit.
非常感谢!
from loveit.
另外这种办法的话,在Typora中是无法预览的, 有没有办法支持代码块的流程图呢 比如:
```mermaid
sequenceDiagram
participant Publisher
participant Broker
participant Subscriber
Publisher->>Broker: Publish
Publisher->>Publisher: Delete(Msg)
Broker->>Subscriber: Publish
Broker->>Broker: Delete(Msg)
from loveit.
哈喽,@leaxoy
类似 Typora 这种代码块的流程图目前无法做到,因为当前 Hugo 对代码块的渲染结果还无法修改。
不过,Hugo 在 v0.62.0 中改用 Goldmark
支持了 Markdown Render Hooks,但是目前仅可以自定义链接和图片。
并且,这两种 Hook 在这个主题中已经用到了,将来有望支持代码块的 Hook,从而可以实现类似功能。
from loveit.
哈喽,@leaxoy
这是 mermaid 的文档.
from loveit.
from loveit.
Related Issues (20)
- 404 page not found HOT 1
- 最近发现网易云的短链接似乎是失效了,之前正确格式的音乐都无法显示了,如果大大有空可以修一下吗,虽然大概率是网易云那边的问题 HOT 1
- 请问代码折叠和拷贝,有shortcodes吗
- [FEATURE] 请求加入pagefind搜索引擎
- 请问我该如何展示4级标题? HOT 1
- [FEATURE] 增加utterances评论系统支持
- [FEATURE] What should i do if i want upgrde the verison of mermaid
- giscus评论不显示
- 请问标题动画的代码在哪里? HOT 1
- 国内静态资源CDN HOT 3
- [FEATURE] disable theme switcher and order of params.social
- [BUG] _index.md worked fine with other theme/hugo version, not now HOT 2
- [BUG] Copy button in codeblock does not appear
- [BUG] Some problem...
- [FEATURE] Using local icons/svg in titile and menu ("pre") 如何使用本地SVG文件作为图标
- 我的博客内容部署后主页只显示两篇博客内容,其余的不显示
- [BUG] Deprecations
- [BUG] 网站主页配置头像未显示 HOT 1
- [BUG] 本地预览shortcodes有效,但是vercel部署过后shortcodes无法找到
- [BUG] Posts in the 'posts' directory but with type explicitly set to 'post' are not shown on the home page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loveit.