Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Lhcfl committed Nov 25, 2024
1 parent ccfb40f commit a0d7b69
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 33 deletions.
51 changes: 18 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@

Live Demo: https://lhcfl.github.io/hexo-theme-sosimple/

[![Build](https://github.com/Lhcfl/hexo-theme-sosimple/actions/workflows/test_and_build.yml/badge.svg)](https://github.com/Lhcfl/hexo-theme-sosimple/actions/workflows/test_and_build.yml) [![Format](https://github.com/Lhcfl/hexo-theme-sosimple/actions/workflows/format_test.yml/badge.svg)](https://github.com/Lhcfl/hexo-theme-sosimple/actions/workflows/format_test.yml)
[![Build](https://github.com/Lhcfl/hexo-theme-sosimple/actions/workflows/test_and_build.yml/badge.svg)](https://github.com/Lhcfl/hexo-theme-sosimple/actions/workflows/test_and_build.yml) [![Format](https://github.com/Lhcfl/hexo-theme-sosimple/actions/workflows/format_test.yml/badge.svg)](https://github.com/Lhcfl/hexo-theme-sosimple/actions/workflows/format_test.yml) [中文](./README_zh.md)

超级干净的,致力于尽可能少写 CSS,展现原汁原味的 HTML 风格主题。
Super clean theme, aiming to write as little CSS as possible and show the original HTML style. The theme is optimized for no CSS and no JavaScript to ensure that it can be displayed normally under pure HTML. You can even just copy the entire page and paste it into a Markdown editor with the nice formatting kept :\).

简约但现代化,功能齐全。

支持自动生成 TOC、内置全文搜索、亮色-暗色模式切换。
Simple but modern, full-featured. Supports automatic generating TOC, built-in full-text fuzzy search, dark/light mode switching etc.

## Install

Expand All @@ -24,48 +22,35 @@ cd themes/SoSimple
pnpm i # You must do this
```

### 配置
### Configuration

复制`_config.example.yml``_config.yml`
修改hexo根目录下的 `_config.yml``theme: SoSimple`
copy `_config.example.yml` to `_config.yml` and edit it.

### 更新、
Change your hexo config: `theme: SoSimple`

在SoSimple的目录下
### Update

```bash
git pull origin main
```

## 开发

### 准备工作

进入SoSimple的目录,执行

```bash
pnpm i
```

安装所有依赖。

### 目录结构
## Development

- `.github`: GitHub CI 配置文件,用于自动部署样例
- `includes`: 主题内置的 Hexo 脚本
- `languages`: I18n 文件
- `layout` 主题使用的模板,在服务端(也就是 `hexo g`)渲染成最后的 HTML
- `scripts`: 主题内置的 Hexo 脚本
- `source`: 主题需要的HTML资产
- `src`: 主题前端相关的 typescript 脚本。这些脚本会被 `rollup` 打包并压缩成一个 `js/complied/bundle.js` `bundle.css`
- `.github`: GitHub CI config file
- `includes`: Hexo scripts
- `languages`: I18n files
- `layout`: Pug templates, will render to HTML
- `scripts`: Hexo scripts
- `source`: HTML assets
- `src`: Typescript and SCSS source dir. It will `rollup` into `js/complied/bundle.js` and `bundle.css`

### 代码格式化
### Formatting

对本主题做出修改后,使用下面的命令可以对代码进行格式化
After modifying the theme file, you can format it with the following command:

```bash
pnpm format
pnpm lint
```

详见 `package.json`
See `package.json`
71 changes: 71 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<div style="text-align: center">

**So Simple!**

![Preview](https://i.ibb.co/0qfvTnN/image.png)

</div>

Live Demo: https://lhcfl.github.io/hexo-theme-sosimple/

[![Build](https://github.com/Lhcfl/hexo-theme-sosimple/actions/workflows/test_and_build.yml/badge.svg)](https://github.com/Lhcfl/hexo-theme-sosimple/actions/workflows/test_and_build.yml) [![Format](https://github.com/Lhcfl/hexo-theme-sosimple/actions/workflows/format_test.yml/badge.svg)](https://github.com/Lhcfl/hexo-theme-sosimple/actions/workflows/format_test.yml)

超级干净的,致力于尽可能少写 CSS,展现原汁原味的 HTML 风格主题。主题对于无 CSS 和无 JavaScript 做了优化,确保在纯粹的 HTML 下也可以正常显示。适合极端纯洁的HTML爱好者。

简约但现代化,功能齐全。

支持自动生成 TOC、内置全文搜索、亮色-暗色模式切换。

## Install

```bash
git clone https://github.com/Lhcfl/hexo-theme-sosimple.git themes/SoSimple
cd themes/SoSimple
pnpm i # 这这一步是必须的!
```

### 配置

复制`_config.example.yml``_config.yml`
修改hexo根目录下的 `_config.yml``theme: SoSimple`

### 更新

在SoSimple的目录下

```bash
git pull origin main
```

## 开发

### 准备工作

进入SoSimple的目录,执行

```bash
pnpm i
```

安装所有依赖。

### 目录结构

- `.github`: GitHub 的 CI 配置文件,用于自动部署样例
- `includes`: 主题内置的 Hexo 脚本
- `languages`: I18n 文件
- `layout` 主题使用的模板,在服务端(也就是 `hexo g`)渲染成最后的 HTML
- `scripts`: 主题内置的 Hexo 脚本
- `source`: 主题需要的HTML资产
- `src`: 主题前端相关的 typescript 脚本。这些脚本会被 `rollup` 打包并压缩成一个 `js/complied/bundle.js``bundle.css`

### 代码格式化

对本主题做出修改后,使用下面的命令可以对代码进行格式化

```bash
pnpm format
pnpm lint
```

详见 `package.json`

0 comments on commit a0d7b69

Please sign in to comment.