Skip to content

Commit

Permalink
📃 docs: 增加修改示例
Browse files Browse the repository at this point in the history
  • Loading branch information
白云苍狗 committed Mar 28, 2024
1 parent 51b8e4d commit aeb24d3
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 29 deletions.
12 changes: 6 additions & 6 deletions demo/_config.async.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ cover:
- https://img1.wallspic.com/previews/8/8/7/8/5/158788/158788-e_mo_sha_shoukimetsu_no_yaiba-shnen_man_hua-tao-ka_tong-azure-500x.jpg
type: random

layout:
footer: async/footer
page_loading: async/page-loading
post_card: async/post-card
fixed_btn: async/fixed-btn
# header_search: async/empty
# layout:
# footer: async/footer
# page_loading: async/page-loading
# post_card: async/post-card
# fixed_btn: async/fixed-btn
# header_search: async/empty

banner:
danmu:
Expand Down
10 changes: 10 additions & 0 deletions docs/.vitepress/assets/log.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
{
"large_version": "v2.1.x",
"children": [
{
"version": "2.1.14",
"date": "2024-03-28",
"logs": [
{
"type": "fix",
"text": "修复弹幕动画重叠问题"
}
]
},
{
"version": "2.1.13",
"date": "2024-03-20",
Expand Down
25 changes: 23 additions & 2 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,28 @@ export default defineConfig({
title: 'Hexo-Theme-Async',
description: '🎈 A simple, lightweight Hexo theme',
lastUpdated: true,
head: [['link', { rel: 'icon', href: '/favicon.svg' }]],
head: [
['link', { rel: 'icon', href: '/favicon.svg' }],
['meta', { property: 'og:type', content: 'website' }],
['meta', { property: 'og:title', content: 'hexo-theme-async 主题' }],
['meta', { property: 'og:image', content: '/favicon.svg' }],
['meta', { property: 'og:url', content: 'https://www.imalun.com' }],
['meta', { property: 'og:description', content: '一个简单而轻量级的 Hexo 主题' }],
// 添加百度统计代码
[
'script',
{},
`
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?bfb308357e73d7e9c856af04a77e822d";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
`,
],
],
locales: {
'/en/': {
lang: 'en-US',
Expand Down Expand Up @@ -159,7 +180,7 @@ export default defineConfig({
},
footer: {
message: 'Released under the SATA | MIT License.',
copyright: 'Copyright © 2020-PRESENT MaLuns',
copyright: 'Copyright © 2022-PRESENT MaLuns',
},
},
});
6 changes: 6 additions & 0 deletions docs/.vitepress/theme/styles/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@

--vp-home-hero-name-background: linear-gradient(135deg, #43cbff 10%, #9708cc 100%);
--vp-home-hero-name-color: transparent;
--vp-home-hero-image-background-image: linear-gradient(-45deg, #85ff7e 50%, #e391ff 50%);
--vp-home-hero-image-filter: blur(72px);
/* --vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%);
--vp-home-hero-image-filter : blur(80px); */

.VPImage.image-src {
width: 160px;
}

&.dark {
.VPImage.image-src {
filter: invert(1);
Expand Down
49 changes: 30 additions & 19 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

::: danger 提醒

- 安装问题
- 安装问题

本插件为 Hexo 主题插件,如果您想使用这款主题模板,请确保您对 Hexo 有一些基本了解。关于 Hexo 初始化不成功、Npm 安装失败等问题,一般与主题无关,请检查自己网络环境,合理利用搜索引擎解决。

- 配置问题
- 配置问题

**本文档已经覆盖了,本主题使用的 99% 配置**。遇到问题时,**请优先翻阅文档**,参考文档里的说明。如果使用中发现文档中有解释存在歧义地方,可以通过上面多种渠道进行反馈,也可以提交 PR 进行完善。
:::
Expand All @@ -40,7 +40,7 @@ yarn add -D hexo-renderer-less hexo-renderer-ejs

## 安装主题 Install

- 通过 npm 安装 (推荐)
- 通过 npm 安装 (推荐)

![npm (tag)](https://img.shields.io/npm/v/hexo-theme-async/latest?color=red&label=hexo-theme-async%40latest&logo=npm&style=for-the-badge)

Expand All @@ -50,7 +50,7 @@ yarn add -D hexo-renderer-less hexo-renderer-ejs
npm i hexo-theme-async@latest
```

- 通过克隆本仓库安装(不推荐)
- 通过克隆本仓库安装(不推荐)

::: danger
不推荐直接使用这种方式安装,会导致 bug 版本定位和后续升级比较麻烦。如果您需要自定义样式和页面模块,可以优先使用 [自定义样式](./config.html#自定义样式-style)[自定义模板](./config.html#自定义模板-layout) 配置来个性话您的博客,如果以上方式无法满足您的需求时,且不在需要升级时可选择通过这种方式安装。
Expand Down Expand Up @@ -82,7 +82,7 @@ npm i hexo-theme-async@latest

:::

- 通过 npm 安装预览版
- 通过 npm 安装预览版

![npm (tag)](https://img.shields.io/npm/v/hexo-theme-async/beta?color=red&label=hexo-theme-async%40beta&logo=npm&style=for-the-badge)

Expand Down Expand Up @@ -119,34 +119,45 @@ theme: async

```yaml
theme:
switch: true
default: style-light # style-light style-dark
switch: true
default: style-light # style-light style-dark
```

您可以在 `_config.async.yml` 中仅定义(当然,全部覆盖也是可以的)需要覆盖配置

```yaml
theme:
default: style-dark
default: style-dark
```

:::

更多主题配置 [请看这里](./config)

## 代码示例 Demo Code

自定义个性化修改示例

- [在线体验](https://stackblitz.com/edit/node-tshsxq?embed=1&file=README.md)
- [添加背景纹理样式示例](https://stackblitz.com/edit/node-bgnr3f?embed=1&file=README.md)
- [自定义文章卡片示例](https://stackblitz.com/edit/node-xxazk9?file=README.md)
- [自定义加载动画示例](https://stackblitz.com/edit/node-symrnq?file=README.md)
- [搜索、主题按钮调整示例](https://stackblitz.com/edit/node-ghpn8p?file=README.md)


## 安装演示视频 Demo Video

- 安装
- [npm 安装演示](https://www.bilibili.com/video/BV1Cs4y1J7vv/)
- [下载到 themes 目录演示](https://www.bilibili.com/video/BV1mg4y137Zi/)
- 配置
- [常用配置演示](https://www.bilibili.com/video/BV1cm4y1z7tQ/)
- [主题自定义图标、自定义代码高亮演示](https://www.bilibili.com/video/BV1Da4y1M7UF/)
- [随机封面、友链页、相册页面配置演示](https://www.bilibili.com/video/BV1cs4y1m7RT/)
- 运行源码
- [hexo-theme-async 源码运行演示](https://www.bilibili.com/video/BV19L41127LH/)
- 在线体验
- [stackblitz](https://stackblitz.com/edit/node-tshsxq?embed=1&file=README.md)
- 安装
- [npm 安装演示](https://www.bilibili.com/video/BV1Cs4y1J7vv/)
- [下载到 themes 目录演示](https://www.bilibili.com/video/BV1mg4y137Zi/)
- 配置
- [常用配置演示](https://www.bilibili.com/video/BV1cm4y1z7tQ/)
- [主题自定义图标、自定义代码高亮演示](https://www.bilibili.com/video/BV1Da4y1M7UF/)
- [随机封面、友链页、相册页面配置演示](https://www.bilibili.com/video/BV1cs4y1m7RT/)
- 运行源码
- [hexo-theme-async 源码运行演示](https://www.bilibili.com/video/BV19L41127LH/)
- 在线体验
- [stackblitz](https://stackblitz.com/edit/node-tshsxq?embed=1&file=README.md)

安装示例视频,更多视频前往[这里](https://space.bilibili.com/12763040/channel/seriesdetail?sid=3170241)

Expand Down
13 changes: 11 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ layout: home
hero:
name: Hexo-Theme-Async
image:
src: /logo.gif
tagline: 🎈 A simple & lightweight theme for Hexo.
src: /logo.svg
tagline: 🎈 A simple & lightweight theme for Hexo. <br> 一个简单而轻量级的 Hexo 主题。
actions:
- text: 🚀 Get Started
link: /guide/
Expand All @@ -24,6 +24,15 @@ features:
- title: PWA
icon: 🛠️
details: 支持PWA,提升访问速度,可离线使用。
- title: 个性化
icon: 🌈
details: 高度可配置,可自定义主题色调
- title: 模块化
icon: 🧱
details: 所有模块皆可替代,快速个性化局部模块
- title: 示例
icon: 🌼
details: 提供完整文档,以及个性化示例

footer:
license: MIT Licensed
Expand Down

0 comments on commit aeb24d3

Please sign in to comment.