Hexo 主题 Matery 教程

Hexo 主题 Matery 教程

hexo-theme-materyA beautiful hexo blog theme with material design and responsive design.一个基于材料设计和响应式设计而成的全面、美观的Hexo主题。国内访问:http://blinkfox.com项目地址:https://gitcode.com/gh_mirrors/he/hexo-theme-matery

1. 项目目录结构及介绍

.
├── node_modules           # 子模块依赖包
├── scaffolds              # 用于创建新页面的模板
├── scripts                 # 自定义脚本
├── sources                 # 用户自定义源文件
│   └── assets              # 自定义静态资源
│   └── ...(其他自定义文件)
├── themes                  # 主题文件夹
│   └── matery              # Matery 主题文件
│       ├── _config.yml     # 主题配置文件
│       ├── ...(其他主题文件)
└── _config.yml             # 主站配置文件

node_modules: 包含主题依赖的Node.js模块。 scaffolds: 存放用于快速创建新页面的模板。 scripts: 用户可添加的自定义脚本,如编译或发布任务。 sources: 用户内容存储目录,包括自定义静态资源和其他文件。 themes/matery: Matery主题文件夹,包含主题的所有组件和配置。

2. 项目的启动文件介绍

主要涉及两个启动文件:

  • _config.yml: 在Hexo根目录下,这是主站点的全局配置文件,用来设置URL、部署策略、插件和各种全局选项。

  • themes/matery/_config.yml: 这是Matery主题的配置文件,包含了主题特有的设置,比如颜色、布局和显示选项。

启动Hexo应用时,首先运行hexo clean清理缓存,然后通过hexo server启动本地开发服务器,这时会读取上述配置文件进行渲染。

3. 项目的配置文件介绍

主站配置文件 _config.yml

# 站点信息
title: Your Blog Title
subtitle: Your Blog Subtitle
description: Your Blog Description
author: Your Name
language: zh-CN
timezone: Asia/Shanghai

# URL
url: http://your-blog-url.com
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:

# Deployment
deploy:
  type: git
  repo: <your-repo-url>
  branch: master

# Other settings...

主题配置文件 themes/matery/_config.yml

# 主题基本设置
theme: matery
paginate: 6
pagination_dir: /page
archive_yearly: true

# Header
menu:
  home: /
  about: /about
  archives: /archives
  tags: /tags
  categories: /categories

# Banner
banner:
  enable: true
  autoHeight: false
  title: Your banner title
  desc: Your banner description
  bgImg: /path/to/banner-image.jpg

# Post settings
post:
  excerpt: true
  excerpt_length: 200
  showReadingTime: true
  toc: true
  tocNumbered: false
  authorAvatar: false

# 更多配置项...

以上是Matery主题的基本配置,详细的配置选项请参考官方文档。根据你的需求调整这些设置,可以定制出符合个人风格的博客界面。记得每次修改配置后保存并重新构建(hexo g)以应用更改。

hexo-theme-materyA beautiful hexo blog theme with material design and responsive design.一个基于材料设计和响应式设计而成的全面、美观的Hexo主题。国内访问:http://blinkfox.com项目地址:https://gitcode.com/gh_mirrors/he/hexo-theme-matery

Hexo Matery是一款基于Hexo的个性化主题,可以用于搭建个人博客网站。要使用Hexo Matery主题,首先需要在根目录的_config.yml文件中找到theme配置项,并将其更改为"matery"。然后执行"hexo clean"命令清理一下,再执行"hexo g"命令重新生成静态页面,最后执行"hexo s"命令运行本地服务器。在浏览器中输入"localhost:4000"访问你的网站,你会发现主题已经成功更改。 如果你想要开启文章字数统计功能,还需要安装hexo-wordcount插件。可以通过执行命令"npm i --save hexo-wordcount"进行安装。如果npm命令加载慢,还可以尝试使用cnpm命令进行安装。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [hexo博客matery主题的个性化配置](https://blog.csdn.net/qq_41376237/article/details/113475727)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *3* [hexomatery主题的个性化定制](https://blog.csdn.net/weixin_46399753/article/details/104768713)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

计攀建Eliza

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值