Hexo-Theme-Acrylic-Next 项目使用教程

Hexo-Theme-Acrylic-Next 项目使用教程

Hexo-Theme-Acrylic-Next下一代Acrylic何必是butterfly项目地址:https://gitcode.com/gh_mirrors/he/Hexo-Theme-Acrylic-Next

1. 项目的目录结构及介绍

Hexo-Theme-Acrylic-Next 项目的目录结构如下:

Hexo-Theme-Acrylic-Next/
├── layout/
├── scripts/
├── source/
├── LICENSE
├── README.md
├── _config.yml
└── package.json

目录介绍:

  • layout/: 存放主题的模板文件,这些文件定义了网站的布局和结构。
  • scripts/: 存放自定义脚本文件,用于扩展主题功能。
  • source/: 存放静态资源文件,如CSS、JavaScript、图片等。
  • LICENSE: 项目的许可证文件。
  • README.md: 项目的说明文档。
  • _config.yml: 主题的配置文件。
  • package.json: 项目的依赖和脚本配置文件。

2. 项目的启动文件介绍

Hexo-Theme-Acrylic-Next 项目的启动文件主要是 _config.ymlpackage.json

_config.yml

这是主题的主要配置文件,包含了主题的各种设置,如网站标题、描述、导航菜单、侧边栏等。

package.json

这个文件定义了项目的依赖和脚本。通过运行 npm install 可以安装所有依赖,通过运行 npm run 可以执行定义的脚本。

3. 项目的配置文件介绍

_config.yml

_config.yml 文件是 Hexo-Theme-Acrylic-Next 的核心配置文件,包含了以下几个主要部分:

  • 站点配置: 包括网站的标题、副标题、描述、作者等信息。
  • 主题配置: 包括主题的各种设置,如导航菜单、侧边栏、社交链接等。
  • 插件配置: 如果有使用插件,相关的配置也会在这里。

示例配置:

# Site
title: 我的博客
subtitle: ''
description: ''
author: 你的名字
language: zh-CN
timezone: ''

# URL
## If your site is put in a subdirectory, set url as 'http://example.com/child' and root as '/child/'
url: http://example.com
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace:

# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
  path: ''
  per_page: 10
  order_by: -date

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format by specifying one of the formats in moment.js
date_format: YYYY-MM-DD
time_format: HH:mm:ss

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: Acrylic

# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
  type: ''

通过修改 _config.yml 文件,可以自定义你的博客的各种设置。

Hexo-Theme-Acrylic-Next下一代Acrylic何必是butterfly项目地址:https://gitcode.com/gh_mirrors/he/Hexo-Theme-Acrylic-Next

  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

郎赞柱

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

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

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

打赏作者

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

抵扣说明:

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

余额充值