Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
eallion committed Aug 7, 2024
1 parent 66ea880 commit 49b3735
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 20 deletions.
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Blowfish 编译 TailwindCSS 的 main.css ,位于 [assets/css/compiled/main.css
# ../..

# bun dev
bun build
bun run build
```

```bash
Expand Down Expand Up @@ -138,16 +138,18 @@ https://github.com/eallion/eallion.com/blob/main/data/neodb/movie.json

### 🧑‍💻 bun 命令

- `bun new` 创建新文章
- `bun server` 启动 Hugo 服务器,文档内容为 `example` 目录
- `bun preview` 启动 Hugo 服务器,即预览线上生成环境,文档内容为 `content` 目录
- `bun syntax` Shiki 语法高亮
- `bun update` 更新 Submodule 子项目
- `bun run build` 构建 TailwindCSS 适用于生产环境的 main.css
- `bun hugo` 构建 Hugo,一般不用,都是交给 CI/CD 构建
- `bun dev` 启动 TailwindCSS 监听
- `bun hugo` 构建 Hugo,一般不用,都是交给 CI/CD 构建
- `bun new` 创建新文章,直接输入文章标题,生成到 example 目录
- `bun prepare` Git Commit Husky 勾子,目前用于提交时更新 Cloudflare Pages Wrangler 的 `HUGO_VERSION`
- `bun preview` 启动 Hugo 服务器,即预览线上生成环境,文档内容为 `content` 目录
- `bun recursive` 递归更新 Submodule 子项目,一般第一次克隆本项目时使用
- `bun run build` 构建 Blowfish 的 TailwindCSS `assets/css/compiled/main.css`
- `bun server` 启动 Hugo 服务器,文档内容为 `example` 目录
- `bun shiki` 生成 Shiki 语法高亮,目前已取消
- `bun theme` 更新 Submodule 子项目
- `bun vercel` 构建适用于 Vercel 平台的 Hugo,在 Vercel 平台使用
- `bun winnat` 谨慎使用,用于 Windows 重置 Winnat,解决绑定 1313 端口冲突

### 🔊 嘀咕页面

Expand Down Expand Up @@ -225,8 +227,7 @@ Summary 生成 AI 摘要现在添加到 `blog` 目录中的 Markdown 文件中
- `友情链接`:数据按 `data` 目录中的 `friends/links.json` 文件更新;
- `随手拍`:到 [e5n.cc](https://e5n.cc) 发带有 `#ealbum` 标签的 Toot;
- `好物`:数据按 `data` 目录中的 `goods.json` 文件更新;
- `Penta`:数据按 `data` 目录中的 `penta.json` 文件更新;
- `Steam`:数据在 `data` 目录中的 `steam_web_api.json` 每周 GitHub Actions 更新。
- `Penta`:数据按 `data` 目录中的 `penta.json` 文件更新。

##### 10. **Push**

Expand Down Expand Up @@ -297,7 +298,7 @@ git push

```diff
- hugo --cleanDestinationDir --forceSyncStatic --gc --ignoreCache --minify --enableGitInfo
+ bun build
+ bun hugo
```

- `--cleanDestinationDir` 构建前先清理目标目录,即 public
Expand Down Expand Up @@ -336,6 +337,12 @@ https://www.eallion.com/assets/images/1970/01/01.jpg
{{ end }}
```

- **文章图片**

> Blowfish 新增
对于文章图片,现在放于文章文件 `index.md` 同级目录

### 📷 相册

现在的相册页面采用 e5n.cc 的 `#ealbum` 标签动态渲染,只是一个示例页面。
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
"description": "eallion.com hugo blog",
"private": true,
"scripts": {
"build": "NODE_ENV=production&&bun run ./themes/blowfish/node_modules/tailwindcss/lib/cli.js -c ./themes/blowfish/tailwind.config.js -i ./themes/blowfish/assets/css/main.css -o ./assets/css/compiled/main.css --jit",
"dev": "NODE_ENV=development&&bun run ./themes/blowfish/node_modules/tailwindcss/lib/cli.js -c ./themes/blowfish/tailwind.config.js -i ./themes/blowfish/assets/css/main.css -o ./assets/css/compiled/main.css --jit -w",
"hugo": "hugo --cleanDestinationDir --forceSyncStatic --gc --ignoreCache --minify --enableGitInfo --templateMetrics --templateMetricsHints",
"server": "git submodule update --remote --merge && hugo server -w -D -p 1313 --bind 0.0.0.0 --contentDir example --minify --forceSyncStatic --ignoreCache --noHTTPCache --disableFastRender -e production --enableGitInfo --disableKinds RSS --printUnusedTemplates --templateMetrics --templateMetricsHints",
"new": "node scripts/new_post.js",
"prepare": "husky",
"preview": "git submodule update --remote --merge && hugo server -w -D -p 1313 --bind 0.0.0.0 --contentDir content --minify --forceSyncStatic --ignoreCache --noHTTPCache --disableFastRender -e production --enableGitInfo --templateMetrics --templateMetricsHints",
"syntax": "npx rehype-cli public -o",
"theme": "git submodule update --remote --merge",
"recursive": "git submodule update --init --recursive",
"dev": "NODE_ENV=development&&bun run ./themes/blowfish/node_modules/tailwindcss/lib/cli.js -c ./themes/blowfish/tailwind.config.js -i ./themes/blowfish/assets/css/main.css -o ./assets/css/compiled/main.css --jit -w",
"build": "NODE_ENV=production&&bun run ./themes/blowfish/node_modules/tailwindcss/lib/cli.js -c ./themes/blowfish/tailwind.config.js -i ./themes/blowfish/assets/css/main.css -o ./assets/css/compiled/main.css --jit",
"vercel": "node scripts/hugo_version.js && hugo --cleanDestinationDir --forceSyncStatic --gc --ignoreCache --minify --enableGitInfo && next build",
"winnat": "sudo net stop winnat -y && sudo net start winnat -y",
"prepare": "husky"
"server": "git submodule update --remote --merge && hugo server -w -D -p 1313 --bind 0.0.0.0 --contentDir example --minify --forceSyncStatic --ignoreCache --noHTTPCache --disableFastRender -e production --enableGitInfo --disableKinds RSS --printUnusedTemplates --templateMetrics --templateMetricsHints",
"shiki": "npx rehype-cli public -o",
"theme": "git submodule update --remote --merge",
"vercel": "node scripts/vercel_env_hugo_version.js && hugo --cleanDestinationDir --forceSyncStatic --gc --ignoreCache --minify --enableGitInfo && next build",
"winnat": "sudo net stop winnat -y && sudo net start winnat -y"
},
"repository": {
"type": "git",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"build": {
"env": {
"HUGO_VERSION": "0.120.4"
"HUGO_VERSION": "0.131.0"
}
},
"git": {
Expand Down

0 comments on commit 49b3735

Please sign in to comment.