Closed Fgaoxing closed 2 years ago
:wave: Hello, Please describe your problem in as much detail as possible. If you don’t know how to describe the problem in detail, this article can help you: How To Ask Questions The Smart Way.
:wave: 您好, 请尽可能详细地描述您的问题。如果不知道如何详细地描述问题,这份教程可以帮助到您:提问的智慧 。
:wave: Hello, Are you still there? We are waiting for your response. If you do not reply, we will close this issue.
:wave: 您好, 还在吗?我们正等待您的回应,如果您迟迟没有回复,我们将会关闭这个 issue 。
检查清单
主题版本
最新
复现地址
无
问题描述
![Uploading image.png…]()
配置文件
站点配置文件
```yml 在这里粘贴替换 `blog/_config.yml` 中修改过的部分 ```
主题配置文件
```yml ############################### Volantis ############################### info: theme_name: Volantis # This is theme's name. theme_docs: https://volantis.js.org/ # This is theme's URL. theme_repo: https://github.com/volantis-x/hexo-theme-volantis # Debug 调试模式 debug: false ############################### 默认占位图 ############################### default: avatar: https://cdnn.vercel.app/gh/cdn-x/placeholder@1.0.1/avatar/round/3442075.svg link: https://cdnn.vercel.app/gh/cdn-x/placeholder@1.0.1/link/8f277b4ee0ecd.svg cover: https://cdnn.vercel.app/gh/cdn-x/placeholder@1.0.1/cover/76b86c0226ffd.svg image: https://cdnn.vercel.app/gh/cdn-x/placeholder@1.0.1/image/2659360.svg ############################### CSP ############################### # 内容安全策略( CSP ) meta 标签 http-equiv="Content-Security-Policy" # https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CSP # https://content-security-policy.com/ # 也可以设为 false 在 HTTP 标头中设置 https://volantis.js.org/v5/advanced-settings/#设置-HTTP-响应标头 csp: enable: true content: " default-src 'self' https:; block-all-mixed-content; base-uri 'self' https:; form-action 'self' https:; worker-src 'self' https:; connect-src 'self' https: *; img-src 'self' data: https: *; media-src 'self' https: *; font-src 'self' data: https: *; frame-src 'self' https: *; manifest-src 'self' https: *; child-src https:; script-src 'self' https: 'unsafe-inline' *; style-src 'self' https: 'unsafe-inline' *; " # 可以使用自动程序替换默认的 'unsafe-inline' 和 * 生成更严格的内容安全策略. # 另可以参考官网的 gulp 方案. # gulpfile.js https://github.com/volantis-x/community/blob/main/gulpfile.js ############################### CDN ############################### # 本地静态文件使用 CDN 加速 # 默认使用 https://unpkg.com/hexo-theme-volantis@<%- theme.info.theme_version %>/source/js/*.js ,注意版本号对应关系!!可以通过修改以下配置项覆盖 # 开发者注意 cdn.enable 设置为 false cdn: enable: false # CDN 前缀,为空使用默认值,链接最后不加 "/", # 例如: https://cdn.jsdelivr.net/gh/volantis-x/volantis-x.github.io@gh-page 填写最后编译生成的源码CDN地址前缀,此路径下应该含有/js与/css目录, # 该配置默认值是:"https://unpkg.com/hexo-theme-volantis@"+ theme.info.theme_version +"/source" prefix: #https://npm.elemecdn.com/hexo-theme-volantis/source # 以下配置可以覆盖 cdn.prefix,配置项的值可以为空,但是要使用CDN必须依据路径填写配置项的键 set: js: app: /js/app.js css: style: /css/style.css # (异步加载样式) # 静态资源版本控制 # 本地文件使用文件内容的hash值作为版本号(app.8c1e7c88.js) 其他为时间戳 (?time=1648684470140) # 建议静态资源设置标头 浏览器缓存一年边缘缓存一个月 cache-control: max-age=86400, s-maxage=31536000 如果有更新记得刷新缓存 cdn_version: true # volantis static 静态资源文件 npm 包 CDN 地址 (后面加 "/" ) # https://github.com/volantis-x/volantis-static volantis_static_cdn: https://unpkg.com/volantis-static@0.0.1649552113628/ ######################################################################## # 全局页面字符串替换 A => B (可用于临时修改错字等) replace: - https://cdn.jsdelivr.net/npm/ => https://unpkg.com/ - https://cdn.jsdelivr.net/gh/ => https://cdnn.vercel.app/gh/ # - https://unpkg.com/ => https://npm.elemecdn.com/ # dns-prefetch preconnect x-dns-prefetch-control dns_prefetch: - https://unpkg.com # - https://npm.elemecdn.com # 平滑滚动效果 scroll_smooth: true ############################### Navigation Bar ############################### > start # 注意事项:建议规范全站路径 URL 最后带一个 "/" 例如 "about/" navbar: visiable: auto # always, auto logo: # choose [img] or [icon + title] img: icon: title: 初一少年 menu: - name: 分类 icon: fa-solid fa-folder-open url: categories/ - name: 标签 icon: fa-solid fa-tags url: tags/ - name: 归档 icon: fa-solid fa-archive url: archives/ - name: 碎语 icon: fa-solid fa-comments url: say/ - name: 时光轴 icon: fa-solid fa-clock url: timeline/ - name: 友链 icon: fa-solid fa-link url: friends/ - name: 关于 icon: fa-solid fa-info-circle url: about/ - name: 子网站 icon: fa-solid fa-code-branch rows: - name: 个人主页 url: https://home.yt-blog.top - name: 传灵塔工作室官网 url: https://cltgzs.yt-blog.top - name: 网站状态监测 url: https://status.yt-blog.top - name: 网盘 url: https://cloud.yt-blog.top - name: 让我帮你百度一下 url: https://baidu.yt-blog.top - name: 图床 url: https://img.yt-blog.top search: 搜索... # Search bar placeholder ############################### Navigation Bar ############################### > end ############################### Cover ############################### > start cover: height_scheme: full # full, half layout_scheme: search # blank (留白), search (搜索), dock (坞), featured (精选), focus (焦点) display: home: true archive: true others: false # can be written in front-matter 'cover: true' background: # background: https://bing.ioliu.cn/v1/rand?w=1920&h=1200 logo: https://img.yt-blog.top/png/logo.png title: '懵懂の初一少年' subtitle: '一个少年的博客' search: 搜索... # search bar placeholder features: - name: 文档 icon: # img: volantis-static/media/twemoji/assets/svg/1f5c3.svg # https://cdn.jsdelivr.net/gh/twitter/twemoji@13.0/assets/svg/1f5c3.svg url: /v4/getting-started/ - name: 帮助 icon: # img: volantis-static/media/twemoji/assets/svg/1f516.svg # https://cdn.jsdelivr.net/gh/twitter/twemoji@13.0/assets/svg/1f516.svg url: faqs/ - name: 示例 icon: # img: volantis-static/media/twemoji/assets/svg/1f396.svg # https://cdn.jsdelivr.net/gh/twitter/twemoji@13.0/assets/svg/1f396.svg url: /examples/ - name: 社区 icon: # img: volantis-static/media/twemoji/assets/svg/1f389.svg # https://cdn.jsdelivr.net/gh/twitter/twemoji@13.0/assets/svg/1f389.svg url: /contributors/ - name: 博客 icon: # img: volantis-static/media/twemoji/assets/svg/1f4f0.svg # https://cdn.jsdelivr.net/gh/twitter/twemoji@13.0/assets/svg/1f4f0.svg url: /archives/ - name: 源码 icon: # img: volantis-static/media/twemoji/assets/svg/1f9ec.svg # https://cdn.jsdelivr.net/gh/twitter/twemoji@13.0/assets/svg/1f9ec.svg url: https://github.com/volantis-x/hexo-theme-volantis/ ############################### Cover ############################### > end pages: # 友链页面配置 friends: layout_scheme: traditional # simple: 简单布局, traditional: 传统布局 ############################### Article Layout ############################### > start # 文章布局 article: # 文章列表页面的文章卡片布局方案 preview: scheme: landscape # landscape # pin icon for post pin_icon: https://cdnn.vercel.app/gh/twitter/twemoji@13.0/assets/svg/1f4cc.svg # auto generate title if not exist auto_title: true # false, true # auto generate excerpt if not exist auto_excerpt: true # false, true # hide excerpt hide_excerpt: false # show split line or not line_style: solid # hidden, solid, dashed, dotted # show author author: false # true, false # show readmore button readmore: auto # auto, always # 文章详情页面的文章卡片本体布局方案 body: # 文章顶部信息 # 从 meta_library 中取 top_meta: [author, category, date, counter] #启用评论数量需在此添加 # 文章底部信息 # 从 meta_library 中取 bottom_meta: [updated, tags, share, category, walinecount, wordcount] # ---------------- # 文章页脚组件 footer_widget: # ---------------- # 参考资料、相关资料等 (for layout: post/docs) references: title: 参考资料 icon: fa-solid fa-quote-left # 在 front-matter 中: # references: # - title: 某篇文章 # url: https:// # 即可显示此组件。 # ---------------- # 相关文章,需要安装插件 (for layout: post) # npm i hexo-related-popular-posts related_posts: enable: ture title: 相关文章 icon: fa-solid fa-bookmark max_count: 5 # 设为空则不使用文章头图 placeholder_img: https://uploadbeta.com/api/pictures/random/?key=BingEverydayWallpaperPicture # ---------------- # 版权声明组件 (for layout: post) copyright: enable: true permalink: '本文永久链接是:' content: - '博客内容遵循 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 协议 本站已加入萌备 萌ICP备20221101号' - permalink # ---------------- # 打赏组件 (for layout: post) donate: enable: true images: - https://img.yt-blog.top/png/%E6%89%93%E8%B5%8F%20-%20%E7%89%B9%E5%86%99.png # meta library meta_library: # 默认文章作者(可在 _data/author.yaml 中增加其他作者,并在 front-matter 中设置) # https://volantis.js.org/advanced-settings/#多人协同 author: avatar: https://img.yt-blog.top/png/logo.png name: 懵懂の初一少年 url: https://www.yt-blog.top/about/ # 文章创建日期 date: icon: fa-solid fa-calendar-alt title: '发布于:' format: 'll' # 日期格式 http://momentjs.com/docs/ # 文章更新日期 updated: icon: fa-solid fa-edit title: '更新于:' format: '' # 日期格式 http://momentjs.com/docs/ # 文章分类 category: icon: fa-solid fa-folder-open # 文章浏览计数 counter: icon: fa-solid fa-eye unit: '次浏览' # 文章评论数量:支持 valine和waline valinecount: icon: fa-solid fa-comment-dots desc: '条评论' # 条评论 walinecount: icon: fa-solid fa-comment-dots desc: '条评论' # 条评论 # artalk 文章评论数量 artalkcount: icon: fa-solid fa-comment-dots desc: '条评论' # 条评论 # 文章字数和阅读时长 wordcount: icon_wordcount: fa-solid fa-keyboard icon_duration: fa-solid fa-hourglass-half # 文章标签 tags: icon: fa-solid fa-hashtag # 分享 share: - id: qq img: https://cdnn.vercel.app/gh/volantis-x/cdn-org/logo/128/qq.png - id: qzone img: https://cdnn.vercel.app/gh/volantis-x/cdn-org/logo/128/qzone.png - id: weibo img: https://cdnn.vercel.app/gh/volantis-x/cdn-org/logo/128/weibo.png - id: qrcode # 当id为qrcode时需要安装插件 npm i hexo-helper-qrcode img: https://cdnn.vercel.app/gh/volantis-x/cdn-org/logo/128/wechat.png - id: telegram img: https://cdnn.vercel.app/gh/volantis-x/cdn-org/logo/128/telegram.png ############################### Article Layout ############################### > end ############################### Comments ############################### > start comments: title: 评论 subtitle: service: waline # 可选评论系统 # # artalk # https://artalk.js.org/ # https://github.com/ArtalkJS/Artalk artalk: js: https://yours-artalk-domain/dist/Artalk.js # or https://unpkg.com/artalk@2.2.8/dist/Artalk.js css: https://yours-artalk-domain/dist/Artalk.css # or https://unpkg.com/artalk@2.2.8/dist/Artalk.css server: https://yours-artalk-domain # 修改为自建的后端服务地址 path: # 全局评论地址 placeholder: # 评论占位 # artalk 有三类图片:1.上传至服务端 2.上传至服务端后利用upgit上传至图床 3.前端上传至图床(本配置为此类) # 配置此项时将覆盖服务端上传能力 imgUploader: # 以兰空图床为例,下列填写内容为: # url: 'https://xxxxxx/api/v1/upload' # token: 'Bearer xxxxxxxxxxxxxx' # resp: 'data.links.url' api: # 图床地址 token: # 图床验证 resp: # 图片地址返回值的字段 # 更多置项可在 Artalk 后端进行配置,详见 https://artalk.js.org/guide/backend/fe-control.html # 也可以在此处继续参考上方例子进行配置,不建议重写配置的字段除上方所述外还有: # [el, useBackendConf, pageKey, pageTitle, site, darkMode, pvEl, imgUploader] # giscus # https://giscus.app # https://github.com/laymonage/giscus giscus: # 以下配置按照 yml 格式增删填写即可 # repo: xxx/xxx # repo-id: xxx # category: xxx # category-id: xxx # mapping: "pathname" # reactions-enabled: "1" # emit-metadata: "0" # lang: "zh-CN" # 以上配置按照 yml 格式增删填写即可 theme: light: "light" # https://cdn.jsdelivr.net/gh/volantis-x/cdn-volantis@master/css/giscus/light.css dark: "dark" # https://cdn.jsdelivr.net/gh/volantis-x/cdn-volantis@master/css/giscus/dark.css # beaudar # https://beaudar.lipk.org/ beaudar: repo: xxx/xxx issue-term: pathname issue-number: branch: main position: top order: desc theme: light: github-light dark: github-dark label: ✨💬✨ # utterances # https://utteranc.es/ utterances: repo: xxx/xxx issue-term: pathname issue-number: theme: light: github-light dark: github-dark label: ✨💬✨ # Disqus # https://disqus.com disqus: shortname: # optional autoload: false path: # 全局评论地址 # DisqusJS # https://github.com/SukkaW/DisqusJS disqusjs: path: # 全局评论地址 js: https://unpkg.com/disqusjs@1.3/dist/disqus.js css: https://unpkg.com/disqusjs@1.3/dist/disqusjs.css # 配置项按照yml格式继续填写即可 除了 [siteName url identifier] 选项 #shortname: #api: #apikey: #admin: #nesting: # Gitalk # https://gitalk.github.io/ gitalk: js: https://unpkg.com/gitalk@1/dist/gitalk.min.js # 配置项按照yml格式继续填写即可 除了 [id distractionFreeMode] 选项 clientID: clientSecret: repo: owner: admin: # [] path: # 全局评论地址 # Vssue 暂不支持Pjax # https://vssue.js.org/zh/ vssue: js: https://cdn.jsdelivr.net/gh/meteorlxy/vssue@1.4.4/packages/vssue/dist/vssue.github.min.js css: https://cdn.jsdelivr.net/gh/meteorlxy/vssue@1.4.4/packages/vssue/dist/vssue.min.css vue: https://cdn.jsdelivr.net/gh/vuejs/vue@2.6.11/dist/vue.runtime.min.js owner: repo: clientId: clientSecret: # LiveRe 暂不支持Pjax # https://www.livere.com livere: uid: # Isso # https://posativ.org/isso/ isso: url: https://example.com/(path/) src: https://example.com/(path/)js/embed.min.js css: gravatar: # HashOver 暂不支持Pjax # https://www.barkdull.org/software/hashover hashover: src: https://example.com/(path/)comments.php # Twikoo # https://twikoo.js.org/ twikoo: js: https://unpkg.com/twikoo@latest # 建议锁定版本 path: # 全局评论地址 # 其他配置项按照yml格式继续填写即可 除了 [el path] 选项 envId: xxxxxxxxxxxxxxx # 腾讯云环境id placeholder: #全局评论占位,也可以在管理面板中的配置管理处设置(此处优先级更高) # Waline # https://waline.js.org/ waline: js: https://unpkg.com/@waline/client@v2/dist/waline.js css: https://unpkg.com/@waline/client@v2/dist/waline.css path: # 全局评论地址 目前设置全局评论地址后visitor失效,这是waline的问题 placeholder: 快来评论吧~ # 评论占位提示 serverURL: https://waline.yt-blog.top/ # Waline 的服务端地址(必填) 测试用地址: https://waline.vercel.app imageUploader: # 以兰空图床为例,下列填写内容为: # url: https://xxxxxx/api/v1/upload # token: Bearer xxxxxxxxxxxxxx # resp: data.links.url api: # 图床地址 token: # 图床验证 resp: # 图片地址返回值的字段 pageview: true # 浏览量统计 comment: true # 评论数统计 # 其他配置项按照yml格式继续填写即可 除了 [el path imageUploader] 选项 # 组件属性地址:https://waline.js.org/reference/component.html # meta: ['nick', 'mail', 'link'] # Discuss # https://discuss.js.org discuss: js: https://cdn.jsdelivr.net/npm/discuss/dist/Discuss.js # 建议锁定版本 serverURLs: # Discuss server address url # https://discuss.js.org/Quick-Start.html#path ############################### Comments ############################### > end ############################### Sidebar ############################### > start sidebar: position: right # left right # 主页、分类、归档等独立页面 for_page: [repos, blogger, rss, webinfo, weather, lastupdate, tagcloud, category, donate, qrcode, comments, friends] # layout: docs/post 这类文章页面 for_post: [toc, repos, blogger, rss, webinfo, weather, lastupdate, tagcloud, category, donate, qrcode, friends] # 侧边栏组件库 widget_library: # --------------------------------------- # blogger info widget blogger: class: blogger display: [desktop, mobile] # [desktop, mobile] avatar: https://img.yt-blog.top/png/logo.png shape: circle # circle, rectangle url: /about/ title: 懵懂の初一少年 subtitle: jinrishici: true # Poetry Today. You can set a string, and it will be displayed when loading fails. social: - icon: fa-solid fa-envelope url: mailto:admin@yt-blog.top - icon: fab fa-github url: https://github.com/Fgaoxing/ - icon: fa-solid fa-house-user url: https://home.yt-blog.top - icon: fa-solid fa-rss url: /atom.xml - img: https://cdnn.vercel.app/gh/Fgaoxing/blog-cdn@main/source/codemao.svg url: https://shequ.codemao.cn/user/8778185 # --------------------------------------- # toc widget (valid only in articles) toc: class: toc display: [desktop] # [desktop, mobile] header: icon: fa-solid fa-list title: 本文目录 list_number: false min_depth: 2 max_depth: 5 # --------------------------------------- # music music: class: music display: [desktop, mobile] # [desktop, mobile] pjaxReload: ture # --------------------------------------- # category widget category: class: category display: [desktop] # [desktop, mobile] header: icon: fa-solid fa-folder-open title: 文章分类 url: /categories/ # --------------------------------------- # tagcloud widget tagcloud: class: tagcloud display: [desktop] # [desktop, mobile] header: icon: fa-solid fa-tags title: 热门标签 url: /tags/ min_font: 14 max_font: 24 color: true start_color: '#FF0000' end_color: '#4169E1' # --------------------------------------- # qrcode widget qrcode: class: qrcode display: [desktop, mobile] # [desktop, mobile] height: 64px # Automatic height if not set images: - https://img.yt-blog.top/png/%E6%89%93%E8%B5%8F%20-%20%E7%89%B9%E5%86%99.png # --------------------------------------- # webinfo widget webinfo: class: webinfo display: [desktop, mobile] header: icon: fa-solid fa-award title: 站点信息 type: article: enable: true text: '文章数目:' unit: '篇' runtime: enable: true data: '2021/11/01' # 填写建站日期 text: '已运行时间:' unit: '天' wordcount: enable: true text: '本站总字数:' # 需要启用 wordcount unit: '字' visitcounter: service: leancloud # busuanzi, leancloud siteuv: enable: true text: '本站访客数:' unit: '人' sitepv: enable: true text: '本站总访问量:' unit: '次' lastupd: enable: true friendlyShow: true # 更友好的时间显示 text: '最后活动时间:' unit: '日' # --------------------------------------- # lastupdate widget lastupdate: class: lastupdate display: [desktop, mobile] header: icon: fa-solid fa-clock WISTERIA title: 最近更新 # -------------------------------------- # 公告 repos: class: text display: [desktop, mobile] # [desktop, mobile] header: icon: far fa-bell title: 公告 content: - 建站完毕 # -------------------------------------- # 天气 weather: class: text display: [desktop, mobile] # [desktop, mobile] header: title: 天气 icon: fa-solid fa-cloud-sun url: https://www.qweather.com content: - # -------------------------------------- # 订阅 rss: class: text display: [desktop, mobile] # [desktop, mobile] header: title: 订阅 icon: fa-solid fa-rss url: https://rss.yt-blog.top/blog/ content: -
- # -------------------------------------- # friends friends: class: text display: [desktop] # [desktop, mobile] header: title: 友链 icon: fa-solid fa-link url: /friends/ content: -
- - - # -------------------------------------- # 最近评论 comments: class: text display: [desktop] # [desktop, mobile] header: title: 最近评论 icon: fa-solid fa-link url: /comments/ content: -
- - - ############################### Sidebar ############################### > end ############################### Tag Plugins ############################### > start # 内置标签插件的配置 tag_plugins: # {% note text %} note: # style for default note: icon: '\f054' color: '' iconfont: 'Font Awesome 6 Free' # {% checkbox %} checkbox: interactive: false # enable interactive for user color: '' # color for default checkbox # {% link title, url, img %} link: placeholder: https://cdnn.vercel.app/gh/volantis-x/cdn-org/logo/256/safari.png ############################### Tag Plugins ############################### > end ############################### Site Footer ############################### > start site_footer: # layout of footer: [aplayer, social, license, info, gov, copyright] layout: [aplayer, social, license, analytics, gov, copy, status, date, myssl] social: - icon: fa-solid fa-envelope url: mailto:admin@yt-blog.top - icon: fab fa-github url: https://github.com/Fgaoxing/ - icon: fa-solid fa-house-user url: https://home.yt-blog.top - icon: fa-solid fa-rss url: /atom.xml - img: https://static.codemao.cn/whitef/favicon.ico url: https://shequ.codemao.cn/user/8778185 # analytics using leancloud analytics: '站点访问量 站点访客数 页面访问量 ' #gov icp gov: '萌ICP备20221101号' # site copyright copy: '[Copyright © 2022-2023 懵懂的初一少年的博客](/)' # You can add your own property here. (Support markdown, for example: br: '
') br: '
' status: '[网站状态监测](https://status.yt-blog.top/)' date: '[本站已加入自建下载](https://www.yt-blog.top/2021/11/14/12/12/00/%E8%87%AA%E5%BB%BA%E4%B8%8B%E8%BD%BD%E5%BA%93/)' myssl: '
环境信息
https://vercel.com/