liuyib / hexo-theme-stun

🦄 An elegant theme for Hexo
https://theme-stun.github.io/docs/
MIT License
618 stars 124 forks source link

更新代码后,hexo s 编译报错 config.pug: 1 #119

Closed cole31415 closed 3 years ago

cole31415 commented 3 years ago

I want to create a new issue

Environment Information

Stun Version:

Hexo Version: 5.1.1

Platform: Windows 10

Browser: Chrome 83

Node.js and NPM Information: node: v12.18.3, npm: 6.14.6

Package dependencies Information: hexo-site@0.0.0 C:\Users\Mechrevo\Desktop\hexo +-- hexo@5.1.1 +-- hexo-deployer-git@2.1.0 +-- hexo-generator-archive@1.0.0 +-- hexo-generator-category@1.0.0 +-- hexo-generator-feed@3.0.0 +-- hexo-generator-index-pin-top@0.2.2 +-- hexo-generator-tag@1.0.0 +-- hexo-renderer-ejs@1.0.0 +-- hexo-renderer-marked@3.2.0 +-- hexo-renderer-pug@1.0.0 +-- hexo-renderer-stylus@2.0.1 +-- hexo-server@2.0.0 `-- hexo-wordcount@6.0.1

Hexo Configuration:

Stun Configuration:

Expected behaviour

Actual behaviour

Steps to reproduce the behaviour

运行 hexo s点击本地地址时

Unhandled rejection TypeError: C:\Users\Mechrevo\Desktop\hexo\themes\stun\layout_partials\config.pug:1

1| - 2| var algolia = 'undefined'; 3| var env = process.env; 4| if (theme.algolia_search.enable) {

Cannot read property 'enable' of undefined at eval (eval at wrap (C:\Users\Mechrevo\Desktop\hexo\node_modules\pug-runtime\wrap.js:6:10), :409:25)
at template (eval at wrap (C:\Users\Mechrevo\Desktop\hexo\node_modules\pug-runtime\wrap.js:6:10), :5884:72) at _View._compiled (C:\Users\Mechrevo\Desktop\hexo\node_modules\hexo\lib\theme\view.js:136:50) at _View.render (C:\Users\Mechrevo\Desktop\hexo\node_modules\hexo\lib\theme\view.js:39:17) at C:\Users\Mechrevo\Desktop\hexo\node_modules\hexo\lib\hexo\index.js:64:21 at tryCatcher (C:\Users\Mechrevo\Desktop\hexo\node_modules\bluebird\js\release\util.js:16:23) at C:\Users\Mechrevo\Desktop\hexo\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (C:\Users\Mechrevo\Desktop\hexo\node_modules\hexo\lib\hexo\router.js:30:5) at RouteStream.Readable.read (_streamreadable.js:467:10) at resume (_stream_readable.js:981:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)

Other Information


liuyib commented 3 years ago

@cole31415 请问你更新了哪部分代码呢? 通过报错信息,可以大概看出,是配置项 algolia_search 出问题了,你看下 Stun 的 _config.yml 文件中,搜索 algolia_search,看看能不能搜到?

liuyib commented 3 years ago

另外,如果要启用 algolia 搜索,请务必阅读文档:https://liuyib.github.io/hexo-theme-stun/zh-CN/advanced/third-part.html#algolia-%E6%90%9C%E7%B4%A2

cole31415 commented 3 years ago

可以搜索到algolia_search,我就是想更新下stun的_config.yml文件的,没有启用algolia搜索功能

cole31415 commented 3 years ago

我删除了原来的主题,重新拉取主题还是有这个问题,有点懵逼了

liuyib commented 3 years ago

@cole31415 麻烦发一下你的 hexo 和 stun 配置(为了保护你的配置安全,如果配置中有私钥的话,私钥不用发)

cole31415 commented 3 years ago

Hexo _config.yml:

查看代码... ```yml # Hexo Configuration ## Docs: https://hexo.io/docs/configuration.html ## Source: https://github.com/hexojs/hexo/ # Site title: BlueBerry前端笔记 subtitle: 'Talent in words, wisdom in books' description: '热爱技术,热爱生活' keywords: author: 请给我一杯冰可乐 language: zh-CN timezone: '' # URL ## If your site is put in a subdirectory, set url as 'http://example.com/child' and root as '/child/' url: 'http://example.com/child' root: / permalink: :year/:month/:day/:title/ permalink_defaults: pretty_urls: trailing_index: true # Set to false to remove trailing 'index.html' from permalinks trailing_html: true # Set to false to remove trailing '.html' from permalinks # Directory source_dir: source public_dir: public tag_dir: tags archive_dir: archives category_dir: categories code_dir: downloads/code i18n_dir: :lang skip_render: # Writing new_post_name: :title.md # File name of new posts default_layout: post titlecase: false # Transform title into titlecase external_link: enable: true # Open external links in new tab field: site # Apply to the whole site exclude: '' filename_case: 0 render_drafts: false post_asset_folder: false relative_link: false future: true highlight: enable: true line_number: true auto_detect: false tab_replace: '' wrap: true hljs: false prismjs: enable: false preprocess: true line_number: true tab_replace: '' # Home page setting # path: Root path for your blogs index page. (default = '') # per_page: Posts displayed per page. (0 = disable pagination) # order_by: Posts order. (Order by date descending by default) index_generator: path: '' per_page: 10 order_by: -date # Category & Tag default_category: uncategorized category_map: tag_map: # Metadata elements ## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta meta_generator: true # Date / Time format ## Hexo uses Moment.js to parse and display date ## You can customize the date format as defined in ## http://momentjs.com/docs/#/displaying/format/ date_format: YYYY-MM-DD time_format: HH:mm:ss ## updated_option supports 'mtime', 'date', 'empty' updated_option: 'mtime' # Pagination ## Set per_page to 0 to disable pagination per_page: 10 pagination_dir: page # Include / Exclude file(s) ## include:/exclude: options only apply to the 'source/' folder include: exclude: ignore: # Extensions ## Plugins: https://hexo.io/plugins/ ## Themes: https://hexo.io/themes/ theme: stun # hexo-excerpt # 自动生成摘要的插件 # 项请见 https://github.com/chekun/hexo-excerpt excerpt: depth: 4 excerpt_excludes: ['h1','h2','h3','h4','img','hr','blockquote'] more_excludes: [] hideWholePostExcerpts: true # 根据目录生成分类的插件 # Generate categories from directory-tree # 项请见 https://github.com/xu-song/hexo-auto-category # depth: the depth of directory-tree you want to generate, should > 0 auto_category: enable: true depth: 5 # 标签云插件 # tags cloud # https://github.com/MikeCoder/hexo-tag-cloud/blob/master/README.ZH.md tag_cloud: textFont: '' textColour: \#333 textHeight: 25 outlineColour: \#e2e1d1 # Deployment ## Docs: https://hexo.io/docs/one-command-deployment deploy: type: git repo: git@github.com:cole31415/cole31415.github.io.git branch: master # 订阅配置 feed: type: atom # 这是 RSS 订阅的地址(可以随意设置,和上面 rss 配置项对应) path: atom.xml limit: 20 hub: content: content_limit: 140 content_limit_delim: " " order_by: -date icon: icon.png ```
cole31415 commented 3 years ago

