当前位置: 首页 > news >正文

【hexo博客配置】hexo icarus主题配置

配置icarus

步骤一:下载icarus

github网址:[hexo-theme-icarus](ppoffice/hexo-theme-icarus: A simple, delicate, and modern theme for the static site generator Hexo. (github.com))

可以从这个网址上下载zip文件,解压后,重命名为icarus,并将这个文件夹放置到hexo的theme文件夹下面

也可以通过git命令获取

git clone https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus -b <version number> --depth 1

或者

git submodule add https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus

步骤二:修改_config.yml文件

需要将_config.yml文件中的theme进行修改

theme: icaurs

步骤三:使用shell命令,来配置主题

在对应的文件夹下面,使用Git Bash Here打开shell窗口

hexo config theme icarus

配置中可能会出现的错误(主要就是缺库):

缺少semver

Error: Cannot find module 'semver'

该错误是缺少’semver’库,使用npm命令安装即可

npm install semver

缺少相应的依赖

ERROR Package bulma-stylus is not installed.
ERROR Package hexo-component-inferno is not installed.
ERROR Package hexo-pagination's version (3.0.0) does not satisfy the required version (^2.0.0).
ERROR Package hexo-renderer-inferno is not installed.
ERROR Package inferno is not installed.
ERROR Package inferno-create-element is not installed.
ERROR Please install the missing dependencies your Hexo site root directory:
ERROR npm install --save bulma-stylus@0.8.0 hexo-component-inferno@^2.0.2 hexo-pagination@^2.0.0 hexo-renderer-inferno@^0.1.3 inferno@^7.3.3 inferno-create-element@^7.3.3
ERROR or:
ERROR yarn add bulma-stylus@0.8.0 hexo-component-inferno@^2.0.2 hexo-pagination@^2.0.0 hexo-renderer-inferno@^0.1.3 inferno@^7.3.3 inferno-create-element@^7.3.3

使用npm命令进行安装即可

npm install --save bulma-stylus@0.8.0 hexo-component-inferno@^2.0.2 hexo-pagination@^2.0.0 hexo-renderer-inferno@^0.1.3 inferno@^7.3.3 inferno-create-element@^7.3.3

安装好这一切后,就可以进行相应的配置

icarus配置

配置icarus,主要参考了以下的内容

Getting Started with icarus

[icarus用户配置](Icarus用户指南 - 主题配置 - Icarus (ppoffice.github.io))

Hexo主题配置

搭建自己的技术博客系列(六)酷炫主题icarus常用配置整合版,快速搞定博客首页 - 知乎 (zhihu.com)

首先,要在hexo目录下的_config.yml目录进行修改,主要是对theme设置。

theme: icarus

然后需要根据这个配置文件重新配置hexo,在git bash中输入

hexo config theme icarus

命令执行后,可以发现会在_config.yml文件中生成一个 _config.icarus.yml 文件,这是icarus的配置文件。

