头图

路径

docs -> .vitepress -> config.mts
import { defineConfig } from "vitepress";

export default defineConfig({
  head:[
    /**
     * 这里用到了公用目录 public : 资源路径可以直接用绝对路径 /xxx
     * 浏览器网页logo图
     * 渲染效果 :<link rel="icon" href="/abc.png">
     */
    ['link',{rel:'icon',href:'/snow.svg'}], 
    /**
     * 在head中插入了一个 script 标签,
     * 渲染效果如下:
     * <script id="abcscript">
     *  console.log(1001)
     * </script>
     */
    // ['script',{id:'abcscript'},`console.log(1001)`] 
  ],
  themeConfig: {
    // ......
  },
});

image.png


兔子先森
389 声望17 粉丝

致力于新技术的推广与优秀技术的普及。