Closed Undeio closed 4 years ago
Thanks for opening this issue, maintainers will get back to you as soon as possible!
Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.
能否提供博客的源代码(不是github.io仓库),或者分别提供_config.yml
和_data/next.yml
的内容?
可以提供 config
,但我没有找到 _data/next.yml
,它是指哪个文件?
哦哦,那就不用管了。
从你复制的_config.yml
来看,似乎格式有些混乱,是不是因为git pull
之后出了问题?
可以从仓库的master分支下载一份全新的_config.yml
,然后再对照着改过来,应该能解决问题。
config.yml
,并没有错误。_config.yml
# ---------------------------------------------------------------
# Theme Core Configuration Settings
# See: https://theme-next.org/docs/theme-settings/
# ---------------------------------------------------------------
_data/next.yml
into default configuration (rewrite)._data/next.yml
(override). Only for NexT settings._config.yml
must be copied into next.yml
. Use if you know what you are doing._config.yml
by next.yml
without editing default config.override: false
reminder: false
cache: enable: true
minify: false
source/_data
and uncomment needed files below.custom_file_path:
favicon: small: /images/favicon-16x16-me.png medium: /images/favicon-32x32-me.png apple_touch_icon: /images/apple-touch-icon-next.png safari_pinned_tab: /images/logo.svg
rss: /atom.xml
footer:
icon:
# `heart` is recommended with animation in red (#ff0000).
name: heart
# If you want to animate the icon, set it to true.
animated: true
# Change the color of icon, using Hex Code.
color: "#ff0000"
author
from Hexo _config.yml
will be used.copyright:
powered:
enable: true
# Version info of Hexo after Hexo link (vX.X.X).
version: true
theme:
enable: true
# Version info of NexT after scheme info (vX.X.X).
version: true
ages:
enable: true
# birthday of your site
birthday: 20161222
# color of number
color: "#1890ff"
beian: enable: false icp:
gongan_id:
# The full num of gongan beian.
gongan_num:
# The icon for gongan beian. See: http://www.beian.gov.cn/portal/download
gongan_icon_url:
creative_commons: license: by-nc-sa sidebar: false post: false language:
disable_baidu_transformation: true
_config.yml
(e.g. url: http://yourdomain.com)canonical: true
seo: true
_config.yml
(e.g. subtitle: Subtitle)index_with_subtitle: false
exturl: false
google_site_verification:
bing_site_verification:
yandex_site_verification:
baidu_site_verification:
baidu_push: true
Key: /link/ || icon
||
delimiter is the target link.||
delimiter is the name of Font Awesome icon. If icon (with or without delimiter) is not specified, question icon will be loaded.menu: home: / || home
tags: /tags/ || tags categories: /categories/ || th archives: /archives/ || archive
commonweal: /404.html || heartbeat
menu_settings: icons: true badges: false
scheme: Mist
site_state: true
Key: permalink || icon
||
delimiter is the target permalink.||
delimiter is the name of Font Awesome icon. If icon (with or without delimiter) is not specified, globe icon will be loaded.social: GitHub: https://github.com/Dueot || github E-Mail: mailto:sean_info@163.com || envelope
social_icons: enable: true icons_only: false transition: false
links_settings: icon: link title: Links
layout: block
links:
avatar:
url: /images/avatar.jpg
rounded: true
rotated: true
toc: enable: true
number: true
wrap: false
expand_all: true
toc_max_depth
in Front-matter.max_depth: 6
sidebar:
position: right
Muse | Mist: 320
display: always
offset: 12
onmobile: false
chat: enable: false
icon: comment # Icon name in Font Awesome, set false to disable icon. text: Chat # Button text, change it as you wish.
scroll_to_more: true
excerpt_description: true
auto_excerpt: enable: false length: 150
read_more_btn: true
post_meta: item_text: true created_at: true updated_at: enable: true another_day: true categories: true
symbols_count_time: separated_meta: false item_text_post: true item_text_total: false awl: 4 wpm: 275 suffix: mins.
tag_icon: true
wechat_subscriber: enable: false qcode: #/uploads/wechat-qcode.jpg
reward_settings:
reward: true | false
in Front-matter.enable: false animation: false
reward:
related_posts: enable: false title: # Custom header, leave empty to use the default one display_in_home: false params: maxCount: 5
#isDate: false
#isImage: false
#isExcerpt: false
post_edit: enable: false
cheers: true
tagcloud:
enable: false
min: 12 # Minimun font size in px max: 30 # Maxium font size in px start: "#ccc" # Start color (hex, rgba, hsla or color keywords) end: "#111" # End color (hex, rgba, hsla or color keywords) amount: 200 # Amount of tags, change it if you have more than 200 tags
calendar:
calendar_id:
text_align:
desktop: justify mobile: justify
mobile_layout_economy: false
android_chrome_color: "#222"
safari_rainbow: false
custom_scrollbar: false
custom_logo: #/uploads/custom-logo.jpg
codeblock:
highlight_theme: normal
copy_button: enable: false
show_result: false
# Available values: default | flat | mac
style:
back2top: enable: true
sidebar: false
scrollpercent: true
reading_progress: enable: false
position: top color: "#37c6c0" height: 2px
bookmark: enable: false
color: "#222"
save: auto
Follow me on GitHub
banner in the top-right corner.github_banner: enable: false permalink: https://github.com/yourname title: Follow me on GitHub
global
(and title
):font:
external
and family
.enable: false
host:
external: true
will load this font family from host
above.family: Times New Roman
. Without any quotes.size: x.x
. Use em
as unit. Default: 1 (16px)global: external: true family: Lato size:
title: external: true family: size:
headings: external: true family: size:
posts: external: true family:
and code blocks.
codes: external: true family:
vendors
math: enable: false
mathjax: true
in Front-matter.per_page: true
mathjax: enable: false
mhchem: false
katex: enable: false
copy_tex: false
pjax: true
fancybox: true
fancybox
and mediumzoom
.mediumzoom: false
lazyload: false
pangu: true
quicklink: enable: true
quicklink: true
in Front-matter of the page or post you need.home: true archive: true
delay: true
timeout: 3000
priority: true
ignores:
comments:
style: tabs
active: valine
true
means remembering the comment system selected by the visitor.storage: true
nav:
# text: Load Disqus
# order: -1
#facebook_comments_plugin:
# text: <i class="fa fa-facebook-official" aria-hidden="true"></i> facebook
#gitalk:
# order: -2
disqus: enable: false shortname: count: true lazyload: false
disqusjs: enable: false
api: apikey: # Register new application from https://disqus.com/api/applications/ shortname: # See: https://disqus.com/admin/settings/general/
changyan: enable: false appid: appkey:
valine: enable: true # When enable is set to be true, leancloud_visitors is recommended to be closed for the re-initialization problem within different leancloud adk version appid: g94X7TBtE2gAox2Jxs0ik3XA-gzGzoHsz appkey: nqnUW7G77P36Jb61Rn1l4Dhi notify: false # Mail notifier. See: https://github.com/xCss/Valine/wiki verify: false # Verification code placeholder: 您的评论可以一针见血 (^ω^)~~ # Comment box placeholder avatar: wavatar # Gravatar style guest_info: nick,mail,link # Custom comment header pageSize: 10 # Pagination size language: zh-cn # Language, available values: en, zh-cn visitor: true # leancloud-counter-security is not supported for now. When visitor is set to be true, appid and appkey are recommended to be the same as leancloud_visitors' for counter compatibility. Article reading statistic https://valine.js.org/visitor.html comment_count: false # If false, comment count will only be displayed in post page, not in home page highlight: true # 代码高亮
livere_uid: #
gitalk: enable: false github_id: # GitHub repo owner repo: # Repository name to store issues client_id: # GitHub Application Client ID client_secret: # GitHub Application Client Secret admin_user: # GitHub repo owner and collaborators, only these guys can initialize gitHub issues distraction_free_mode: true # Facebook-like distraction free mode
language:
facebook_sdk:
enable: false
app_id: #
facebook_comments_plugin: enable: false num_of_posts: 10 # Minimum posts num is 1 width: 100% # Default width is 550px scheme: light # Default scheme is light (light or dark)
vkontakte_api:
enable: false
app_id: #
rating:
enable: false
id: #
add_this_id:
baidu_analytics: #
growingio_analytics: #
google_analytics:
tracking_id: #
cnzz_siteid: 1265181742
application_insights:
leancloud_visitors: enable: false app_id: g94X7TBtE2gAox2Jxs0ik3XA-gzGzoHsz app_key: nqnUW7G77P36Jb61Rn1l4Dhi
security
to false
.security: true betterPerformance: false
firestore: enable: false collection: articles # Required, a string collection name to access firestore database apiKey: # Required projectId: # Required
busuanzi_count: enable: ture total_visitors: true total_visitors_icon: bug total_views: true total_views_icon: eye post_views: false post_views_icon: eye
tencent_analytics: #
tencent_mta: #
algolia_search: enable: false hits: per_page: 10 labels: input_placeholder: Search for Posts hits_empty: "We didn't find any results for the search: ${query}" hits_stats: "${hits} results found in ${time} ms"
local_search: enable: true
trigger: auto
top_n_per_article: 3
unescape: true
preload: false
swiftype_key:
chatra: enable: false async: true id: # Visit Dashboard to get your ChatraID
tidio: enable: false key: # Public Key, get it from dashboard. See: https://www.tidiochat.com/panel/settings/developer
note:
style: simple icons: false border_radius: 3
light_bg_offset: 0
tabs: transition: tabs: false labels: true border_radius: 0
cdn
setting is only for pdfObject, because cdn for pdf.js might be blocked by CORS policy.pdf: enable: false
height: 500px
mermaid: enable: false
theme: forest
motion: enable: true async: false transition:
# fadeIn | fadeOut | flipXIn | flipXOut | flipYIn | flipYOut | flipBounceXIn | flipBounceXOut | flipBounceYIn | flipBounceYOut
# swoopIn | swoopOut | whirlIn | whirlOut | shrinkIn | shrinkOut | expandIn | expandOut
# bounceIn | bounceOut | bounceUpIn | bounceUpOut | bounceDownIn | bounceDownOut | bounceLeftIn | bounceLeftOut | bounceRightIn | bounceRightOut
# slideUpIn | slideUpOut | slideDownIn | slideDownOut | slideLeftIn | slideLeftOut | slideRightIn | slideRightOut
# slideUpBigIn | slideUpBigOut | slideDownBigIn | slideDownBigOut | slideLeftBigIn | slideLeftBigOut | slideRightBigIn | slideRightBigOut
# perspectiveUpIn | perspectiveUpOut | perspectiveDownIn | perspectiveDownOut | perspectiveLeftIn | perspectiveLeftOut | perspectiveRightIn | perspectiveRightOut
post_block: fadeIn
post_header: slideDownIn
post_body: slideDownIn
coll_header: slideLeftIn
# Only for Pisces | Gemini.
sidebar: slideUpIn
pace: enable: true
theme: bounce
three: enable: false delay: false # Set true to further delay loading
canvas_nest:
enable: false
onmobile: true # Display on mobile or not
color: "0,0,255" # RGB values, use ,
to separate
opacity: 0.5 # The opacity of line: 0~1
zIndex: -1 # z-index property of the background
count: 99 # The number of lines
canvas_ribbon: enable: false size: 300 # The width of the ribbon alpha: 0.6 # The transparency of the ribbon zIndex: -1 # The display level of the ribbon
vendors:
_internal: lib
anime:
fontawesome:
mathjax: mhchem:
katex: copy_tex_js: copy_tex_css:
pjax: //cdn.jsdelivr.net/gh/theme-next/theme-next-pjax@0/pjax.min.js
jquery: fancybox: fancybox_css:
mediumzoom:
lazyload:
pangu: //cdn.jsdelivr.net/npm/pangu@4/dist/browser/pangu.min.js
quicklink: //cdn.jsdelivr.net/npm/quicklink@1/dist/quicklink.umd.js
valine: //cdn.jsdelivr.net/npm/valine@1/dist/Valine.min.js
gitalk_js: gitalk_css:
algolia_instant_js: algolia_instant_css:
pdfobject:
mermaid:
velocity: velocity_ui:
pace: //cdn.jsdelivr.net/npm/pace-js@1/pace.min.js
pace_css: //cdn.jsdelivr.net/npm/pace-js@1/themes/blue/pace-theme-minimal.css
canvas_nest: //cdn.jsdelivr.net/gh/theme-next/theme-next-canvas-nest@1/canvas-nest.min.js canvas_nest_nomobile: //cdn.jsdelivr.net/gh/theme-next/theme-next-canvas-nest@1/canvas-nest-nomobile.min.js
canvas_ribbon:
css: css js: js images: images
cursor_effect: fireworks
typing_effect: colorful: true # 礼花特效 shake: false # 震动特效
# Available values: changyan | disqus | disqusjs | facebook_comments_plugin | gitalk | livere | valine | vkontakte
,错误的文件是它们的配置文件中随机的一个,但错误都相同TypeError: Cannot read property 'enable' of undefined
。
能否提供您的博客全部源代码?根据目前的信息无法debug
有点奇怪,按照您提供的源码,执行npm install
,然后将_config.yml
中的主题设置为next
,再执行hexo s
和hexo g
,似乎都没有问题
我也不太确定问题出在哪里了
您好,目前在我的机器上,复现bug 的方式是,执行两遍hexo clean and hexo g
,第一遍没有任何问题,当再次执行hexo clean hexo g
后,就会报错 。
建议您通过以下方式debug:
package-lock.json
和node_modules
,然后执行npm i
好的,祝您使用愉快!
Please check if your Issue fulfills the following requirements. 请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。
Issue Checklist
hexo clean
, cleared the browser cache and disabled all CDN services (e.g. Cloudflare Rocket Loader), this issue still exists.Expected behavior
正常工作
Actual behavior
hexo clean
,但我没有禁用任何CDN。以下是错误说明:
hexo g
之后会随机产生一个错误,目前错误都和评论插件有关。hexo
提交了issues,但目前没有回应。默认主题 ==> landscape
,运行正常。Steps to reproduce the behavior
node_modules
npm install
hexo clean
hexo g
Environment Information
Node.js and NPM Information
Package dependencies Information
Hexo Version
Hexo Configuration
NexT Configuration
Other Information
感谢您的帮助🙏