如何在使用 vitepress 构建 gh-pages 时使用 cdn?

问题描述 投票:0回答:1

使用vitepress构建文档并部署到github页面时,由于某些因素,需要使用CDN对assets文件夹中的js、css等静态资源进行加速。我想使用jsDelivr CDN,但是查阅了很多文档,我还是不知道如何使用。配置一下,html header中的url是相对路径,请帮忙。

    <script type="module" src="/assets/app.58c30d0b.js"></script>
    <link rel="preload" href="/assets/inter-roman-latin.2ed14f66.woff2" as="font" type="font/woff2" crossorigin="">
    <link rel="modulepreload" href="/assets/chunks/framework.d084db19.js">

我想获取vitepress.config.js中的配置或者引用插件?

cdn vitepress
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.