icarus3.0.0 主题配置

本文介绍了Icarus 3.0.0版本的主题配置,内容来源于优快云上的一篇文章,并对配置文件进行了初步解析,但请注意,该解析并不全面。

本文同时发布于我的博客 杏铃の小本

这份配置学习了优快云上的这篇文章

我对3.0.0版本的配置文件进行了一些解析, 注意:不完整

# Version of the configuration file
version: 3.0.0
# Icarus theme variant, can be "default" or "cyberpunk"
variant: default
# 网站logo,可使用文字或URL或将logo放在主题目录 soure/img 下(不推荐),文字使用方法在作者博客的FAQ里有写
logo: 
# Page metadata configurations
head:
    # 浏览器上你的网站图标,需要转换为svg格式并放在img文件夹中
    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订阅
    rss: 

#  导航栏
navbar:
    # 菜单(显示名称:对应文件夹),通常这些页面需要自行创建
    menu:
        主页: /
        归档: /archives
        分类: /categories
        标签: /tags
        关于: /about   
    # 导航栏右侧图标,可删除
    links:
        My GitHub:
            icon: fab fa-github
            url: '你的gityhub地址'

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/'
        My GitHub:
            icon: fab fa-github
            url: 'https://github.com/hshx123'

# 文章显示设置
article:
    # Code highlight settings
    highlight:
    # 代码主题atom-one-light亮色,atom-one-dark暗色
        # 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
    # 是否显示文章主图
    thumbnail: false
    # 阅读时间
    readtime: true
# 搜索插件设置
# https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Search/
search:
    type: insight

# 评论插件设置
# 进入该网站以查看具体设置 https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Comment/
comment:
    type: 

    # Disqus shortname
    shortname: ''
# Donate plugin configurations
# https://blog.zhangruipeng.me/hexo-theme-icarus/categories/Plugins/Donation/
donates:

# 打赏功能支持的方式比较多,可以查看下方链接
# https://blog.zhangruipeng.me/hexo-theme-icarus/categories/Plugins/Donation/
donate:
    -
        # 阿里巴巴支付宝
        type: alipay
        # 二维码图片
        qrcode: '/images/alipay.png'
    -
        # 微信
        type: wechat
        # 二维码图片
        qrcode: '/images/wechat.png'
    -
# 分享插件设置(我已注释掉)
# https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Share/
#share:
    # 插件类型,有多种,可选,自行百度
    #type: sharethis
    # URL to the ShareThis share plugin script
    #install_url: ''

sidebar:
    # 左侧边栏设置
    left:
        # 是否不随页面滚动
        sticky: false
    # 右侧边栏设置
    right:
        # 是否不随页面滚动
        sticky: false

# 边栏小部件设置
# http://ppoffice.github.io/hexo-theme-icarus/categories/Widgets/
widgets:
    -
        #  个人信息
        type: profile
        # 部件位置(左)
        position: left
        # 作者名(字符串)
        author: hshx123
        # 作者身份描述(字符串)
        author_title: 普通的高一学生辣! 联系我用邮箱哦~   (18691617353@163.com)
        # 作者当前居住地
        location: 陕西
        # 头像(可用本地图片或网络图片链接)
        avatar: 
        # Email address for the Gravatar to be shown in the profile widget
        gravatar: 
        # Whether to show avatar image rounded or square
        avatar_rounded: false
        # 关注我的链接
        follow_link: 'http://www.coolapk.com/u/1419933'
        # 个人介绍部件底部图标社交链接
        social_links:
            Github:
                icon: fab fa-github
                url: 'https://github.com/hshx123'
            #Facebook:
                #icon: fab fa-facebook
                #url: 'https://facebook.com'
            Twitter:
                icon: fab fa-twitter
                url: 'https://twitter.com/hshx1232'
            #Dribbble:
                #icon: fab fa-dribbble
                #url: 'https://dribbble.com'
            #RSS:
                #icon: fas fa-rss
                #url: /
            
            Telegram:
                icon: fab fa-telegram
                url: 'https://t.me/hshx123/'
            QQ:
                icon: fab fa-qq
                url: 'http://wpa.qq.com/msgrd?v=1&uin=1601074319&site=ioshenmue&menu=yes'

