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

news/2024/7/7 23:31:25

配置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 ID
    fb_app_id: 
    # Facebook Admin ID
    fb_admins: 
    # Twitter ID
    twitter_id: 
    # Twitter site
    twitter_site: 
    # Google+ profile link
    google_plus: 
# Navigation bar link settings
navbar:
    #菜单(显示名称:对应文件夹)
    menu:
        主页: /
        归档: /archives
        分类: /categories
        标签: /tags
        关于: /about
    # 导航栏右侧图标链接
    links:
        My GitHub:
            icon: fab fa-github
            url: 'https://github.com/h2pl/'
# Footer section link settings
footer:
    # 页脚图标链接
    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:
    #代码主题atom-one-light亮色,atom-one-dark暗色
    highlight:
        # Code highlight themes
        # https://github.com/highlightjs/highlight.js/tree/master/src/styles
        theme: atom-one-dark
        # Show code copying button
        clipboard: 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 plugin
    type: insight
# 评论插件设置
# https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Comment
comment:
    #可选valine,disqus(科学上网)等
    # Name of the comment plugin
    avatar: retro # Gravatar style : mm/identicon/monsterid/wavatar/retro/hide
    placeholder: 要不要说点啥... # Comment Box placeholder
    type: valine
    shortname: 黄小斜
# 打赏功能
# 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 name
    type: 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 settings
    right:
        # 是否不随页面滚动
        # 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 name
        type: profile
        # Where should the widget be placed, left or right
        position: left
        # Author name to be shown in the profile widget
        author: 黄小斜
        # Title of the author to be shown in the profile widget
        author_title: 蚂蚁金服Java工程师
        # Author's current location to be shown in the profile widget
        location: 浙江 杭州
        # Path or URL to the avatar to be shown in the profile widget
        avatar: /images/gzh.jpg
        # Email address for the Gravatar to be shown in the profile widget
        gravatar: 
        # Whether to show avatar image rounded or square
        avatar_rounded: false
        # 关注我的链接,可设为你的GitHub主页
        follow_link: 'https://github.com/h2pl/'
        # 个人介绍部件底部图标社交链接
        social_links:
            Github:
                icon: fab fa-github
                url: 'https://github.com/h2pl'
            RSS:
                icon: fas fa-rss
                url: /
    -
        # Widget name
        type: toc
        # Where should the widget be placed, left or right
        position: left
    -
        # Widget name
        type: links
        # Where should the widget be placed, left or right
        position: left
        # Links to be shown in the links widget
        links:
            CSDN: 'https://blog.csdn.net/a724888'
            知乎: 'https://www.zhihu.com/people/h2pl/activities'
            简书: 'https://www.zhihu.com/people/h2pl/activities'
    -
        # Widget name
        type: category
        # Where should the widget be placed, left or right
        position: left
    -
        # Widget name
        type: tagcloud
        # Where should the widget be placed, left or right
        position: left
    -
        # Widget name
        type: recent_posts
        # Where should the widget be placed, left or right
        position: right
    -
        # Widget name
        type: archive
        # Where should the widget be placed, left or right
        position: right
    -
        # Widget name
        type: tag
        # Where should the widget be placed, left or right
        position: right
# Other plugin settings
plugins:
    # Enable page animations
    animejs: 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 devices
    back-to-top: true
    # Google Analytics plugin settings
    # https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/site-analytics-plugin/#Google-Analytics
    google-analytics:
        # Google Analytics tracking id
        tracking_id: 
    # Baidu Analytics plugin settings
    # https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/site-analytics-plugin/#Baidu-Analytics
    baidu-analytics:
        # Baidu Analytics tracking id
        tracking_id: 2289335dd443797b5867abbd156e7575
    # Hotjar user feedback plugin
    # https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/site-analytics-plugin/#Hotjar
    hotjar:
        # Hotjar site id
        site_id: 
    # Show a loading progress bar at top of the page
    progressbar: true
    # BuSuanZi site/page view counter
    # https://busuanzi.ibruce.info
    busuanzi: 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 false
  enable: true
  # custom uv span for the whole site
  site_uv: true
  site_uv_header: 访客数
  site_uv_footer:# custom pv span for the whole site
  site_pv: true
  site_pv_header: 总访问量
  site_pv_footer:# custom pv span for one page only
  page_pv: true
  page_pv_header: <i class="fa fa-file-o"></i>  阅读数
  page_pv_footer:


