ppoffice / hexo-theme-icarus

A simple, delicate, and modern theme for the static site generator Hexo.
https://ppoffice.github.io/hexo-theme-icarus/
MIT License
6.4k stars 1.55k forks source link

hexo g 报错 #724

Closed zhangxiann closed 4 years ago

zhangxiann commented 4 years ago

hexo g 报错

System and Environment The version and configuration of Hexo and Icarus.

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

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

Use post's date for updated date unless set in front-matter

use_date_for_updated: false

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: landscape

theme: icarus

Deployment

Docs: https://hexo.io/docs/deployment.html

deploy: type: git repo: https://github.com/xiechuanyu/xiechuanyu.github.io.git branch: master


- Theme configuration file `themes/icarus/_config.yml`

Version of the configuration file

version: 3.0.0

Icarus theme variant, can be "default" or "cyberpunk"

variant: default

Path or URL to the website's logo

logo: /img/logo.svg

Page metadata configurations

head:

URL or path to the website's icon

favicon: /img/favicon.svg
# Open Graph metadata
# https://hexo.io/docs/helpers.html#open-graph
open_graph:
    # Page title (og:title) (optional)
    # You should leave this blank for most of the time
    title: 
    # Page type (og:type) (optional)
    # You should leave this blank for most of the time
    type: blog
    # Page URL (og:url) (optional)
    # You should leave this blank for most of the time
    url: 
    # Page cover (og:image) (optional) Default to the Open Graph image or thumbnail of the page
    # You should leave this blank for most of the time
    image: 
    # Site name (og:site_name) (optional)
    # You should leave this blank for most of the time
    site_name: 
    # Page author (article:author) (optional)
    # You should leave this blank for most of the time
    author: 
    # Page description (og:description) (optional)
    # You should leave this blank for most of the time
    description: 
    # Twitter card type (twitter:card)
    twitter_card: 
    # Twitter ID (twitter:creator)
    twitter_id: 
    # Twitter ID (twitter:creator)
    twitter_site: 
    # Google+ profile link (deprecated)
    google_plus: 
    # Facebook admin ID
    fb_admins: 
    # Facebook App ID
    fb_app_id: 
# Structured data of the page
# https://developers.google.com/search/docs/guides/intro-structured-data
structured_data:
    # Page title (optional)
    # You should leave this blank for most of the time
    title: 
    # Page description (optional)
    # You should leave this blank for most of the time
    description: 
    # Page URL (optional)
    # You should leave this blank for most of the time
    url: 
    # Page author (article:author) (optional)
    # You should leave this blank for most of the time
    author: 
    # Page images (optional) Default to the Open Graph image or thumbnail of the page
    # You should leave this blank for most of the time
    image: 
# Additional HTML meta tags in an array
meta:
    # Meta tag specified in <attribute>=<value> style
    # E.g., name=theme-color;content=#123456 => <meta name="theme-color" content="#123456">
    - ''
# URL or path to the website's RSS atom.xml
rss: 

Page top navigation bar configurations

navbar:

Naviagtion menu items

menu:
    Home: /
    Archives: /archives
    Categories: /categories
    Tags: /tags
    About: /about
# Links to be shown on the right of the navigation bar
links:
    Download on GitHub:
        icon: fab fa-github
        url: 'https://github.com/ppoffice/hexo-theme-icarus'

Page footer configurations

footer:

Links to be shown on the right of the footer section

links:
    Creative Commons:
        icon: fab fa-creative-commons
        url: 'https://creativecommons.org/'
    Attribution 4.0 International:
        icon: fab fa-creative-commons-by
        url: 'https://creativecommons.org/licenses/by/4.0/'
    Download on GitHub:
        icon: fab fa-github
        url: 'https://github.com/ppoffice/hexo-theme-icarus'

Article related configurations

article:

Code highlight settings

highlight:
    # Code highlight themes
    # https://github.com/highlightjs/highlight.js/tree/master/src/styles
    theme: atom-one-light
    # Show copy code button
    clipboard: true
    # Default folding status of the code blocks. Can be "", "folded", "unfolded"
    fold: unfolded
# Whether to show thumbnail image for every article
thumbnail: true
# Whether to show estimated article reading time
readtime: true

