查看代码 ...
```yml
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: Hexo
subtitle: ''
description: ''
keywords:
author: John Doe
language: en
timezone: ''
# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: http://example.com
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
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: ''
```
Stun 配置信息:
查看代码 ...
```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
# ---------------------------------------------------------------
# The menu in the website header.
# Value before `||` is the target link, value after `||` is the name of FontAwesome icon.
# Usage(With Icon): `Key: /link/ || fa(s|r|l|d|b) fa-iconname`
# Usage(No Icon) : `Key: /link/`
# Select your icon name, see: 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.
# xxx1: javascript:; || fa(s|r|l|d|b) fa-xxx
# Secondary menu
submenu:
# Add item of secondary menu in here.
# xxx1:
# xxx1-1: /xxx1-1/ || fa(s|r|l|d|b) fa-xxx
# xxx1-2: /xxx1-2/ || fa(s|r|l|d|b) fa-xxx
menu_settings:
# Only show by icon.
icon_only: false
# Only show by text.
text_only: false
# ---------------------------------------------------------------
# Site config
# ---------------------------------------------------------------
favicon:
small: /images/icons/favicon-16x16.png
medium: /images/icons/favicon-32x32.png
# ! --------------------------------------------------
# ! If you don't know the following, please ignore it.
# ! --------------------------------------------------
# apple_touch_icon: /images/icons/apple-touch-icon.png
# safari_pinned_tab: /images/icons/stun-logo.svg
# msapplication: /images/icons/favicon-144x144.png
# 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
night_mode:
enable: true
# The button of switching to the night mode.
button:
# Color of button (Please use "" to wrap the value).
color: "#fafafa"
# Background color of button (Please use "" to wrap the value).
bg_color: "#8c8a8a"
# The icon that stand for day and night.
icon:
dark: 🌜
light: 🌞
# The layout for sidebar and content of site.
layout:
# The width of the content area in website.
content: 768px
# The width of the sidebar in website.
sidebar: 300px
# The width between the content and the sidebar.
content_sidebar_gap: 30px
# The padding property of the main tag.
# e.g. Usage:
# 20px
# 20px 30px
# 20px 20px 30px
# 20px 30px 40px 25px
main_padding:
# Take effect when screen width in: [768px, Infinity)
default: 20px
# Take effect when screen width in: [576px, 768px)
tablet: 15px
# Take effect when screen width in: [0px, 576px)
mobile: 10px
# The header of site.
header:
enable: true
show_on:
# Whether to show on the article page.
post: true
# If you set a percentage, it will be calculated based on the height of screen (Supports all CSS units)
height: 80%
# Background image of site header.
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 effect of the background image.
mask:
enable: false
# Opacity of the mask (value: 0 ~ 1)
opacity: 0.5
nav:
# Height of the navigation bar (Supports all CSS units)
height: 50px
# Background color of the navigation bar (Please use "" to wrap the value).
bg_color: "#333"
# The icon that prompts the user to pull down.
scroll_down_icon:
enable: false
# Icon name in FontAwesome, see: https://fontawesome.com/icons
name: fas fa-angle-down
animation: true
# The body of site.
body:
# Background image of site body.
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:
# Whether to fixed the background image.
fixed: true
# Whether to repeat the image as much as possible to cover the entire area.
repeat: false
# Mask effect of the background image.
mask:
enable: false
# Opacity of mask (value: 0 ~ 1)
opacity:
# Opacity of the mask by default.
default: 0.1
# Opacity of the mask in night mode.
night_mode: 0.6
# The footer of site.
footer:
# Background image of site 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 effect of the background image.
mask:
enable: false
# Opacity of mask (value: 0 ~ 1)
opacity: 0.5
# Copyright information.
copyright:
enable: true
# If not set, will be used `author` from Hexo main config (e.g. liuyib All Rights Reserved)
text:
# Start time. If not set, the current year will be used.
since:
# End time. If not set, the current year will be used.
end:
# The icon between the copyright and the owner.
icon:
enable: true
# Icon name in FontAwesome, see: https://fontawesome.com/icons
name: fas fa-heart
# Heartbeat animation.
animation: false
# (Please use "" to wrap the value)
color: "#ff0000"
# Hexo link
powered:
enable: true
# Whether to show version after Hexo link (e.g. vX.X.X)
version: true
# Theme link
theme:
enable: true
# Whether to show version after theme link (e.g. vX.X.X)
version: true
# Beian information for Chinese users, see: http://www.miitbeian.gov.cn/
beian:
enable: false
# 备案 XXXXXXXX 号
icp:
# Any custom text (e.g. Hosted by Github Pages)
custom:
enable: false
text:
# Creative Commons 4.0 International License
creative_commons:
enable: true
# Optional values: BY | BY-SA | BY-ND | BY-NC | BY-NC-SA | BY-NC-ND
# For details, please see: https://creativecommons.org/share-your-work/licensing-types-examples/
license: BY-NC-SA
# Show the CC license in the sidebar.
sidebar: true
# Show the CC license at the post bottom.
post: true
# Optional values:
# 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
# If not set, `en` will be used by default.
language:
# Back to top
back2top:
enable: true
icon:
# Icon name in FontAwesome, see: https://fontawesome.com/icons
name: fas fa-rocket
# Rotation Angle of icon.
rotate: -45deg
# (Please use "" to wrap the value)
color: "#49b1f5"
# Color when the mouse hovers it (Please use "" to wrap the value)
hover_color: "#fc6423"
# ---------------------------------------------------------------
# Sidebar config
# ---------------------------------------------------------------
# The sidebar of site.
sidebar:
enable: true
# Optional values: left | right
position: right
# The distance from the top of the page when the sidebar is fixed (Only `px` unit is supported)
offsetTop: 20px
# Whether to show horizon line.
horizon_line: false
author:
enable: true
# Avatar in the site sidebar.
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: /images/icons/stun-logo.svg
# If true, the avatar would be displayed in a circle.
rounded: false
# Opacity of avatar (value: 0 ~ 1)
opacity: 1
# Mouse hover animation
# Optional values: turn | shake
animation: turn
# Your favorite motto.
motto: hello world
# Social links
# Value before `||` is the target link, value after `||` is the name of FontAwesome icon.
# Usage: `Key: /link/ || fa(s|r|l|d|b) fa-iconname`
# Select your icon name, see: https://fontawesome.com/icons
# If you can`t find a suitable icon, you can choose to display text by adding the `origin:` prefix.
# e.g. `origin:sf`, so `sf` will be displayed.
social:
github: https://github.com/ || fab fa-github
google: https://plus.google.com/ || fab fa-google
twitter: https://twitter.com/ || fab fa-twitter
youtube: https://youtube.com/ || fab fa-youtube
# segmentfault: https://segmentfault.com/ || origin:sf
# weibo: https://weibo.com/ || fab fa-weibo
# zhihu: https://www.zhihu.com/ || origin:知
# wechat: yournumber || fab fa-weixin
# telegram: yournumber || fab fa-telegram
# qq: yournumber || fab fa-qq
social_setting:
enable: false
# Only show by icon.
icon_only: true
# Table Of Contents in the Sidebar.
toc:
enable: true
# Automatically add list number to toc.
list_number: true
# If true, all words will be placed on the next lines when they overflow.
wrap: true
# If true, the toc of post will always be displayed, rather than the activated part of it.
expand_all: false
# Minimum heading depth of generated toc.
# You can also set it in Front-matter by `toc_max_depth`.
min_depth: 1
# You can also set it in Front-matter by `toc_min_depth`.
# Maximum heading depth of generated toc.
max_depth: 6
# Subscribe of email and rss.
feed:
enable: false
# Enter your email subscription link (e.g. http://eepurl.com/guAE6j)
email:
# Enter the rss address of you set (e.g. /atom.xml)
# Dependency: https://github.com/hexojs/hexo-generator-feed/
# !!! Don't enable this before install dependency by `npm install hexo-generator-feed --save` in hexo root directory.
rss:
# The reading progress of post.
reading_progress:
enable: true
# (Please use "" to wrap the value)
color: "#fc6423"
height: 1px
# ---------------------------------------------------------------
# Page config
# ---------------------------------------------------------------
codeblock:
# The style of code block.
# Optional values: default | simple | carbon
style: default
# The theme of code highlight.
# Optional values: light | dark | ocean
highlight: light
# Whether to wrap when code overflow.
word_wrap: false
# Add a line below h1, h2 tags.
heading_line: true
# Reward QR Code
reward:
enable: false
# Your QR code for collecting money.
alipay:
wechat:
# ---------------------------------------------------------------
# Post config
# ---------------------------------------------------------------
# The information of post.
post_meta:
# Only show by icon.
icon_only: false
# The create time of post.
created:
enable: true
# Icon name in FontAwesome, see: https://fontawesome.com/icons
icon: far fa-calendar-plus
# The update time of post.
updated:
enable: true
# Icon name in FontAwesome, see: https://fontawesome.com/icons
icon: far fa-calendar-check
# The approximate reading time of post.
# Dependency: https://github.com/willin/hexo-wordcount/
# !!! Don't enable this before install dependency by `npm install hexo-wordcount --save` in hexo root directory.
reading_time:
enable: false
# Icon name in FontAwesome, see: https://fontawesome.com/icons
icon: far fa-clock
# Set reading speed to count reading time.
speed:
# Reading speed of zh-CN.
zh: 200
# Reading speed of en-US.
en: 80
# Counting the words of post.
# Dependency: https://github.com/willin/hexo-wordcount/
# !!! Don't enable this before install dependency by `npm install hexo-wordcount --save` in hexo root directory.
word_count:
enable: false
# Icon name in FontAwesome, see: https://fontawesome.com/icons
icon: far fa-file-word
# The article list on the homepage or archives page.
post_list:
# Whether to paginate.
paginate:
home: true
archives: false
# Whether to show the cover image of post.
cover_image:
home: false
# The widget of post.
post_widget:
# Whether to show tags at the bottom of post.
tags: true
# Whether to show "------ END ------" at the bottom of post.
end_text:
enable: true
# Whether to show a horizon line before "------ END ------".
horizon_line: true
# Article sharing
share:
enable: false
# The text displayed before the share button.
label: "Share to: "
# Optional values: qzone | qq | weibo | wechat | douban | linkedin | facebook | twitter | google
target: qzone, qq, weibo, wechat, douban, linkedin, facebook, twitter, google
# Stick post to the top
# Dependency: https://github.com/netcan/hexo-generator-index-pin-top/
# !!! Don't enable this before install dependency by `npm install hexo-generator-index-pin-top --save` in hexo directory.
stick_top:
# Position of icon
# Optional values: left | right
position: right
# Icon name in FontAwesome, see: https://fontawesome.com/icons
icon: fas fa-thumbtack
# Rotation Angle of icon.
rotate: 45deg
# (Please use "" to wrap the value)
color: "#999"
# ---------------------------------------------------------------
# Comment config
# ---------------------------------------------------------------
# Gittalk
# See: https://github.com/gitalk/gitalk/
gitalk:
enable: false
# Github username.
owner:
# Github repository.
repo:
# Github Application Client ID.
client_id:
# Github Application Client Secret.
client_secret:
# GitHub repo owner and collaborators, only these guys can initialize github issues.
admin:
# Facebook-like distraction free mode.
distraction_free_mode: false
# Gitalk'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 | es-ES | fr | ru | zh-TW
language:
# Waline
# See: https://waline.js.org/
waline:
enable: false
# The URL of your server.
serverURL:
# Comment box placeholder.
placeholder: Just go go
# Gravatar style.
avatar: mp
# Custom comment header.
meta: nick,mail,link
# The number of comments per page.
pageSize: 10
# Optional values: en | zh-CN | zh-TW | jp
lang: zh-CN,zh-TW,en
# Article reading statistics.
visitor: false
# Valine
# See: https://valine.js.org/quickstart.html
valine:
enable: false
# Your leancloud application appid.
appid:
# Your leancloud application appkey.
appkey:
# Mail notifier.
notify: true
# Verification code.
verify: true
# Comment box placeholder.
placeholder: Just go go
# Gravatar style.
avatar: mp
# Custom comment header.
meta: nick,mail,link
# Pagination size.
pageSize: 10
# Article reading statistics.
visitor: false
# Whether to record the commenter IP.
recordIP: false
# Optional values: en | zh-cn
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
# See: https://www.livere.com/
livere:
enable: false
uid:
# Disqus
# See: https://disqus.com/
disqus:
enable: false
shortname:
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
# Facebook Comments
# See: https://developers.facebook.com/docs/plugins/comments
fbcomments:
enable: false
# The ID of your own Facebook App.
appId:
# See: https://developers.facebook.com/docs/internationalization#locales
# Example: en_US | zh_CN | zh_HK ... and so on. For detail, see: ☝
lang: en_US
# Number of comments displayed by default.
numPosts: 10
# See: https://developers.facebook.com/docs/plugins/comments#sorting
# Optional values: social | reverse_time | time
order_by: reverse_time
# Optional values: true | false
lazy: true
# Whether to optimize the display on the mobile.
# Optional values: true | false
mobile: true
width: 100%
# ---------------------------------------------------------------
# Statistics and Analytics config
# ---------------------------------------------------------------
# Busuanzi statistics
# See: https://busuanzi.ibruce.info/
busuanzi:
enable: false
# Only show by icon.
icon_only: false
# Number of unique visitor to the entire site.
site_uv:
enable: true
# Icon name in FontAwesome, see: https://fontawesome.com/icons
icon: fas fa-user
# Number of page view to the entire site.
site_pv:
enable: true
icon: fas fa-eye
# Number of page view to a post.
post_pv:
enable: true
icon: fas fa-eye
# Google analytics ID
# See: https://analytics.google.com/
google_analytics:
# Baidu analytics ID
# See: https://tongji.baidu.com/
baidu_analytics:
# Tencent analytics ID
# See: 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
# Auxiliary search buttons
# ! -----------------------------------------------------------------------------------------
# ! This feature can only be enabled if either `algolia_search` or `local_search` is enabled.
# ! -----------------------------------------------------------------------------------------
assist_search:
enable: false
# Show the Google Search button. Use `www.google.com` to search for what you type.
google: true
# Show the Bing Search button. Use `www.bing.com` to search for what you type.
bing: true
# Show the Baidu Search button. Use `www.baidu.com` to search for what you type.
baidu: true
# ---------------------------------------------------------------
# Background config
# ---------------------------------------------------------------
# Canvas-ribbon
# Dependency: https://github.com/hustcc/ribbon.js
canvas_ribbon:
enable: false
# The width of the ribbon.
size: 120
# The transparency of the ribbon.
alpha: 0.6
# The display level of the ribbon.
zIndex: -1
# Canvas-nest
# Dependency: https://github.com/hustcc/canvas-nest.js
canvas_nest:
enable: false
# Color of lines.
# RGB values, use `,` to separate.
color: "0,0,0"
# The opacity of lines (value: 0 ~ 1)
opacity: 0.6
# The number of lines.
count: 99
# `z-index` property of the background.
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://theme-stun.github.io/docs/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
# See: https://fancyapps.com/fancybox/3/
fancybox: false
# Click to enlarge picture.
zoom_image:
enable: true
# The color of mask.
# (Please use "" to wrap the value)
mask_color: "rgba(0,0,0,0.6)"
# The gap between image and a edge of screen when image is enlarged.
# (Only `px` unit is supported)
gap_aside: 20px
# If you are use "photos" attribute in the Front-matter,
# you can enable this to show images in waterfalls flow.
# See: https://github.com/desandro/masonry/
gallery_waterfall:
enable: false
col_width: 220px
gap_x: 10px
gap_y: 10px
# Lazy load the images of post.
# See: https://github.com/tuupola/lazyload
lazyload:
enable: false
# Optional values: gif | block
placeholder: gif
# Quicklink support
# See: https://github.com/GoogleChromeLabs/quicklink/
quicklink:
enable: false
# Quicklink (quicklink.umd.js script) is loaded on demand.
# Add `quicklink: true` in Front-matter of the page or post you need.
# Home page and archive page can be controlled through home and archive options below.
home: true
archive: true
# Initialize quicklink after the load event fires.
delay: true
# Custom a time in milliseconds by which the browser must execute prefetching.
timeout: 10000
# Enable fetch() or falls back to XHR.
priority: true
# For more flexibility you can add some patterns (RegExp, Function, or Array) to ignores.
# See: https://github.com/GoogleChromeLabs/quicklink#custom-ignore-patterns
# ! --------------------------------------------------
# ! If you don't know the following, please ignore it.
# ! --------------------------------------------------
ignores:
- /\/api\/?/
- uri => uri.includes('.xml')
- uri => uri.includes('.zip')
- (uri, el) => el.hasAttribute('nofollow')
- (uri, el) => el.hasAttribute('noprefetch')
# Pjax
# See: https://github.com/MoOx/pjax/
pjax:
enable: false
# When switching pages, scroll to the bottom of the top image.
avoid_banner: false
# ! --------------------------------------------------
# ! If you don't know the following, please ignore it.
# ! --------------------------------------------------
# Please see: https://github.com/MoOx/pjax/#options
elements:
selectors:
switches:
switchesOptions:
history: true
# If you enable this, you must set `avoid_banner: false` firstly.
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
# The links with `target="_blank"` attribute.
external_link:
# Adding an icon make it easier for users to know that this is an external link.
icon:
enable: true
# Icon name in FontAwesome, see: https://fontawesome.com/icons
name: fas fa-external-link-alt
# (Please use "" to wrap the value)
color: "#aaa"
# The shortcuts of the site.
shortcuts:
# Switch to the prev / next post by key.
# `Ctrl + ←` is the shortcuts to prev post.
# `Ctrl + →` is the shortcuts to next post.
switch_post:
enable: false
# Tag cloud
# If not used, comment it or ignore it.
tag_cloud:
# (Please use "" to wrap the value)
start_color: "#a4d8fa"
end_color: "#49b1f5"
# Size for tag.
min_size: 16
max_size: 26
# Maximum number of tags displayed. Change it if you have more than 200 tags.
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
waline_visitor: fas fa-eye
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
google: fab fa-google
# bing: fab fa-bing # not exist
# 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:
# Waline
# See: https://github.com/lizheming/waline
# Example:
# waline: //unpkg.com/@waline/client@0.8.5/dist/Waline.min.js
waline:
# 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:
```
预期行为
执行 hexo g 后应在public文件夹内生成所有文件
实际行为
生成 index.css 时报错,生成了空文件
重现步骤
其他信息
报错信息 ...
```
F:\blog>hexo g
INFO Validating config
INFO Start processing
INFO Files loaded in 4.09 s
ERROR {
err: OperationalError: F:\blog\themes\stun\source\css\index.styl:12:32
8| // --------------------------------------------------
9| @import './_common/index.styl';
10| // Custom Layer
11| // --------------------------------------------------
12| @import './_custom/index.styl';
--------------------------------------^
13|
failed to locate @import file F:\blog\node_modules\stylus\lib\functions\index.styl
at Evaluator.visitImport (F:\blog\node_modules\stylus\lib\visitor\evaluator.js:915:21)
... 20 lines matching cause stack trace ...
at processImmediate (node:internal/timers:466:21) {
cause: Error: F:\blog\themes\stun\source\css\index.styl:12:32
8| // --------------------------------------------------
9| @import './_common/index.styl';
10| // Custom Layer
11| // --------------------------------------------------
12| @import './_custom/index.styl';
--------------------------------------^
13|
failed to locate @import file F:\blog\node_modules\stylus\lib\functions\index.styl
at Evaluator.visitImport (F:\blog\node_modules\stylus\lib\visitor\evaluator.js:915:21)
at Evaluator.Visitor.visit (F:\blog\node_modules\stylus\lib\visitor\index.js:28:40)
at Evaluator.visit (F:\blog\node_modules\stylus\lib\visitor\evaluator.js:160:18)
at Evaluator.visitRoot (F:\blog\node_modules\stylus\lib\visitor\evaluator.js:707:27)
at Evaluator.Visitor.visit (F:\blog\node_modules\stylus\lib\visitor\index.js:28:40)
at Evaluator.visit (F:\blog\node_modules\stylus\lib\visitor\evaluator.js:160:18)
at Evaluator.evaluate (F:\blog\node_modules\stylus\lib\visitor\evaluator.js:247:15)
at Renderer.render (F:\blog\node_modules\stylus\lib\renderer.js:86:26)
at Hexo.stylusFn (F:\blog\node_modules\hexo-renderer-stylus\lib\renderer.js:59:6)
at Hexo.tryCatcher (F:\blog\node_modules\bluebird\js\release\util.js:16:23)
at Hexo.ret (eval at makeNodePromisifiedEval (C:\Users\clove\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\bluebird\js\release\promisify.js:184:12), :13:39)
at F:\blog\node_modules\hexo\lib\hexo\render.js:81:22
at tryCatcher (F:\blog\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (F:\blog\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (F:\blog\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (F:\blog\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (F:\blog\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (F:\blog\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (F:\blog\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (F:\blog\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (F:\blog\node_modules\bluebird\js\release\async.js:15:14)
at processImmediate (node:internal/timers:466:21) {
lineno: 12,
column: 32,
filename: 'F:\\blog\\themes\\stun\\source\\css\\index.styl',
stylusStack: '',
input: '// Variables Layer\r\n' +
'// --------------------------------------------------\r\n' +
"@import './_variables/index.styl';\r\n" +
'// Mixins Layer\r\n' +
'// --------------------------------------------------\r\n' +
"@import './_mixins/index.styl';\r\n" +
'// Common Layer\r\n' +
'// --------------------------------------------------\r\n' +
"@import './_common/index.styl';\r\n" +
'// Custom Layer\r\n' +
'// --------------------------------------------------\r\n' +
"@import './_custom/index.styl';\r\n"
},
isOperational: true,
lineno: 12,
column: 32,
filename: 'F:\\blog\\themes\\stun\\source\\css\\index.styl',
stylusStack: '',
input: '// Variables Layer\r\n' +
'// --------------------------------------------------\r\n' +
"@import './_variables/index.styl';\r\n" +
'// Mixins Layer\r\n' +
'// --------------------------------------------------\r\n' +
"@import './_mixins/index.styl';\r\n" +
'// Common Layer\r\n' +
'// --------------------------------------------------\r\n' +
"@import './_common/index.styl';\r\n" +
'// Custom Layer\r\n' +
'// --------------------------------------------------\r\n' +
"@import './_custom/index.styl';\r\n"
}
} Asset render failed: %s css/index.css
(node:12192) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:12192) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:12192) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:12192) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:12192) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:12192) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
INFO 0 files generated in 265 ms
```
我想创建一个新的 issue
环境信息
Stun 版本: 2.6.2
Hexo 版本: 6.2.0
平台信息: Windows 10
浏览器信息: Edge
Node.js 和 NPM 版本: v16.14.0 8.5.2
NPM 依赖信息: hexo-site@0.0.0 F:\blog ├── hexo-generator-archive@1.0.0 ├── hexo-generator-category@1.0.0 ├── hexo-generator-index@2.0.0
├── hexo-generator-tag@1.0.0
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-marked@5.0.0
├── hexo-renderer-pug@3.0.0
├── hexo-renderer-stylus@2.0.1
├── hexo-server@3.0.0 ├── hexo-theme-landscape@0.0.3
└── hexo@6.2.0
Hexo 配置信息:
查看代码 ...
```yml # Hexo Configuration ## Docs: https://hexo.io/docs/configuration.html ## Source: https://github.com/hexojs/hexo/ # Site title: Hexo subtitle: '' description: '' keywords: author: John Doe language: en timezone: '' # URL ## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project' url: http://example.com 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 # Deployment ## Docs: https://hexo.io/docs/one-command-deployment deploy: type: '' ```Stun 配置信息:
查看代码 ...
```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 # --------------------------------------------------------------- # The menu in the website header. # Value before `||` is the target link, value after `||` is the name of FontAwesome icon. # Usage(With Icon): `Key: /link/ || fa(s|r|l|d|b) fa-iconname` # Usage(No Icon) : `Key: /link/` # Select your icon name, see: 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. # xxx1: javascript:; || fa(s|r|l|d|b) fa-xxx # Secondary menu submenu: # Add item of secondary menu in here. # xxx1: # xxx1-1: /xxx1-1/ || fa(s|r|l|d|b) fa-xxx # xxx1-2: /xxx1-2/ || fa(s|r|l|d|b) fa-xxx menu_settings: # Only show by icon. icon_only: false # Only show by text. text_only: false # --------------------------------------------------------------- # Site config # --------------------------------------------------------------- favicon: small: /images/icons/favicon-16x16.png medium: /images/icons/favicon-32x32.png # ! -------------------------------------------------- # ! If you don't know the following, please ignore it. # ! -------------------------------------------------- # apple_touch_icon: /images/icons/apple-touch-icon.png # safari_pinned_tab: /images/icons/stun-logo.svg # msapplication: /images/icons/favicon-144x144.png # 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 night_mode: enable: true # The button of switching to the night mode. button: # Color of button (Please use "" to wrap the value). color: "#fafafa" # Background color of button (Please use "" to wrap the value). bg_color: "#8c8a8a" # The icon that stand for day and night. icon: dark: 🌜 light: 🌞 # The layout for sidebar and content of site. layout: # The width of the content area in website. content: 768px # The width of the sidebar in website. sidebar: 300px # The width between the content and the sidebar. content_sidebar_gap: 30px # The padding property of the main tag. # e.g. Usage: # 20px # 20px 30px # 20px 20px 30px # 20px 30px 40px 25px main_padding: # Take effect when screen width in: [768px, Infinity) default: 20px # Take effect when screen width in: [576px, 768px) tablet: 15px # Take effect when screen width in: [0px, 576px) mobile: 10px # The header of site. header: enable: true show_on: # Whether to show on the article page. post: true # If you set a percentage, it will be calculated based on the height of screen (Supports all CSS units) height: 80% # Background image of site header. 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 effect of the background image. mask: enable: false # Opacity of the mask (value: 0 ~ 1) opacity: 0.5 nav: # Height of the navigation bar (Supports all CSS units) height: 50px # Background color of the navigation bar (Please use "" to wrap the value). bg_color: "#333" # The icon that prompts the user to pull down. scroll_down_icon: enable: false # Icon name in FontAwesome, see: https://fontawesome.com/icons name: fas fa-angle-down animation: true # The body of site. body: # Background image of site body. 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: # Whether to fixed the background image. fixed: true # Whether to repeat the image as much as possible to cover the entire area. repeat: false # Mask effect of the background image. mask: enable: false # Opacity of mask (value: 0 ~ 1) opacity: # Opacity of the mask by default. default: 0.1 # Opacity of the mask in night mode. night_mode: 0.6 # The footer of site. footer: # Background image of site 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 effect of the background image. mask: enable: false # Opacity of mask (value: 0 ~ 1) opacity: 0.5 # Copyright information. copyright: enable: true # If not set, will be used `author` from Hexo main config (e.g. liuyib All Rights Reserved) text: # Start time. If not set, the current year will be used. since: # End time. If not set, the current year will be used. end: # The icon between the copyright and the owner. icon: enable: true # Icon name in FontAwesome, see: https://fontawesome.com/icons name: fas fa-heart # Heartbeat animation. animation: false # (Please use "" to wrap the value) color: "#ff0000" # Hexo link powered: enable: true # Whether to show version after Hexo link (e.g. vX.X.X) version: true # Theme link theme: enable: true # Whether to show version after theme link (e.g. vX.X.X) version: true # Beian information for Chinese users, see: http://www.miitbeian.gov.cn/ beian: enable: false # 备案 XXXXXXXX 号 icp: # Any custom text (e.g. Hosted by Github Pages) custom: enable: false text: # Creative Commons 4.0 International License creative_commons: enable: true # Optional values: BY | BY-SA | BY-ND | BY-NC | BY-NC-SA | BY-NC-ND # For details, please see: https://creativecommons.org/share-your-work/licensing-types-examples/ license: BY-NC-SA # Show the CC license in the sidebar. sidebar: true # Show the CC license at the post bottom. post: true # Optional values: # 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 # If not set, `en` will be used by default. language: # Back to top back2top: enable: true icon: # Icon name in FontAwesome, see: https://fontawesome.com/icons name: fas fa-rocket # Rotation Angle of icon. rotate: -45deg # (Please use "" to wrap the value) color: "#49b1f5" # Color when the mouse hovers it (Please use "" to wrap the value) hover_color: "#fc6423" # --------------------------------------------------------------- # Sidebar config # --------------------------------------------------------------- # The sidebar of site. sidebar: enable: true # Optional values: left | right position: right # The distance from the top of the page when the sidebar is fixed (Only `px` unit is supported) offsetTop: 20px # Whether to show horizon line. horizon_line: false author: enable: true # Avatar in the site sidebar. 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: /images/icons/stun-logo.svg # If true, the avatar would be displayed in a circle. rounded: false # Opacity of avatar (value: 0 ~ 1) opacity: 1 # Mouse hover animation # Optional values: turn | shake animation: turn # Your favorite motto. motto: hello world # Social links # Value before `||` is the target link, value after `||` is the name of FontAwesome icon. # Usage: `Key: /link/ || fa(s|r|l|d|b) fa-iconname` # Select your icon name, see: https://fontawesome.com/icons # If you can`t find a suitable icon, you can choose to display text by adding the `origin:` prefix. # e.g. `origin:sf`, so `sf` will be displayed. social: github: https://github.com/ || fab fa-github google: https://plus.google.com/ || fab fa-google twitter: https://twitter.com/ || fab fa-twitter youtube: https://youtube.com/ || fab fa-youtube # segmentfault: https://segmentfault.com/ || origin:sf # weibo: https://weibo.com/ || fab fa-weibo # zhihu: https://www.zhihu.com/ || origin:知 # wechat: yournumber || fab fa-weixin # telegram: yournumber || fab fa-telegram # qq: yournumber || fab fa-qq social_setting: enable: false # Only show by icon. icon_only: true # Table Of Contents in the Sidebar. toc: enable: true # Automatically add list number to toc. list_number: true # If true, all words will be placed on the next lines when they overflow. wrap: true # If true, the toc of post will always be displayed, rather than the activated part of it. expand_all: false # Minimum heading depth of generated toc. # You can also set it in Front-matter by `toc_max_depth`. min_depth: 1 # You can also set it in Front-matter by `toc_min_depth`. # Maximum heading depth of generated toc. max_depth: 6 # Subscribe of email and rss. feed: enable: false # Enter your email subscription link (e.g. http://eepurl.com/guAE6j) email: # Enter the rss address of you set (e.g. /atom.xml) # Dependency: https://github.com/hexojs/hexo-generator-feed/ # !!! Don't enable this before install dependency by `npm install hexo-generator-feed --save` in hexo root directory. rss: # The reading progress of post. reading_progress: enable: true # (Please use "" to wrap the value) color: "#fc6423" height: 1px # --------------------------------------------------------------- # Page config # --------------------------------------------------------------- codeblock: # The style of code block. # Optional values: default | simple | carbon style: default # The theme of code highlight. # Optional values: light | dark | ocean highlight: light # Whether to wrap when code overflow. word_wrap: false # Add a line below h1, h2 tags. heading_line: true # Reward QR Code reward: enable: false # Your QR code for collecting money. alipay: wechat: # --------------------------------------------------------------- # Post config # --------------------------------------------------------------- # The information of post. post_meta: # Only show by icon. icon_only: false # The create time of post. created: enable: true # Icon name in FontAwesome, see: https://fontawesome.com/icons icon: far fa-calendar-plus # The update time of post. updated: enable: true # Icon name in FontAwesome, see: https://fontawesome.com/icons icon: far fa-calendar-check # The approximate reading time of post. # Dependency: https://github.com/willin/hexo-wordcount/ # !!! Don't enable this before install dependency by `npm install hexo-wordcount --save` in hexo root directory. reading_time: enable: false # Icon name in FontAwesome, see: https://fontawesome.com/icons icon: far fa-clock # Set reading speed to count reading time. speed: # Reading speed of zh-CN. zh: 200 # Reading speed of en-US. en: 80 # Counting the words of post. # Dependency: https://github.com/willin/hexo-wordcount/ # !!! Don't enable this before install dependency by `npm install hexo-wordcount --save` in hexo root directory. word_count: enable: false # Icon name in FontAwesome, see: https://fontawesome.com/icons icon: far fa-file-word # The article list on the homepage or archives page. post_list: # Whether to paginate. paginate: home: true archives: false # Whether to show the cover image of post. cover_image: home: false # The widget of post. post_widget: # Whether to show tags at the bottom of post. tags: true # Whether to show "------ END ------" at the bottom of post. end_text: enable: true # Whether to show a horizon line before "------ END ------". horizon_line: true # Article sharing share: enable: false # The text displayed before the share button. label: "Share to: " # Optional values: qzone | qq | weibo | wechat | douban | linkedin | facebook | twitter | google target: qzone, qq, weibo, wechat, douban, linkedin, facebook, twitter, google # Stick post to the top # Dependency: https://github.com/netcan/hexo-generator-index-pin-top/ # !!! Don't enable this before install dependency by `npm install hexo-generator-index-pin-top --save` in hexo directory. stick_top: # Position of icon # Optional values: left | right position: right # Icon name in FontAwesome, see: https://fontawesome.com/icons icon: fas fa-thumbtack # Rotation Angle of icon. rotate: 45deg # (Please use "" to wrap the value) color: "#999" # --------------------------------------------------------------- # Comment config # --------------------------------------------------------------- # Gittalk # See: https://github.com/gitalk/gitalk/ gitalk: enable: false # Github username. owner: # Github repository. repo: # Github Application Client ID. client_id: # Github Application Client Secret. client_secret: # GitHub repo owner and collaborators, only these guys can initialize github issues. admin: # Facebook-like distraction free mode. distraction_free_mode: false # Gitalk'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 | es-ES | fr | ru | zh-TW language: # Waline # See: https://waline.js.org/ waline: enable: false # The URL of your server. serverURL: # Comment box placeholder. placeholder: Just go go # Gravatar style. avatar: mp # Custom comment header. meta: nick,mail,link # The number of comments per page. pageSize: 10 # Optional values: en | zh-CN | zh-TW | jp lang: zh-CN,zh-TW,en # Article reading statistics. visitor: false # Valine # See: https://valine.js.org/quickstart.html valine: enable: false # Your leancloud application appid. appid: # Your leancloud application appkey. appkey: # Mail notifier. notify: true # Verification code. verify: true # Comment box placeholder. placeholder: Just go go # Gravatar style. avatar: mp # Custom comment header. meta: nick,mail,link # Pagination size. pageSize: 10 # Article reading statistics. visitor: false # Whether to record the commenter IP. recordIP: false # Optional values: en | zh-cn 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 # See: https://www.livere.com/ livere: enable: false uid: # Disqus # See: https://disqus.com/ disqus: enable: false shortname: 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 # Facebook Comments # See: https://developers.facebook.com/docs/plugins/comments fbcomments: enable: false # The ID of your own Facebook App. appId: # See: https://developers.facebook.com/docs/internationalization#locales # Example: en_US | zh_CN | zh_HK ... and so on. For detail, see: ☝ lang: en_US # Number of comments displayed by default. numPosts: 10 # See: https://developers.facebook.com/docs/plugins/comments#sorting # Optional values: social | reverse_time | time order_by: reverse_time # Optional values: true | false lazy: true # Whether to optimize the display on the mobile. # Optional values: true | false mobile: true width: 100% # --------------------------------------------------------------- # Statistics and Analytics config # --------------------------------------------------------------- # Busuanzi statistics # See: https://busuanzi.ibruce.info/ busuanzi: enable: false # Only show by icon. icon_only: false # Number of unique visitor to the entire site. site_uv: enable: true # Icon name in FontAwesome, see: https://fontawesome.com/icons icon: fas fa-user # Number of page view to the entire site. site_pv: enable: true icon: fas fa-eye # Number of page view to a post. post_pv: enable: true icon: fas fa-eye # Google analytics ID # See: https://analytics.google.com/ google_analytics: # Baidu analytics ID # See: https://tongji.baidu.com/ baidu_analytics: # Tencent analytics ID # See: 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 # Auxiliary search buttons # ! ----------------------------------------------------------------------------------------- # ! This feature can only be enabled if either `algolia_search` or `local_search` is enabled. # ! ----------------------------------------------------------------------------------------- assist_search: enable: false # Show the Google Search button. Use `www.google.com` to search for what you type. google: true # Show the Bing Search button. Use `www.bing.com` to search for what you type. bing: true # Show the Baidu Search button. Use `www.baidu.com` to search for what you type. baidu: true # --------------------------------------------------------------- # Background config # --------------------------------------------------------------- # Canvas-ribbon # Dependency: https://github.com/hustcc/ribbon.js canvas_ribbon: enable: false # The width of the ribbon. size: 120 # The transparency of the ribbon. alpha: 0.6 # The display level of the ribbon. zIndex: -1 # Canvas-nest # Dependency: https://github.com/hustcc/canvas-nest.js canvas_nest: enable: false # Color of lines. # RGB values, use `,` to separate. color: "0,0,0" # The opacity of lines (value: 0 ~ 1) opacity: 0.6 # The number of lines. count: 99 # `z-index` property of the background. 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://theme-stun.github.io/docs/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 # See: https://fancyapps.com/fancybox/3/ fancybox: false # Click to enlarge picture. zoom_image: enable: true # The color of mask. # (Please use "" to wrap the value) mask_color: "rgba(0,0,0,0.6)" # The gap between image and a edge of screen when image is enlarged. # (Only `px` unit is supported) gap_aside: 20px # If you are use "photos" attribute in the Front-matter, # you can enable this to show images in waterfalls flow. # See: https://github.com/desandro/masonry/ gallery_waterfall: enable: false col_width: 220px gap_x: 10px gap_y: 10px # Lazy load the images of post. # See: https://github.com/tuupola/lazyload lazyload: enable: false # Optional values: gif | block placeholder: gif # Quicklink support # See: https://github.com/GoogleChromeLabs/quicklink/ quicklink: enable: false # Quicklink (quicklink.umd.js script) is loaded on demand. # Add `quicklink: true` in Front-matter of the page or post you need. # Home page and archive page can be controlled through home and archive options below. home: true archive: true # Initialize quicklink after the load event fires. delay: true # Custom a time in milliseconds by which the browser must execute prefetching. timeout: 10000 # Enable fetch() or falls back to XHR. priority: true # For more flexibility you can add some patterns (RegExp, Function, or Array) to ignores. # See: https://github.com/GoogleChromeLabs/quicklink#custom-ignore-patterns # ! -------------------------------------------------- # ! If you don't know the following, please ignore it. # ! -------------------------------------------------- ignores: - /\/api\/?/ - uri => uri.includes('.xml') - uri => uri.includes('.zip') - (uri, el) => el.hasAttribute('nofollow') - (uri, el) => el.hasAttribute('noprefetch') # Pjax # See: https://github.com/MoOx/pjax/ pjax: enable: false # When switching pages, scroll to the bottom of the top image. avoid_banner: false # ! -------------------------------------------------- # ! If you don't know the following, please ignore it. # ! -------------------------------------------------- # Please see: https://github.com/MoOx/pjax/#options elements: selectors: switches: switchesOptions: history: true # If you enable this, you must set `avoid_banner: false` firstly. 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 # The links with `target="_blank"` attribute. external_link: # Adding an icon make it easier for users to know that this is an external link. icon: enable: true # Icon name in FontAwesome, see: https://fontawesome.com/icons name: fas fa-external-link-alt # (Please use "" to wrap the value) color: "#aaa" # The shortcuts of the site. shortcuts: # Switch to the prev / next post by key. # `Ctrl + ←` is the shortcuts to prev post. # `Ctrl + →` is the shortcuts to next post. switch_post: enable: false # Tag cloud # If not used, comment it or ignore it. tag_cloud: # (Please use "" to wrap the value) start_color: "#a4d8fa" end_color: "#49b1f5" # Size for tag. min_size: 16 max_size: 26 # Maximum number of tags displayed. Change it if you have more than 200 tags. 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 waline_visitor: fas fa-eye 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 google: fab fa-google # bing: fab fa-bing # not exist # 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: # Waline # See: https://github.com/lizheming/waline # Example: # waline: //unpkg.com/@waline/client@0.8.5/dist/Waline.min.js waline: # 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: ```预期行为
执行 hexo g 后应在public文件夹内生成所有文件
实际行为
生成 index.css 时报错,生成了空文件
重现步骤
其他信息
报错信息 ...
``` F:\blog>hexo g INFO Validating config INFO Start processing INFO Files loaded in 4.09 s ERROR { err: OperationalError: F:\blog\themes\stun\source\css\index.styl:12:32 8| // -------------------------------------------------- 9| @import './_common/index.styl'; 10| // Custom Layer 11| // -------------------------------------------------- 12| @import './_custom/index.styl'; --------------------------------------^ 13| failed to locate @import file F:\blog\node_modules\stylus\lib\functions\index.styl at Evaluator.visitImport (F:\blog\node_modules\stylus\lib\visitor\evaluator.js:915:21) ... 20 lines matching cause stack trace ... at processImmediate (node:internal/timers:466:21) { cause: Error: F:\blog\themes\stun\source\css\index.styl:12:32 8| // -------------------------------------------------- 9| @import './_common/index.styl'; 10| // Custom Layer 11| // -------------------------------------------------- 12| @import './_custom/index.styl'; --------------------------------------^ 13| failed to locate @import file F:\blog\node_modules\stylus\lib\functions\index.styl at Evaluator.visitImport (F:\blog\node_modules\stylus\lib\visitor\evaluator.js:915:21) at Evaluator.Visitor.visit (F:\blog\node_modules\stylus\lib\visitor\index.js:28:40) at Evaluator.visit (F:\blog\node_modules\stylus\lib\visitor\evaluator.js:160:18) at Evaluator.visitRoot (F:\blog\node_modules\stylus\lib\visitor\evaluator.js:707:27) at Evaluator.Visitor.visit (F:\blog\node_modules\stylus\lib\visitor\index.js:28:40) at Evaluator.visit (F:\blog\node_modules\stylus\lib\visitor\evaluator.js:160:18) at Evaluator.evaluate (F:\blog\node_modules\stylus\lib\visitor\evaluator.js:247:15) at Renderer.render (F:\blog\node_modules\stylus\lib\renderer.js:86:26) at Hexo.stylusFn (F:\blog\node_modules\hexo-renderer-stylus\lib\renderer.js:59:6) at Hexo.tryCatcher (F:\blog\node_modules\bluebird\js\release\util.js:16:23) at Hexo.ret (eval at makeNodePromisifiedEval (C:\Users\clove\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\bluebird\js\release\promisify.js:184:12),在 stylus 仓库的 issue#356 中提到了路径问题,受条件限制暂未测试windows以外环境的运行情况