Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mermaid部分能不能像typora一样 #347

Closed
3 tasks done
fightinggg opened this issue Aug 22, 2021 · 9 comments
Closed
3 tasks done

mermaid部分能不能像typora一样 #347

fightinggg opened this issue Aug 22, 2021 · 9 comments
Labels
📖 Docs Improvements or additions to documentation Hexo
Milestone

Comments

@fightinggg
Copy link

Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。

Issue Checklist

  • I am using NexT version 8.0 or later.
  • I have already read the relevant documents of Hexo and NexT.
  • I have already searched for current issues, which does not help me.

Expected behavior

能不能支持这种写法

$```mermaid
$graph TB
$  id1[id1]
$  id2(id2)
$  id3([id3])
$  id4[(id4)]
$  id5((id5))
$```

image

Actual behavior

image

  • Links to demo site with this issue:
  • Links to repository or source code of the blog:
  • Screenshots:

Steps to reproduce the behavior

Other Information

@fightinggg fightinggg added the Feature Request New feature or request label Aug 22, 2021
@stevenjoezhang
Copy link
Member

这种写法有歧义,它区分不了是要显示mermaid的源代码,还是需要将代码渲染成框图

@fightinggg
Copy link
Author

fightinggg commented Aug 22, 2021

这种写法有歧义,它区分不了是要显示mermaid的源代码,还是需要将代码渲染成框图

要显示源代码,用txt不就好了吗,看上面那张图的26-33行

@stevenjoezhang
Copy link
Member

有道理,那接下来解决这个就好: hexojs/hexo#3865

@ljcbaby ljcbaby added the Hexo label Oct 15, 2021
@StudentWeis
Copy link

对对对!非常希望像Typora一样,这样子就不需要专门修改了!

@hrtan99
Copy link

hrtan99 commented Dec 16, 2021

7.8版本就是这么渲染的,不知道为啥8.x改掉了。这么处理mermaid比较方便,从typora导过来就不用专门一个一个修改格式了。

@Coder-ZJQ
Copy link

GitHub 也支持以代码块的形式插入 mermaid 了。
详见:Include diagrams in your Markdown files with Mermaid

@stevenjoezhang
Copy link
Member

stevenjoezhang commented Mar 6, 2022

NexT 这边已适配: a396c61
请等待 Hexo 发布下一个版本(6.1.0)并升级,在 _config.yml 中作出如下配置

highlight:
+  exclude_languages:
+    - mermaid

即可使用该 mermaid 语法。

文档已更新: next-theme/theme-next-docs@bf58a30

@stevenjoezhang stevenjoezhang added 📖 Docs Improvements or additions to documentation and removed Feature Request New feature or request labels Mar 6, 2022
@stevenjoezhang stevenjoezhang added this to the 8.10.2 milestone Mar 6, 2022
stevenjoezhang added a commit that referenced this issue Mar 7, 2022
@Coder-ZJQ
Copy link

not worked for prismjs
hexojs/hexo#4939

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📖 Docs Improvements or additions to documentation Hexo
Projects
None yet
Development

No branches or pull requests

6 participants