# Version of the Icarus theme that is currently used
version: 5.1.0 # Icarus的版本
# 你的网站图标,可以搜索在线图标制作,并将其放在images文件夹中
favicon: /images/favicon.svg
# Additional HTML meta tags in an array.
meta: 
# Path or URL to RSS atom.xml
rss: /atom.xml
# 显示在导航栏左侧的网站logo,同样可以自己制作
logo: /images/hxx.jpg
# Open Graph metadata
# https://hexo.io/docs/helpers.html#open-graph
open_graph:# Facebook App IDfb_app_id: # Facebook Admin IDfb_admins: # Twitter IDtwitter_id: # Twitter sitetwitter_site: # Google+ profile linkgoogle_plus: 
# Navigation bar link settings
navbar:#菜单(显示名称:对应文件夹)menu:主页: /归档: /archives分类: /categories标签: /tags关于: /about# 导航栏右侧图标链接links:My GitHub:icon: fab fa-githuburl: 'https://github.com/h2pl/'
# Footer section link settings
footer:# 页脚图标链接links:Creative Commons:icon: fab fa-creative-commonsurl: 'https://creativecommons.org/'Attribution 4.0 International:icon: fab fa-creative-commons-byurl: 'https://creativecommons.org/licenses/by/4.0/'Download on GitHub:icon: fab fa-githuburl: 'https://github.com/ppoffice/hexo-theme-icarus'
# 文章显示设置
article:#代码主题atom-one-light亮色,atom-one-dark暗色highlight:# Code highlight themes# https://github.com/highlightjs/highlight.js/tree/master/src/stylestheme: atom-one-dark# Show code copying buttonclipboard: true# Default folding status of the code blocks. Can be "", "folded", "unfolded"fold: unfolded# 是否显示文章主图thumbnail: true# 是否显示估算阅读时间readtime: true
# 搜索插件设置
# https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Search
search:# Name of the search plugintype: insight
# 评论插件设置
# https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Comment
comment:#可选valine,disqus(科学上网)等# Name of the comment pluginavatar: retro # Gravatar style : mm/identicon/monsterid/wavatar/retro/hideplaceholder: 要不要说点啥... # Comment Box placeholdertype: valineshortname: 黄小斜
# 打赏功能
# https://ppoffice.github.io/hexo-theme-icarus/categories/Donation/
donate:-# 阿里巴巴支付宝type: alipay# 二维码图片qrcode: '/images/hxx.jpg'-# 微信type: wechat# 二维码图片qrcode: '/images/hxx.jpg'# 分享插件设置
# https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Share
share:# Share plugin nametype: sharejs
# Sidebar settings.
# Please be noted that a sidebar is only visible when it has at least one widget
sidebar:# 左侧边栏设置left:# 是否不随页面滚动# https://ppoffice.github.io/hexo-theme-icarus/Configuration/Theme/make-a-sidebar-sticky-when-page-scrolls/sticky: false# right sidebar settingsright:# 是否不随页面滚动# https://ppoffice.github.io/hexo-theme-icarus/Configuration/Theme/make-a-sidebar-sticky-when-page-scrolls/sticky: false
# 边栏小部件设置
# https://ppoffice.github.io/hexo-theme-icarus/categories/Widgets/
widgets:-# Widget nametype: profile# Where should the widget be placed, left or rightposition: left# Author name to be shown in the profile widgetauthor: 黄小斜# Title of the author to be shown in the profile widgetauthor_title: 蚂蚁金服Java工程师# Author's current location to be shown in the profile widgetlocation: 浙江 杭州# Path or URL to the avatar to be shown in the profile widgetavatar: /images/gzh.jpg# Email address for the Gravatar to be shown in the profile widgetgravatar: # Whether to show avatar image rounded or squareavatar_rounded: false# 关注我的链接,可设为你的GitHub主页follow_link: 'https://github.com/h2pl/'# 个人介绍部件底部图标社交链接social_links:Github:icon: fab fa-githuburl: 'https://github.com/h2pl'RSS:icon: fas fa-rssurl: /-# Widget nametype: toc# Where should the widget be placed, left or rightposition: left-# Widget nametype: links# Where should the widget be placed, left or rightposition: left# Links to be shown in the links widgetlinks:CSDN: 'https://blog.csdn.net/a724888'知乎: 'https://www.zhihu.com/people/h2pl/activities'简书: 'https://www.zhihu.com/people/h2pl/activities'-# Widget nametype: category# Where should the widget be placed, left or rightposition: left-# Widget nametype: tagcloud# Where should the widget be placed, left or rightposition: left-# Widget nametype: recent_posts# Where should the widget be placed, left or rightposition: right-# Widget nametype: archive# Where should the widget be placed, left or rightposition: right-# Widget nametype: tag# Where should the widget be placed, left or rightposition: right
# Other plugin settings
plugins:# Enable page animationsanimejs: true# Enable the lightGallery and Justified Gallery plugins# https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/gallery-plugin/gallery: true# Enable the Outdated Browser plugin# http://outdatedbrowser.com/outdated-browser: true# Enable the MathJax plugin# https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/mathjax-plugin/mathjax: true# Show the back to top button on mobile devicesback-to-top: true# Google Analytics plugin settings# https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/site-analytics-plugin/#Google-Analyticsgoogle-analytics:# Google Analytics tracking idtracking_id: # Baidu Analytics plugin settings# https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/site-analytics-plugin/#Baidu-Analyticsbaidu-analytics:# Baidu Analytics tracking idtracking_id: 2289335dd443797b5867abbd156e7575# Hotjar user feedback plugin# https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/site-analytics-plugin/#Hotjarhotjar:# Hotjar site idsite_id: # Show a loading progress bar at top of the pageprogressbar: true# BuSuanZi site/page view counter# https://busuanzi.ibruce.infobusuanzi: true
busuanzi:enable: true
# CDN provider settings
# https://ppoffice.github.io/hexo-theme-icarus/Configuration/Theme/speed-up-your-site-with-custom-cdn/
# Show PV/UV of the website/page with busuanzi.
# Get more information on http://ibruce.info/2015/04/04/busuanzi/
busuanzi_count:# count values only if the other configs are falseenable: true# custom uv span for the whole sitesite_uv: truesite_uv_header: 访客数site_uv_footer:# custom pv span for the whole sitesite_pv: truesite_pv_header: 总访问量site_pv_footer:# custom pv span for one page onlypage_pv: truepage_pv_header: <i class="fa fa-file-o"></i>  阅读数page_pv_footer:providers:# Name or URL of the JavaScript and/or stylesheet CDN providercdn: jsdelivr# Name or URL of the webfont CDN providerfontcdn: google# Name or URL of the webfont Icon CDN providericoncdn: fontawesome

