(二) icarus主题配置

作者资料卡

你可以启用作者资料卡挂件来展示文章作者/网站站长的信息。 资料卡的配置如下所示:

编辑icarus下_config.yml

widgets:
    # Profile widget configurations
    -
        # Where should the widget be placed, left sidebar or right sidebar
        position: left
        type: profile
        # 作者名称
        author: Joe
        # 作者头衔
        # author_title: java-coding
        ## 作者所在地
        location: 中国·深圳
        # 头像图片地址
        avatar: https://joe-1253912574.cos.ap-shenzhen-fsi.myqcloud.com/images/IMG_1292(20200629-005627).jpg
        # 是否显示圆形头像
        avatar_rounded: true
        # Gravatar邮箱(如不设置`avatar`项)
        gravatar: joe-code@foxmail.com
        # 关注按钮链接地址
        follow_link: 'https://gitee.com/joejay'
        # 社交媒体链接

        social_links:
            Github:
                icon: fab fa-github
                url: 'https://github.com/ppoffice'

这个头像我设置之后也没生效… 一气之下直接写死了。在目录themes/icarus/layout/widget下有个profile.jsx 找到38行编辑图片src地址

<img class={'avatar' + (avatarRounded ? ' is-rounded' : '')} src='你的头像地址' alt={author} />
文章目录

编辑icarus下_config.yml 默认开启

widgets:
    -
        type: toc
        position: left #展示位置 左或右

在需要显示目录的文章的.md开头插入

toc: true
---

文章内容...
友链

编辑icarus下_config.yml 默认开启

widgets:
    -
        position: left
        type: links
        # 友站名称与链接
        links:
            LinkedBear: 'https://juejin.im/user/5d9c4a7b518825427b27645f'
            BugStack: 'https://bugstack.cn'
最新文章

编辑icarus下_config.yml 默认开启

widgets:
    -
        position: right
        type: recent_posts
文章归档

编辑icarus下_config.yml 默认开启

widgets:
    -
        position: right
        type: archives
文章分类

编辑icarus下_config.yml 默认开启

widgets:
    -
        position: right
        type: categories
文章标签

编辑icarus下_config.yml 默认开启

widgets:
    -
        position: right
        type: tags

在需要显示目录的文章的.md开头插入

toc: true
tags: 
  - hexo
  - icarus
  - 博客
---
博客内容
国际化

hexo支持国际化, icarus主题自带了多个语言

进入到blog目录下 /themes/icarus/languages

可以看到这里已经内置了中文简体

接下来修改配置文件_config.yml 需要注意的是 _config.yml 有两个 一个是hexo的 一个是icarus主题的 icarus的配置文件在 /themes/icarus/_config.yml

我们需要修改的是hexo的_config.yml 千万不能搞错了 修改languages为 zh-CN 繁体就是zh-TW咯上图文件夹下有的都可以配置 或者你也可以自定义国际化,随便打开一个yml照着改就行了

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值