Search plugin configurations

https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Search/

search: type: insight

Comment plugin configurations

https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Comment/

comment: type: disqus

Disqus shortname

shortname: ''

Donate plugin configurations

https://blog.zhangruipeng.me/hexo-theme-icarus/categories/Plugins/Donation/

donates:

Alipay donate button configurations

-
    type: alipay
    # Alipay qrcode image URL
    qrcode: ''
# "Buy me a coffee" donate button configurations
-
    type: buymeacoffee
    # URL to the "Buy me a coffee" page
    url: ''
# Patreon donate button configurations
-
    type: patreon
    # URL to the Patreon page
    url: ''
# Paypal donate button configurations
-
    type: paypal
    # Paypal business ID or email address
    business: ''
    # Currency code
    currency_code: USD
# Wechat donate button configurations
-
    type: wechat
    # Wechat qrcode image URL
    qrcode: ''

Share plugin configurations

https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Share/

share: type: sharethis

URL to the ShareThis share plugin script

install_url: ''

Sidebar configurations.

Please be noted that a sidebar is only visible when it has at least one widget

sidebar:

Left sidebar configurations

left:
    # Whether the sidebar sticks to the top when page scrolls
    sticky: false
# Right sidebar configurations
right:
    # Whether the sidebar sticks to the top when page scrolls
    sticky: false

Sidebar widget configurations

http://ppoffice.github.io/hexo-theme-icarus/categories/Widgets/

widgets:

Profile widget configurations

-
    # Where should the widget be placed, left sidebar or right sidebar
    position: left
    type: profile
    # Author name
    author: Your name
    # Author title
    author_title: Your title
    # Author's current location
    location: Your location
    # URL or path to the avatar image
    avatar: 
    # Whether show the rounded avatar image
    avatar_rounded: false
    # Email address for the Gravatar
    gravatar: 
    # URL or path for the follow button
    follow_link: 'https://github.com/ppoffice'
    # Links to be shown on the bottom of the profile widget
    social_links:
        Github:
            icon: fab fa-github
            url: 'https://github.com/ppoffice'
        Facebook:
            icon: fab fa-facebook
            url: 'https://facebook.com'
        Twitter:
            icon: fab fa-twitter
            url: 'https://twitter.com'
        Dribbble:
            icon: fab fa-dribbble
            url: 'https://dribbble.com'
        RSS:
            icon: fas fa-rss
            url: /
# Table of contents widget configurations
-
    # Where should the widget be placed, left sidebar or right sidebar
    position: left
    type: toc
# Recommendation links widget configurations
-
    # Where should the widget be placed, left sidebar or right sidebar
    position: left
    type: links
    # Names and URLs of the sites
    links:
        Hexo: 'https://hexo.io'
        Bulma: 'https://bulma.io'
# Categories widget configurations
-
    # Where should the widget be placed, left sidebar or right sidebar
    position: left
    type: categories
# Recent posts widget configurations
-
    # Where should the widget be placed, left sidebar or right sidebar
    position: left
    type: recent_posts
# Archives widget configurations
-
    # Where should the widget be placed, left sidebar or right sidebar
    position: left
    type: archives
# Tags widget configurations
-
    # Where should the widget be placed, left sidebar or right sidebar
    position: left
    type: tags
# Google FeedBurner email subscription widget configurations
-
    # Where should the widget be placed, left sidebar or right sidebar
    position: left
    type: subscribe_email
    # Hint text under the email input
    description: 
    # Feedburner ID
    feedburner_id: ''
# Google AdSense unit configurations
-
    # Where should the widget be placed, left sidebar or right sidebar
    position: left
    type: adsense
    # AdSense client ID
    client_id: ''
    # AdSense AD unit ID
    slot_id: ''

Plugin configurations

https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/

plugins:

Enable page startup animations

animejs: true
# Show the "back to top" button
back_to_top: true
# Baidu Analytics plugin settings
# https://tongji.baidu.com
baidu_analytics:
    # Baidu Analytics tracking ID
    tracking_id: 
# BuSuanZi site/page view counter
# https://busuanzi.ibruce.info
busuanzi: false
# CNZZ statistics
# https://www.umeng.com/web
cnzz:
    # CNZZ tracker id
    id: 
    # CNZZ website id
    web_id: 