Hexo配置好后,使用命令进行更新,并在本地进行查看

hexo g
hexo s

当一切配置完成后,需要讲配置好的文件,传输到gitee上,并进行更新。

hexo clean
hexo g
hexo d

然后需要在gitee上进行更新,才能在gitee上看出来。

更新

这样就可以完成icarus主题配置。

http://www.lryc.cn/news/222500.html

相关文章:

  • 建表时如何合理选择字段类型
  • Qt Creator插件
  • AI全栈大模型工程师(十九)Semantic Kernel
  • Dubbo 的服务请求失败怎么处理?
  • 存储虚拟化讲解
  • [云原生案例2.1 ] Kubernetes的部署安装 【单master集群架构 ---- (二进制安装部署)】节点部分
  • Apache ActiveMQ 远程代码执行漏洞影响范围
  • 如何规划并新建大数据平台的独立生产域?5步走
  • 工程车云管家|叉车智能管家安卓主板方案
  • 大数据学习之Spark性能优化
  • 个人服务器到期,项目下线,新的开始
  • arcgis 网络分析 生成可达范围/等时线
  • npm切换镜像源
  • Python简单学习
  • 2000-2021年全国各省资本存量测算数据(含原始数据+测算过程+计算结果)
  • Vue.js 中的异步组件是什么?
  • Luckysheet 实现excel多人在线协同编辑
  • C++线程库的基本使用(初级)
  • 2023最新版JavaSE教程——第1天:Java语言概述
  • PTL货位指引标签为仓储管理打开新思路
  • IDEA版SSM入门到实战(Maven+MyBatis+Spring+SpringMVC) -Maven核心概念
  • Unity的粒子总是丢材质
  • P5906 【模板】回滚莫队不删除莫队
  • 1. Collection,List, Map, Queue
  • rabbitmq 交换机相关实例代码
  • 第四章IDEA操作Maven
  • Go语言函数签名和匿名函数
  • Pytest系列(16)- 分布式测试插件之pytest-xdist的详细使用
  • 基于JavaWeb的网上销售系统设计与实现
  • wpf添加Halcon的窗口控件报错:下列控件已成功添加到工具箱中,但未在活动设计器中启用