Stun _config.yml:

查看代码... ```yml # --------------------------------------------------------------- # Theme Core Configuration Settings # --------------------------------------------------------------- # Remove unnecessary files after hexo generate. shake_file: true # --------------------------------------------------------------- # SEO Settings # --------------------------------------------------------------- # If true, will add site-subtitle to index page. # Remember to set up your site-subtitle in Hexo `_config.yml`. index_subtitle: false # Set a canonical link tag for your Hexo site. # See: https://support.google.com/webmasters/answer/139066 # Remember to set up your URL in Hexo `_config.yml` (e.g. url: http://yoursite.com) canonical: true # Webmaster tools verification setting # --------------------------------------------------------------- # Google Webmaster tools verification setting # See: https://www.google.com/webmasters/ google_site_verification: # Bing Webmaster tools verification setting # See: https://www.bing.com/webmaster/ bing_site_verification: # Baidu Webmaster tools verification setting # See: https://ziyuan.baidu.com/site/ baidu_site_verification: # 360 Webmaster tools verification setting # see http://zhanzhang.so.com/ qihu360_site_verification: # Sougou Webmaster tools verification setting # see http://zhanzhang.sogou.com/ sougou_site_verification: # --------------------------------------------------------------- # Menu config # --------------------------------------------------------------- # `||` 分隔符之前是页面路径,`||` 分隔符之后是图标 # 用法(有图标): `Key: /路径/ || fa(s|r|l|d|b) fa-图标名称` # 用法(无图标): `Key: /路径/` # fas far fal fad fab 是 FontAwesome 5.x 中图标的前缀,你需要根据具体图标自行设置 # 查找图标名称,请访问:https://fontawesome.com/icons menu: home: / || fas fa-home archives: /archives/ || fas fa-folder-open categories: /categories/ || fas fa-layer-group tags: /tags/ || fas fa-tags # You can add a secondary menu like follow. more: javascript:; || fas fa-hat-wizard # 子目录 submenu: # Add item of secondary menu in here. more: about: /about/ || fas fa-fingerprint resources: /resources/ || fas fa-file-alt menu_settings: # 是否只显示图标 icon_only: false # 是否只显示文字 text_only: false # --------------------------------------------------------------- # Site config # --------------------------------------------------------------- # 网站图标 favicon: small: /assets/favicon-16x16.png medium: /assets/favicon-32x32.png # ! ----------------------------------------------------------------------- # 下面这些配置项默认不启用,你需要准备好相应的图片后才能启用,也可以直接忽略。 # ! ----------------------------------------------------------------------- # apple_touch_icon: /assets/apple-touch-icon.png # 180x180 像素大小的图片 # safari_pinned_tab: /assets/stun-logo.svg # SVG 格式的图片 # msapplication: /assets/favicon-144x144.png # 144x144 像素大小的图片 # Progressive Web Apps # See: https://github.com/lavas-project/hexo-pwa/ pwa: enable: false manifest: /manifest.json # (Please use "" to wrap the value) theme_color: "#54bcff" # 夜间模式 night_mode: enable: true # 切换夜晚模式的按钮 button: # 按钮块的颜色(请使用引号包裹值) color: "#fafafa" # 按钮的背景颜色(请使用引号包裹值) bg_color: "#8c8a8a" # 代表白天和夜晚的图标(目前仅支持文本和 emoji) icon: dark: 🌜 light: 🌞 # 网页布局设置 layout: # 网站内容区域宽度(显示文章的区域) content: 768px # 侧边栏宽度 sidebar: 300px # 内容区域和侧边栏之间的间隙 content_sidebar_gap: 30px # 网站中 "main" 标签的 padding 属性 # 你可以像使用 CSS 中的 padding 属性一样进行设置。例如: # 设置 实际效果 # 20px padding: 20px # 10px 20px padding: 10px 20px # 30px 20px 10px padding: 30px 20px 10px # 30px 20px 10px 20px padding: 30px 20px 10px 20px main_padding: # 屏幕宽度在 [768px, 无穷) 之间时生效 default: 20px # 屏幕宽度在 [576px, 768px) 之间时生效 tablet: 15px # 屏幕宽度在 [0px, 576px) 之间时生效 mobile: 10px # 网站顶部设置 header: enable: true show_on: # 在文章页面是否显示网站顶部 post: true # 网站顶部的高度(设置为百分数,表示所占屏幕高度的百分比。支持所有 CSS 长度单位) height: 100% # 顶部背景图片 bg_image: enable: true # In theme directory (source/images): /images/avatar.png # In site directory (source/uploads): /uploads/avatar.png # You can also use a link of image. # 填写图片路径或链接 url: /assets/background.png # 顶部背景图的遮罩效果 mask: enable: false # 透明度(取值:0 ~ 1) opacity: 0.5 nav: # 顶部导航栏的高度(支持所有 CSS 长度单位) height: 50px # 导航栏的背景颜色(吸顶时) bg_color: "#333" # 提示向下滚动的图标 scroll_down_icon: enable: true # 查找图标名称,请访问:https://fontawesome.com/icons name: fas fa-angle-down # 是否启用动画 animation: true # 网站主题设置 body: # 网站主体背景图片 bg_image: enable: true # In theme directory (source/images): /images/avatar.png # In site directory (source/uploads): /uploads/avatar.png # You can also use a link of image. # 填写图片路径或链接 url: https://w.wallhaven.cc/full/4o/wallhaven-4o3r6p.png # 是否固定背景图片(相当于设置 CSS 属性 position: fixed) fixed: true # 是否重复显示背景图片(相当于设置 CSS 属性 background-repeat: repeat/no-repeat) repeat: false # 网站主体背景图片的遮罩效果 mask: enable: false # 透明度(取值:0 ~ 1) opacity: # 默认情况下,网站主体背景图片的透明度 default: 0.1 # 夜晚模式下,网站主体背景图片的透明度 night_mode: 0.6 # 网站底部设置 footer: # 背景图片 bg_image: enable: false # In theme directory (source/images): /images/avatar.png # In site directory (source/uploads): /uploads/avatar.png # You can also use a link of image. # 填写图片路径或链接 url: # 遮罩效果 mask: enable: false # 遮罩透明度 (取值: 0 ~ 1) opacity: 0.5 # 版权信息 copyright: enable: true # 显示的文字信息,例如:xxx All Rights Reserved # 如果不设置,将显示 Hexo 配置文件中 author 项的内容 text: 请给我一杯冰可乐 # 开始时间(如果不设置,将使用最新的年份) since: # 结束时间(如果不设置,将使用最新的年份) end: # 日期和版权之间的图标 icon: enable: true # 查找图标名称,请访问:https://fontawesome.com/icons name: fas fa-heart # 心跳动画 animation: true # 请使用包裹值(支持所有 CSS 颜色单位) color: "#ff0000" # Hexo 链接(Powered by Hexo) powered: enable: false # 显示版本号(例如:vX.X.X) version: false # 主题链接(Theme - Stun) theme: enable: false # 显示版本号(例如:vX.X.X) version: false # 备案信息(只有中国开发者会用到)详情: http://www.miitbeian.gov.cn/ beian: enable: true # 备案 XXXXXXXX 号 icp: 桂ICP备2020008006号-1 # 任何自定义文本,支持 HTML(例如:托管于 Github Pages) custom: enable: true # 自定义文本内容 text: # 知识共享许可协议(cc) creative_commons: enable: true # 可选值: BY | BY-SA | BY-ND | BY-NC | BY-NC-SA | BY-NC-ND # 详情请访问: https://creativecommons.org/share-your-work/licensing-types-examples/ license: BY-NC-SA # 是否在侧边栏中显示 sidebar: true # 是否在文章底部显示 post: true # 可选值: # id | ms | ca | da | de | en | es | es_ES | eo | eu | fr | gl | hr # it | lv | lt | hu | nl | no | pt | pt_BR | pl | ro | sl | fi | sv # tr | is | cs | el | be | ru | zh | zh_TW | uk | ar | fa | bn | ja | ko # 不设置默认为:en(当用户查看许可协议时,会以你设置的语言进行显示) language: # 返回顶部设置 back2top: enable: true # 显示的图标 icon: # 查找图标名称,请访问:https://fontawesome.com/icons name: fas fa-rocket # 火箭发射动画 # animation: true # 图标的旋转角度(角度的单位是:deg) rotate: -45deg # 请使用引号包裹值(支持所有 CSS 颜色单位) color: "#49b1f5" hover_color: "#fc6423" # --------------------------------------------------------------- # Sidebar config # --------------------------------------------------------------- # 侧边栏设置 sidebar: enable: true # 侧边栏位置,可选值有:left 或 right position: left # 侧边栏吸顶时,距离页面顶部的距离(只支持 px 单位) offsetTop: 20px # 是否显示水平分割线 horizon_line: false # 作者信息 author: enable: true # 侧边栏头像 avatar: # In theme directory (source/images): /images/avatar.png # In site directory (source/uploads): /uploads/avatar.png # You can also use a link of image. # 填写图片路径或链接 url: /assets/avatar.png # 是否显示为圆形 rounded: true # 头像透明度(取值:0 ~ 1) opacity: 1 # 鼠标经过时的动画,可选值:turn 或 shake animation: shake # 格言(可以是任意一句想写的话) motto: 热爱生活,热爱技术 # 社交链接 # `||` 分隔符之前是具体链接,`||` 分隔符之后是图标。 # 用法(有图标): `Key: /路径/ || fa(s|r|l|d|b) fa-图标名称` # 用法(无图标): `Key: /路径/` # fas far fal fad fab 是 FontAwesome 5.x 中图标的前缀,你需要根据具体图标自行设置。 # 查找图标名称,请访问:https://fontawesome.com/icons # # 如果你找不到想要的图标,可以考虑用文字来代替图标显示,用法: # 通过添加 `origin:` 前缀即可显示文字。例如:`origin:知` 会以 `知` 代替图标显示。 social: github: https://github.com/cole31415 || fab fa-github juejin: https://juejin.im/user/1151943919287197 || origin:掘金 zhihu: https://www.zhihu.com/people/ke-le-22-56-54 || origin:知乎 cnblogs: https://www.cnblogs.com/BlueBerryCode/ || origin:博客园 # wechat: yournumber || fab fa-weixin # qq: ypurnumber || fab fa-qq # google: https://plus.google.com/ || fab fa-google # segmentfault: https://segmentfault.com/ || origin:sf # weibo: https://weibo.com/ || fab fa-weibo # telegram: yournumber || fab fa-telegram # twitter: https://twitter.com/ || fab fa-twitter # youtube: https://youtube.com/ || fab fa-youtube # 社交链接的设置 social_setting: # 是否启用社交链接 enable: true # 是否只显示图标 icon_only: true # 文章目录 toc: enable: true # 是否自动添加列表序号 list_number: true # 是否文本溢出时换行 wrap: true # 是否始终展开所有文章目录 # true :始终展开 # false:默认折叠,滚动到对应位置时自动展开 expand_all: false # 生成目录时,解析 `` 的最小深度 # 你可以在 Front-Matter 中,通过添加 `toc_min_depth` 属性,来为某篇文章指定该配置 min_depth: 1 # 生成目录时,解析 `` 的最大深度 # 你可以在 Front-Matter 中,通过添加 `toc_max_depth` 属性,来为某篇文章指定该配置 max_depth: 6 # 订阅设置 feed: enable: false # 邮件订阅地址 (例如:http://eepurl.com/guAE6j) email: # RSS 订阅地址 (例如:/atom.xml) # 开启 RSS 订阅之前,你需要安装 hexo 插件:hexo-generator-feed。然后在 Hexo 根目录下的 _config.yml 文件中添加配置项 rss: # 文章阅读进度条 reading_progress: enable: true # 请使用引号包裹值(支持所有 CSS 颜色单位) color: "#fc6423" # 进度条高度(支持所有 CSS 长度单位) height: 1px # --------------------------------------------------------------- # Page config # --------------------------------------------------------------- codeblock: # 代码块样式 # 三个可选值:default、simple、carbon style: carbon # 代码高亮 # 三种可供选择的代码高亮样式:light、dark、ocean highlight: dark # 代码溢出换行 # 代码溢出是否换行 word_wrap: false # Add a line below h1, h2 tags. heading_line: true # 启用赞赏码 reward: enable: true # 支付宝 alipay: /assets/zfb_pay.png # 微信 wechat: /assets/wx_pay.png # --------------------------------------------------------------- # Post config # --------------------------------------------------------------- # 文章头部信息 post_meta: # 是否只显示图标 icon_only: false # 文章创建时间 created: enable: true # 查找图标名称,请访问:https://fontawesome.com/icons icon: far fa-calendar-plus # 文章更新时间 updated: enable: true # 查找图标名称,请访问:https://fontawesome.com/icons icon: far fa-calendar-check # 文章预计的阅读时间 # 启用这个功能之前,你首先需要在 Hexo 根目录安装依赖: # `npm install hexo-wordcount --save`,然后重启 hexo 服务器 reading_time: enable: true # 查找图标名称,请访问:https://fontawesome.com/icons icon: far fa-clock # 设置文章的阅读速度(阅读时间会根据这个设置来计算) speed: # 中文的阅读速度 zh: 200 # 英文的阅读速度 en: 80 # 文章字数统计 # 启用这个功能之前,你首先需要在 Hexo 根目录安装依赖: # `npm install hexo-wordcount --save`,然后重启 hexo 服务器 word_count: enable: true # 查找图标名称,请访问:https://fontawesome.com/icons icon: far fa-file-word # 文章列表分页 post_list: # 是否分页 paginate: # 首页的文章列表是否分页 home: true # 归档页面的文章列表是否分页 archives: false # 是否展示文章列表里的文章的封面图片 cover_image: home: false # 文章小部件设置 post_widget: # 文章标签 # 是否在文章末尾显示文章标签 tags: true # 文章结束提示信息 end_text: # 在文章底部显示 “本文结束” 的提示信息 enable: true # 是否在提示信息之前显示水平分割线 horizon_line: true # 文章分享 share: enable: false # The text displayed before the share button. label: "分享到: " # Optional values: qzone | qq | weibo | wechat | douban | linkedin | facebook | twitter | google target: qzone, qq, weibo, wechat, douban, linkedin, facebook, twitter, google # 文章置顶设置 # 想要使用文章置顶功能,首先你需要安装 hexo 插件 hexo-generator-index-pin-top stick_top: # 图标的位置(可选值为:left 和 right) position: right # 查找图标名称,请访问:https://fontawesome.com/icons icon: fas fa-thumbtack # 图标的旋转角度(角度的单位是:deg) rotate: 45deg # 请使用引号包裹值(支持所有 CSS 颜色单位) color: "#999" # --------------------------------------------------------------- # Comment config # --------------------------------------------------------------- # Gitalk评论系统 # Gitalk 是一个基于 Github issues 的评论系统。 # 使用之前需要确保你指定的 Github 仓库是公开的,并开启了 issues 功能 gitalk: # 是否启用 enable: false # Github 用户名 owner: # Github 仓库名(需要是公开的仓库) repo: # Github 应用程序客户端 ID client_id: # Github 应用程序客户端密钥 client_secret: # GitHub 仓库所有者和合作者,只有这些人可以初始化 Gitalk admin: # 类似于 B 站的关灯模式 distraction_free_mode: false # 如果你想让每一个参观你网站的人看到统一的语言,你可以在这里设置, # 可选值:en, zh-CN, es-ES, fr, ru, zh-TW language: # Valine 评论系统 valine: enable: false # 你的 LeanCloud app appid appid: # 你的 LeanCloud app appkey appkey: # 是否启用评论回复邮件提醒 notify: true # 是否启用评论验证码 verify: true # 评论框占位提示符 placeholder: Just go go # Gravatar 头像展示方式 avatar: mp # 评论者相关属性(默认:昵称、邮件、网址) meta: nick,mail,link # 评论列表分页,每页条数 pageSize: 10 # 是否启用文章访问量统计 visitor: false # 是否记录评论者IP recordIP: false # 多语言支持,可选值:zh-cn, en language: # MiniValine # See: https://github.com/MiniValine/MiniValine#Options minivaline: enable: false appId: # Your leancloud application appid appKey: # Your leancloud application appkey placeholder: Write a Comment # Comment box placeholder adminEmailMd5: # The MD5 of Admin Email to show Admin Flag. math: true # Support MathJax. md: true # Support Markdown. # MiniValine's display language depends on user's browser or system environment # If you want everyone visiting your site to see a uniform language, you can set a force language value # Optional values: en | zh-CN | (and many more) # More i18n info: https://github.com/MiniValine/minivaline-i18n lang: # Livere 来必力评论系统 # 1. 注册账号,登录,点击安装 # 2. 选择合适的版本后,会显示安装代码,在代码中可以找到你的 uid # 3. 然后将 uid 填入主题的配置文件即可 livere: enable: false uid: # Disqus 评论系统 # 1. 进入官网注册登录 # 2. 点击GetStart # 3. 点击 I want to install Disqus on my site disqus: enable: true shortname: blueberrycode # 是否显示文章的评论数 count: true # Utterances # See: https://utteranc.es/ utterances: enable: false # Github username. owner: # Github repository. repo: # Choose the mapping between blog posts and GitHub issues. # Optional values: pathname | url | title | og:title mapping: title # Choose the label that will be assigned to issues created by Utterances. # Emoji are supported in label names. label: utterances # Choose an Utterances theme that matches your blog. # Optional values: github-light | github-dark | github-dark-orange | icy-dark | dark-blue | photon-dark theme: github-light # ! ------------------------------------------------------------------------------- # ! Don't set this unless the URL of the script in the official website is changed. # ! ------------------------------------------------------------------------------- script_url: https://utteranc.es/client.js # --------------------------------------------------------------- # Statistics and Analytics config # --------------------------------------------------------------- # 卜蒜子统计分析 busuanzi: # 是否启用 enable: true # 是否只显示图标 icon_only: false # 统计站点 UV 数量 site_uv: enable: true # 查找图标名称,请访问:https://fontawesome.com/icons icon: fas fa-user # 统计站点 PV 数量 site_pv: enable: true # 查找图标名称,请访问:https://fontawesome.com/icons icon: fas fa-eye # 统计每篇文章的 PV 数量 post_pv: enable: true # 查找图标名称,请访问:https://fontawesome.com/icons icon: fas fa-eye # 谷歌分析:https://analytics.google.com/ # 我的追踪ID:UA-178643019-1 google_analytics: # 填入追踪ID # 百度分析:https://tongji.baidu.com/ baidu_analytics: # 填入你的统计代码 # 腾讯分析:https://v2.ta.qq.com/ tencent_analytics: # 填入腾讯代码 # --------------------------------------------------------------- # Search config # --------------------------------------------------------------- # Algolia Search # Dependency: https://github.com/algolia/instantsearch.js/ algolia_search: enable: false hits: # Number of search results displayed per page. per_page: 10 labels: # Whether to show stats of search. show_stats: true # Local Search # See: https://github.com/wzpan/hexo-generator-search/ local_search: enable: false # --------------------------------------------------------------- # Background config # --------------------------------------------------------------- # Canvas-ribbon 特效 canvas_ribbon: # 是否启用 enable: false # ribbon 的宽度 size: 120 # ribbon 的透明度 alpha: 0.6 # ribbon 的层级 zIndex: -1 # Canvas-nest 特效 canvas_nest: # 是否启用 enable: true # 线条的颜色(RGB 值,请使用 "," 分隔,并用引号包裹值) color: "0,0,0" # 线条的透明度 opacity: 0.6 # 线条数目 count: 100 # 效果的层级 zIndex: -1 # --------------------------------------------------------------- # Math and Chart config # --------------------------------------------------------------- math: enable: false # If true, this function will be enabled on every page. # If false, this function will be enabled only if the page where `math: true` is set in `Front-matter`. per_page: false # ! ------------------------------------------------------------------------------- # ! Please see the documentation before using. See: # ! https://liuyib.github.io/hexo-theme-stun/zh-CN/advanced/third-part.html#mathjax # ! ------------------------------------------------------------------------------- # Optional values: mathjax | katex engine: katex mathjax: cdn: https://cdn.jsdelivr.net/npm/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML # See: https://mhchem.github.io/MathJax-mhchem/ mhchem: enable: false mhchem_js: https://cdn.jsdelivr.net/npm/mathjax-mhchem@3.3.2/mhchem.min.js katex: cdn: https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.min.css # See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex copy_tex: enable: true copy_tex_js: https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/contrib/copy-tex.min.js copy_tex_css: https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/contrib/copy-tex.css # --------------------------------------------------------------- # Other config # --------------------------------------------------------------- # Fancybox功能 # 如果想要使用 FancyBox 功能,只需要修改主题配置文件即可:https://fancyapps.com/fancybox/3/ fancybox: true # 图片放大功能 zoom_image: enable: true # 遮罩的颜色(请使用引号包裹值) mask_color: "rgba(0,0,0,0.6)" # 图片放大时,距离屏幕边缘的间隙(只支持 px 单位) gap_aside: 20px # 图片瀑布流布局 gallery_waterfall: enable: true # 瀑布流中每一列的宽度 col_width: 220px # 图片之间的水平间隙 gap_x: 10px # 图片之间的垂直间隙 gap_y: 10px # 图片懒加载 # 想要配置该功能,请修改主题配置文件:https://github.com/tuupola/lazyload lazyload: enable: true # 图片未加载前的占位符。可选值有:gif 或 block placeholder: gif # 启用 Quicklink # 使浏览器在空闲时间预取可视区内的链接,以加快后续页面的加载速度 quicklink: # 是否启用。这里启用之后并不会对所有页面生效,你还需要进行下面的设置 enable: true # 设置 home 页面和 archive 页面是否启用 home: true archive: true # 当浏览器 DOMContentLoaded 事件触发后,开始初始化 quicklink delay: true # requestIdleCallback 超时时间(浏览器执行预取的时间(以毫秒为单位)) timeout: 10000 # 启用 fetch() 或回退到 XHR priority: true # 设置忽略预取的链接类型 # !!如果你不了解如何使用,请忽略这一项(默认即可)!! ignores: - /\/api\/?/ - uri => uri.includes('.xml') - uri => uri.includes('.zip') - (uri, el) => el.hasAttribute('nofollow') - (uri, el) => el.hasAttribute('noprefetch') # 启用 Pjax # 启用 Pjax 可以让你的博客在页面之间跳转时,只进行局部刷新。 # 这样不仅可以改善用户浏览体验,更能提高页面的加载速度 pjax: enable: false # 是否在切换页面时,滚动到顶部大图的底部 avoid_banner: false # !!如果你不了解如何使用,请忽略下面的配置项(默认即可)!! # 下面配置项的用法,请参见: https://github.com/MoOx/pjax/#options elements: selectors: switches: switchesOptions: history: true # 如果启用这个配置项,必须设置 `avoid_banner: false` scrollTo: false scrollRestoration: false cacheBust: false debug: false currentUrlFullReload: false timeout: 0 # Google AdSense google_adsense: enable: false client: js_src: https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js # 标识外部链接 external_link: # 添加一个图标让用户更清晰的知道这是一个外部链接 icon: enable: true # 查找图标名称,请访问:https://fontawesome.com/icons name: fas fa-external-link-alt # 请使用引号包裹值(支持所有 CSS 颜色单位) color: "#aaa" # 快速切换文章 shortcuts: # 切换文章的快捷键 # "Ctrl + ←" 切换到上一篇文章 # "Ctrl + →" 切换到下一篇文章 switch_post: # 是否启用 enable: false # 标签云 tag_cloud: # 请使用引号包裹颜色值(只支持十六进制的颜色值) start_color: "#a4d8fa" end_color: "#49b1f5" # 标签最大、最小的尺寸(例如:设置为 20 表示 字体大小 20px) min_size: 16 max_size: 26 # 最大显示标签数量 max_amount: 200 # Eliminate the old version of IE browser (IE6~11). # See: https://support.dmeng.net/upgrade-your-browser.html kill_old_ie: enable: false # The URL of warning page (Please use "" to wrap the value). # ! ---------------------------------------------------------------- # ! Usually you don't need to set this option, just use the default. # ! ---------------------------------------------------------------- warning_url: https://support.dmeng.net/upgrade-your-browser.html # Assets # In theme directory (source/css) css: css # In theme directory (source/js) js: js # In theme directory (source/images) images: images # Set icon for some components. # Icon name in FontAwesome, see: https://fontawesome.com/icons # ! ------------------------------------------------------------------- # ! Do not edit the follow configs, unless you know what you are doing. # ! ------------------------------------------------------------------- icon: search: fas fa-search localsearch_empty: far fa-meh menu_btn: fas fa-bars feed_email: fas fa-envelope feed_rss: fas fa-rss paginator_prev: fas fa-angle-left paginator_next: fas fa-angle-right read_more_btn: fas fa-long-arrow-alt-right post_tags: fas fa-tag copy_btn: fas fa-copy prompt_success: fas fa-check-circle prompt_info: fas fa-arrow-circle-right prompt_warning: fas fa-exclamation-circle prompt_error: fas fa-times-circle valine_visitor: fas fa-eye post_heading: fas fa-link notetag_default: fas fa-arrow-circle-right notetag_success: fas fa-check-circle notetag_info: fas fa-info-circle notetag_warning: fas fa-exclamation-circle notetag_danger: fas fa-minus-circle # Set a CDN address for the vendor you want to customize. # ! ------------------------------------------------------------------- # ! Do not edit the follow configs, unless you know what you are doing. # ! ------------------------------------------------------------------- cdn: # Using version: 5.12.1 # See: https://fontawesome.com/ # Example: # fontawesome: //cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css # fontawesome: //cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.12.1/css/all.min.css # fontawesome: //cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css # fontawesome: //cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css fontawesome: # Using version: 3.4.1 # Example: # jquery: //cdn.jsdelivr.net/npm/jquery@v3.4.1/dist/jquery.min.js # jquery: //cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js jquery: # Using version: 1.5.2 # See: http://velocityjs.org/ # Example: # velocity: //cdn.jsdelivr.net/npm/velocity-animate@1.5.2/velocity.min.js # velocity: //cdnjs.cloudflare.com/ajax/libs/velocity/1.5.2/velocity.min.js # velocity_ui: //cdn.jsdelivr.net/npm/velocity-animate@1.5.2/velocity.ui.min.js # velocity_ui: //cdnjs.cloudflare.com/ajax/libs/velocity/1.5.2/velocity.ui.min.js velocity: velocity_ui: # gitalk & js-md5 # Using version: latest & latest # See: https://github.com/gitalk/gitalk/, https://github.com/emn178/js-md5/ # Example: # gitalk_js: //cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js # gitalk_css: //cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.css # md5: //cdn.jsdelivr.net/npm/js-md5@latest/src/md5.min.js gitalk_js: gitalk_css: gitalk_md5: # valine & leancloud-storage # Using version: latest & latest # See: https://github.com/xCss/Valine/, https://www.npmjs.com/package/leancloud-storage/ # Example: # valine: //cdn.jsdelivr.net/npm/valine@latest/dist/Valine.min.js # leancloud_storage: //cdn.jsdelivr.net/npm/leancloud-storage@latest/dist/av-min.js valine: leancloud_storage: # minivaline # See: https://github.com/MiniValine/MiniValine # Example: # minivaline: //cdn.jsdelivr.net/npm/minivaline/dist/MiniValine.min.js minivaline: # busuanzi # Using version: latest # See: https://busuanzi.ibruce.info/ # Example: # busuanzi: //cdn.jsdelivr.net/gh/sukkaw/busuanzi@latest/bsz.pure.mini.js busuanzi: # Using version: 2.1.1 # See: https://busuanzi.ibruce.info/ # Example: # instantsearch_js: //cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.js # instantsearch_css: //cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.css instantsearch_js: instantsearch_css: # Using version: latest # See: https://github.com/hustcc/ribbon.js # Example: # canvas_ribbon: //cdn.jsdelivr.net/npm/ribbon.js@latest/dist/ribbon.min.js canvas_ribbon: # Using version: latest # See: https://github.com/hustcc/canvas-nest.js # Example: # canvas_nest: //cdn.jsdelivr.net/npm/canvas-nest.js@1.0.1/dist/canvas-nest.min.js canvas_nest: # Using version: 3.5.7 # See: https://www.fancyapps.com/fancybox/3/ # Example: # fancybox_js: //cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js # fancybox_css: //cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css fancybox_js: fancybox_css: # Using version: 4.2.2 # See: https://masonry.desandro.com/ # Example: # masonry: //cdn.jsdelivr.net/npm/masonry-layout@4.2.2/dist/masonry.pkgd.min.js masonry: # Using version: 2.0.0-rc.2 # See: https://github.com/tuupola/lazyload/ # Example: # lazyload: //cdn.jsdelivr.net/npm/lazyload@2.0.0-rc.2/lazyload.min.js lazyload: # Using version: latest # See: https://github.com/GoogleChromeLabs/quicklink/ # Example: # quicklink: //cdn.jsdelivr.net/npm/quicklink@latest/dist/quicklink.umd.js quicklink: # Using version: latest # See: https://github.com/MoOx/pjax/ # Example: # pjax: //cdn.jsdelivr.net/npm/pjax@latest/pjax.min.js pjax: # Using version: 1.0.16 # See: https://github.com/overtrue/share.js # Example: # share_js: //cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/js/social-share.min.js # share_css: //cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/css/share.min.css share_js: share_css: ```
liuyib commented 3 years ago

@cole31415 请问,你之前用的时候正常吗?怎么样之后开始报的错(安装某某插件、还是仅仅改了某个配置)?

cole31415 commented 3 years ago

之前正常,就昨天git pull主题的配置文件,然后拉取到了之前我的改动代码,我就放弃了所有更改(vscode),然后又突然点击了master源代码分支的同步更改,再继续运行就这样了

liuyib commented 3 years ago

@cole31415 我暂时还是定位不到问题。感觉你拉取到的代码中有冲突,然后你放弃更改的时候冲突是没法回退的。请你检查下,代码里有没有冲突呢? 如果你检查后,没有冲突,能否把你博客现在的源码推到 github 上,让我看下。或者加 stun 交流 q 群,把你的博客源码发给我。

cole31415 commented 3 years ago

ok的,群号是多少

liuyib commented 3 years ago

@cole31415 我用你提供的环境信息,安装了一遍试了试,没有复现问题。现在基本可以断定和环境,原来的代码无关。通过你的描述,应该是你操作失误,使得某些文件的变动超出了你的控制范围导致的。 加群吧,帮你看下出啥问题了,issue 就关了。

liuyib commented 3 years ago

ok的,群号是多少

1019013440