# 注意: 在手机上当 position为left 才可在个人信息下方显示
    # 文章目录
    -
        # 位置指定
        position: right
        type: toc

    # 友链
    -
        # 位置指定
        position: left
        type: links
        # 友链链接,需要http/https
        links:
            维他入我心: https://wtrwx.top
           小茶猫: https://www.xiaochamao.com
           LittleC Powerful Blog: https://ltlec.com
           琉璃梦原: https://qiailmy.cn
           燃星博客: https://blog.skyings.cn
           Cheng's Blog: https://cheng171.github.io
           神楽坂咲夜: http://www.moesakuya.xyz
           Barkure: https://guguga.cn
           vcfe`s Blog: https://shhv.monster
           SEA,你我同行: https://www.expecting.top
           Qingxu's Blog: https://huanruomengyun.github.io
           ZhaoQuinn 's Blog: https://zhaoq.me
    -
        # 分类
        position: left
        type: categories
    -
        # 近期文章
        position: left
        type: recent_posts
    -
        # 归档
        position: right
        type: archives
    -
        # 标签
        position: left
        type: tags

    # 谷歌广告(已注释)
    #-
        # 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
    #-
        #  似乎也是个广告(已注释)
        #position: left
        #type: adsense
        # AdSense client ID
        #client_id: ''
        # AdSense AD unit ID
        #slot_id: ''

# 插件
plugins:
    # Enable page startup animations
    animejs: true
    # 是否显示回到顶部按钮
    back_to_top: true
    # 百度统计
    # https://tongji.baidu.com
    baidu_analytics:
        # 百度统计ID
        tracking_id: 
    # 不蒜子统计
    # https://busuanzi.ibruce.info
    busuanzi: true
    # CNZZ统计
    # https://www.umeng.com/web
    cnzz:
        # CNZZ tracker id
        id: 
        # CNZZ website id
        web_id: 
    # 图库模式,我也不知道有什么用
    # https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/gallery-plugin/
    gallery: true
    # 谷歌分析
    # https://analytics.google.com
    google_analytics:
        # Google Analytics tracking ID
        tracking_id: 
   # Hotjar用户反馈插件
    # https://www.hotjar.com/
    hotjar:
        # Hotjar site id
        site_id: 
    # 启用KaTeX数学排版支持
    # https://katex.org/
    katex: false
    # 启用MathJax数学排版支持
    # https://www.mathjax.org/
    mathjax: false
    # 启用过时的浏览器插件
    # http://outdatedbrowser.com/
    outdated_browser: false
    # 在页面加载时在页面顶部显示进度条
    progressbar: true

# CDN设置
# https://ppoffice.github.io/hexo-theme-icarus/Configuration/Theme/speed-up-your-site-with-custom-cdn/
providers:
    # JavaScript和/或样式表CDN提供程序的名称或URL模板
    cdn: jsdelivrName or URL template of
    # webfont CDN提供程序的名称或URL模板
    fontcdn: google
    # fontawesome图标字体CDN提供程序的名称或URL
    iconcdn: fontawesome
<think>好的,用户想要隐藏Icarus主题的导航栏(Navbar),但问题描述中提到了Navber,可能是个拼写错误。首先我需要确认正确的术语是Navbar。然后,我需要回忆Icarus主题的相关配置文档。 根据用户提供的引用链接,icarus配置主要在主题的_config.yml文件中。导航栏的设置通常位于navbar部分。常见的方法可能是通过设置display为false来隐藏导航栏。但需要确认具体的配置项名称是否正确,比如是否是navbar.display或者类似的路径。 另外,可能还有其他方式,比如通过CSS样式隐藏,但用户可能更倾向于使用主题自带的配置选项,而不是自定义CSS。所以重点应放在检查主题配置文件中的navbar相关选项。 需要确保步骤清晰,指导用户找到配置文件,修改相应的字段,并重启Hexo服务查看效果。同时,可能需要提醒用户检查拼写,避免因为拼写错误导致配置不生效。 最后,生成相关问题,帮助用户进一步解决可能遇到的问题,比如移动端适配、修改导航链接等。</think>### Icarus主题隐藏导航栏(Navbar)的配置方法 在Icarus主题中,隐藏导航栏可通过修改主题配置文件实现,步骤如下: 1. **找到主题配置文件** 定位到Hexo根目录下的`_config.icarus.yml`文件(若不存在则复制`_config.yml`并重命名)。 2. **修改导航栏显示设置** 在配置文件中找到`navbar`部分,添加或修改`display`字段为`false`: ```yaml navbar: display: false # 控制导航栏是否显示 menu: # 原有菜单配置保留不变 Home: / Archives: /archives ``` 3. **重启Hexo服务** 执行命令`hexo clean && hexo s`使配置生效[^1]。 此时导航栏将完全隐藏,但原导航栏占位区域可能遗留空白,可通过添加CSS修复: ```css /* 在主题的自定义CSS文件中添加 */ .navbar-container { display: none; } ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值