providers:
    # Name or URL of the JavaScript and/or stylesheet CDN provider
    cdn: jsdelivr
    # Name or URL of the webfont CDN provider
    fontcdn: google
    # Name or URL of the webfont Icon CDN provider
    iconcdn: fontawesome

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

hexo g
hexo s

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

hexo clean
hexo g
hexo d

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

更新

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


http://lihuaxi.xjx100.cn/news/1762920.html

相关文章

【WinForm详细教程八】WinForm中的TreeView控件

文章目录 TreeView 基本的知识属性方法事件 TreeView 案例演示案例一&#xff1a;案例二&#xff1a; TreeView 控件 用于展示分层数据&#xff0c;它以树形结构展示信息&#xff0c;每个节点可以有一个或多个子节点。TreeView 控件允许用户以可展开和可折叠的形式查看复杂的层…

二分查找常见需求(持续更新中)

1.找到tmp中大于等于target的最小下标 当然如果不存在就返回tmp.length。 public int binarySearch(int[] tmp, int target) {int l 0, r tmp.length - 1;if(tmp[r] < target) {return r 1;}while(l < r) {int mid l (r - l) / 2;if(tmp[mid] < target) {l mid…

【算法 | 模拟No.3】leetcode 38. 外观数列

个人主页&#xff1a;兜里有颗棉花糖 欢迎 点赞&#x1f44d; 收藏✨ 留言✉ 加关注&#x1f493;本文由 兜里有颗棉花糖 原创 收录于专栏【手撕算法系列专栏】【Leetcode】 &#x1f354;本专栏旨在提高自己算法能力的同时&#xff0c;记录一下自己的学习过程&#xff0c;希望…

DDD领域模式的模块层级及其依赖关系

DDD领域模型设计是一种常用的软件设计模式,它强调将业务逻辑和数据模型放在最核心的位置,以便更好地满足业务需求。在DDD领域模型设计中,应用程序被分为四个层次:用户界面层、应用服务层、领域模型层和基础设施层。 层次 用户界面层(Presentation Layer) 作为用户和应…

seata1.8安装部署

1.在nacos里面创建命名空间 2.下载seata安装包 3.将下载的seata解压&#xff0c;找到seata/script/server/db目录下对应数据库的sql脚本&#xff0c;创建数据库 undo_log.sql CREATE TABLE undo_log (branch_id bigint(20) NOT NULL COMMENT branch transaction id,xid varcha…

北斗导航 | ION GNSS+2023论文集及PPT(Proceedings with presentations)

===================================================== github:https://github.com/MichaelBeechan CSDN:https://blog.csdn.net/u011344545 ===================================================== ION GNSS+2023论文集及PPT 美国导航学会IONION国际会议出版物

计算/存储虚拟化高级特性

目录 计算虚拟化特性 HA高可用 虚拟机热迁移 虚拟机快照技术 存储虚拟化特性 链接克隆 存储热迁移 裸设备映射 计算虚拟化特性 HA高可用 通过HA&#xff08;High Available&#xff09;机制&#xff0c;可以提升虚拟机的可用度&#xff0c;允许虚拟机所在的服务器节点…

中西部地区教育正获优质均衡高质量发展

教育部日前消息&#xff0c;2022年我国基础教育财政性教育经费达3.2万亿元&#xff0c;比2015年增加了1.3万亿元&#xff0c;年均增长7.7%。近些年来&#xff0c;我国基础教育各学段财政总投入和生均支出逐年只增不减&#xff0c;为推动基础教育优质均衡发展提供了有力支撑。 …