vitepress icon indicating copy to clipboard operation
vitepress copied to clipboard

createMarkdownRenderer的参数未生效

Open weizwz opened this issue 6 months ago • 1 comments
trafficstars

Describe the bug

我尝试在项目构建时,生成rss文件。使用createMarkdownRenderer函数来渲染文章内容,传了一些md配置,但是并没有生效。

Image

Reproduction

  1. 在 docs/.vitepress/config/index.ts 配置中的 buildEnd 方法里调用生成rss的函数
  2. 生成rss的函数里调用createMarkdownRenderer渲染文章,并传入md配置
  3. 渲染完成生成rss文件后,md的配置并没有生效

Expected behavior

预期createMarkdownRenderer函数的参数生效

System Info

System:
    OS: macOS 15.4.1
    CPU: (10) arm64 Apple M4
    Memory: 98.05 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node
    npm: 11.2.0 - ~/.nvm/versions/node/v20.18.0/bin/npm
    pnpm: 9.14.2 - ~/.nvm/versions/node/v20.18.0/bin/pnpm
  Browsers:
    Chrome: 135.0.7049.115

Additional context

No response

Validations

weizwz avatar Apr 28 '25 03:04 weizwz

It currently supports singleton markdown renderer only. So only the options inferred from config are used.

brc-dd avatar May 02 '25 07:05 brc-dd