vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
11.48k stars 1.86k forks source link

支持 Markdown 动态渲染 #3829

Closed linpengteng closed 2 weeks ago

linpengteng commented 2 weeks ago

Is your feature request related to a problem? Please describe.

例如:

Describe the solution you'd like

Support:

  ```md {render=window.location.href.start('https://github.com')}
     git clone https://github.com/username/xxxx.git
  ```
  ```md {render=window.location.href.start('https://gitee.com')}
     git clone https://gitee.com/username/xxxx.git
  ```

Describe alternatives you've considered

No response

Additional context

No response

Validations

brc-dd commented 2 weeks ago

That needs too much of architecture change and SSR won't work for those parts defeating the main purpose of VitePress.

You can use something like this instead: https://vitepress.dev/guide/using-vue#unescape-in-code-blocks


```sh-vue
git clone {{ gitUrl }}
linpengteng commented 2 weeks ago

thank you, it is worked.