khusika / FeelIt

A clean, elegant but advanced blog theme for Hugo
https://feelit.khusika.dev
MIT License
166 stars 61 forks source link

[FEATURE] Support Typora-style mermaid markdown rendering #32

Open ClSlaid opened 3 years ago

ClSlaid commented 3 years ago

Describe the feature you want

```mermaid
#mermaid diagram scripts
```    e.g.

Then the editor will directly render them into graphs, what you see is what you got.

图片

What if the theme could directly render such syntax of markdown text? then we needn't search through the whole text and replace them one by one.

ClSlaid commented 3 years ago

I've tried adding such a feature into Hugo-theme-even in February, however, the author seems to have abandoned the project and did not take even a look into my pull request, maybe the change in the PR may be of help to you...

khusika commented 3 years ago

is this related to the 3rd party markdown editor?

ClSlaid commented 3 years ago

is this related to the 3rd party markdown editor?

Not at all, I mean if the theme could render mermaid code blocks as mermaid shortcodes, it'll be of convenience.

khusika commented 3 years ago

Not at all, I mean if the theme could render mermaid code blocks as mermaid shortcodes, it'll be of convenience.

Did you mean converting FeelIt default codeblock?

from

{{< mermaid >}}
{{< /mermaid >}}

into

```mermaid
ClSlaid commented 3 years ago

Not at all, I mean if the theme could render mermaid code blocks as mermaid shortcodes, it'll be of convenience.

Did you mean converting FeelIt default codeblock?

from

{{< mermaid >}}
{{< /mermaid >}}

into

```mermaid

Yes, to be more precise, I mean treat

```mermaid

as

{{ < mermaid > }}
{{ </mermaid>}}