# Enable the lightGallery and Justified Gallery plugins
gallery: true
# Google Analytics plugin settings
# https://analytics.google.com
google_analytics:
    # Google Analytics tracking ID
    tracking_id: 
# Hotjar user feedback plugin
# https://www.hotjar.com/
hotjar:
    # Hotjar site id
    site_id: 
# Enable the KaTeX math typesetting supprot
# https://katex.org/
katex: false
# Enable the MathJax math typesetting support
# https://www.mathjax.org/
mathjax: false
# Enable the Outdated Browser plugin
# http://outdatedbrowser.com/
outdated_browser: false
# Show a progress bar at top of the page on page loading
progressbar: true

CDN provider settings

https://ppoffice.github.io/hexo-theme-icarus/Configuration/Theme/speed-up-your-site-with-custom-cdn/

providers:

Name or URL template of the JavaScript and/or stylesheet CDN provider

cdn: jsdelivr
# Name or URL template of the webfont CDN provider
fontcdn: google
# Name or URL of the fontawesome icon font CDN provider
iconcdn: fontawesome
- Any additional theme configuration files (post front-matter, `_config.post.yml`, or `_config.page.yml`)
无
**To Reproduce**
无

ERROR Asset render failed: css/cyberpunk.css Error: D:/blog/hexoBlog/themes/icarus/include/style/base.styl:46:29 42| 43| $logo-height ?= 1.75rem 44| 45| // FIXME: https://github.com/groenroos/bulma-stylus/issues/11 46| @import bulma-stylus-root + '/utilities/initial-variables' -----------------------------------^ 47| @import bulma-stylus-root + '/utilities/functions' 48| @import bulma-stylus-root + '/utilities/derived-variables' 49|

failed to locate @import file ../../../../node_modules/bulma-stylus/stylus/utilities/initial-variables.styl

ppoffice commented 4 years ago

https://blog.zhangruipeng.me/hexo-theme-icarus/uncategorized/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98/#%E7%AB%99%E7%82%B9

zhangxiann commented 4 years ago

感谢这么快速的回复和帮助

不知道为什么npm install命令安装不了 peerDependencies 的package,因此我找到一篇解答:https://stackoverflow.com/questions/46053414/npm-warn-requires-a-peer-of-but-none-is-installed-you-must-install-peer ,里面说使用npm install --save-dev xxxxx一个一个手动安装。我没有装多余的package 装完之后,还是报这个错。但是我已经装了,npm install显示如下,这是全装了吗?

PS D:\blog\hexoBlog> cd .\themes\icarus\
PS D:\blog\hexoBlog\themes\icarus> npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

up to date in 2.493s

35 packages are looking for funding
  run `npm fund` for details
zhangxiann commented 4 years ago

我安装 peerDependencies 的方法有问题吗?应该如何安装?

ppoffice commented 4 years ago

@ppoffice 你在运行任意hexo命令的时候应该有Warning吧?你照着warning上的提示运行npm安装命令即可。

zhangxiann commented 4 years ago

只是说需要自己安装,没有说怎么安装。所以我上网搜,有的说npm版本太老,我的版本是6.14.4了。stackoverflow 其中一个说npm install --save-dev xxxxx一个一个手动安装。

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of bulma-stylus@0.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of deepmerge@^4.2.2 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo@^4.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo-component-inferno@^0.2.4 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo-log@^1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo-pagination@^1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo-renderer-inferno@^0.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo-renderer-stylus@^1.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo-util@^1.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of inferno@^7.3.3 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of inferno-create-element@^7.3.3 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of moment@^2.22.2 but none is installed. You must install peer dependencies yourself.
ppoffice commented 4 years ago

@xiechuanyu 不是。你运行hexo s然后把所有日志贴出来。

zhangxiann commented 4 years ago

可以了。谢谢你。我是太小白了。我把themes\icarus\package.json里的peerDependencies的内容拷贝到 blog 的package.jsondependencies里面,在blog的主目录下执行npm install就行了。 再次感谢。

zhangxiann commented 4 years ago

再次感谢作者,做出这么优秀的主题