Compare commits
7 Commits
develop
...
1536ffa319
Author | SHA1 | Date | |
---|---|---|---|
1536ffa319 | |||
24aadfa329 | |||
bd4a211c6c | |||
e263be3fe9 | |||
fede1341b0 | |||
e2af844823 | |||
e470ac241e |
@ -35,7 +35,9 @@
|
||||
"esbenp.prettier-vscode",
|
||||
"shardulm94.trailing-spaces",
|
||||
"lihui.vs-color-picker",
|
||||
"bradlc.vscode-tailwindcss"
|
||||
"bradlc.vscode-tailwindcss",
|
||||
"github.vscode-github-actions",
|
||||
"GitHub.copilot"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
3
.github/FUNDING.yml
vendored
3
.github/FUNDING.yml
vendored
@ -1,3 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: timlrx
|
37
.github/ISSUE_TEMPLATE/bug_report.md
vendored
37
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,37 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**System Info (if dev / build issue):**
|
||||
- OS: [e.g. iOS]
|
||||
- Node version (please ensure you are using 14+)
|
||||
- Npm version
|
||||
|
||||
**Browser Info (if display / formatting issue):**
|
||||
- Device [e.g. Desktop, iPhone6]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
31
.github/workflows/build-and-deploy-by-ftp.yaml
vendored
Normal file
31
.github/workflows/build-and-deploy-by-ftp.yaml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: 🚀 Build and deploy by ftp
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
jobs:
|
||||
|
||||
ftp-build-and-deploy:
|
||||
name: 🎉 Deploy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🚚 Get latest code
|
||||
uses: https://github.com/actions/checkout@v3
|
||||
|
||||
- uses: https://github.com/actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- run: npm i --location=global pnpm@7
|
||||
- run: pnpm i
|
||||
- run: pnpm build
|
||||
- run: npm run export
|
||||
|
||||
- name: 📂 Sync files
|
||||
uses: https://github.com/SamKirkland/FTP-Deploy-Action@v4.3.4
|
||||
with:
|
||||
server: ${{ secrets.ftp_server }}
|
||||
username: ${{ secrets.ftp_username }}
|
||||
password: ${{ secrets.ftp_password }}
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Ivan Li
|
||||
avatar: https://pan.ivanli.cc/api/v3/file/source/1234/头像.png?sign=xIgy54DyFRYupxjZJbK02HmpKX8C53YR-O0I18Rxm70%3D%3A0
|
||||
avatar: https://minio.ivanli.cc/ivan-public/uPic/2023/Urpetm.png
|
||||
occupation: Web Full Stack Developer
|
||||
email: master@ivanli.cc
|
||||
github: https://github.com/IvanLi-CN
|
||||
|
@ -4,10 +4,7 @@ date: '2022-10-17'
|
||||
tags: ['Arch Linux', '环境搭建', 'VPS']
|
||||
draft: false
|
||||
summary: 有了上次快速安装步骤后,接下来就是使用这个环境了。要使用环境,首先需要做一些初始化操作。我的步骤适合我,但不一定适合你,只是记录和参考。
|
||||
images:
|
||||
[
|
||||
'https://pan.ivanli.cc/api/v3/file/source/2238/archlinux-logo-light.png?sign=bWxqFFy3RUDT5UsWb4UD5byt-_L4h79wede3runRKFc%3D%3A0',
|
||||
]
|
||||
images: ['https://minio.ivanli.cc/ivan-public/uPic/2023/RTr3IU.png']
|
||||
---
|
||||
|
||||
## Docker
|
||||
|
282
data/blog/build-docker-image-for-other-project.md
Normal file
282
data/blog/build-docker-image-for-other-project.md
Normal file
@ -0,0 +1,282 @@
|
||||
---
|
||||
title: 使用 Github Actions 为其他项目构建 Docker Image
|
||||
date: '2023-07-09'
|
||||
tags: ['Github Actions', 'CI/CD', 'Docker']
|
||||
draft: false
|
||||
summary: 使用 Github Actions,为自己喜爱的 Github 开源项目,快速、独立、自动化地构建 Docker 镜像,并推送到 ghcr (GitHub Container Registry)。
|
||||
images: ['https://minio.ivanli.cc/ivan-public/uPic/2023/DZhPx7.jpg']
|
||||
---
|
||||
|
||||
## 背景
|
||||
|
||||
这两天搞起了自动追番,使用了 [AutoBangumi](https://github.com/EstrellaXD/Auto_Bangumi/tree/main) 及其部署文档使用的方案组了个套件。感觉还不错,使用 Plex 播放,也让我的 iPad 终于能好好当个播放器了。
|
||||
|
||||
其中就包括一个 qBittorrent 程序,自带的 Web UI 很工具化,不是很漂亮,也不是很好用。所以我就找了第三方的,正好它没有单独的 Docker image,所以我就做个自动化构建吧。
|
||||
|
||||
本来想在自建的 Gitea Actions 运行的,不过想了想,这个丢 Github 上跑比较合适,反正源头都在 Github 上。之前也有注意到做同样事情的库,但是一直想不起来是什么项目,就没找到……那作业没得抄,只能自己写了。
|
||||
|
||||
对了,我选择的 qBittorrent Web UI 是 [VueTorrent](https://github.com/WDaan/VueTorrent)。
|
||||
|
||||
## 方案
|
||||
|
||||
方案很简单,将目标项目作为 Git Submodule 放在我们的构建 Repo 中。然后分为两步:
|
||||
|
||||
1. 使用定时任务,每天检查最新发布的版本。将最新版本拉到项目中并提交。
|
||||
2. 使用 push 触发器,将新版本构建成 Docker image 并推送到 ghcr (GitHub Container Registry)。
|
||||
|
||||
项目地址在这:[IvanLi-CN/vue-torrent-docker: Automatically build VueTorrent Docker images](https://github.com/IvanLi-CN/vue-torrent-docker)
|
||||
|
||||
## 实施
|
||||
|
||||
下面就是流水帐了。实施这个方案的话,我是先做第二步。因为我当时需要一个 Docker image 来替换原始方案。在文章里,为了流程顺畅,就按上帝视角,用正常的顺序来编写吧。毕竟不是教程,就不循序渐进了。
|
||||
|
||||
### 定时检查上游更新
|
||||
|
||||
Github Actions 支持使用 Cron 来创建一个定时任务。
|
||||
所以触发 Action 的问题轻松解决。
|
||||
|
||||
```yaml
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 2 * * *'
|
||||
```
|
||||
|
||||
那么第二步就是获取上游最新的发布版本了。
|
||||
上游使用 “Github Releases” 发布版本:
|
||||
|
||||

|
||||
|
||||
所以这里使用了 [git-get-release-action](https://github.com/marketplace/actions/git-get-release-action),获取最新的版本号和 commitish hash。
|
||||
其中版本号就是 tag name,而 commit-ish hash 就是平常使用的 commit hash 了。
|
||||
|
||||
```yaml
|
||||
- name: git-get-release-action
|
||||
id: git-get-release
|
||||
uses: cardinalby/git-get-release-action@1.2.4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
repo: WDaan/VueTorrent
|
||||
latest: true
|
||||
```
|
||||
|
||||
这里提供了几个参数:
|
||||
|
||||
- `GITHUB_TOKEN` 是自动注入的,我们将这个变量作为环境变量提供给 git-get-release-action 就行,缺少这个变量,这个步骤会报错。
|
||||
- 我们通过 `repo` 提供了上游的仓库名称 “WDaan/VueTorrent”,这个仓库在 Github 上,所以可以直接这么简写。
|
||||
- 因为只需要获取最新的发布版本,所以提供了 `latest` 为 `true`。
|
||||
|
||||
这一步骤会有两个关键的输出:
|
||||
|
||||
- `tag_name` 是我们想要的最新版本的版本号,因为他的 git tag 写的就是版本号,例如现在的 `v1.6.0`。
|
||||
- `current_commitish` 就顾名思义了,接下来就是要用他作为当前 commit 的唯一标记。
|
||||
|
||||
我们有了最新版本的 commit-ish 值,那就要有上次构建 Docker image 时用的 commit-ish 值。
|
||||
|
||||
```yaml
|
||||
- name: Get current commitish
|
||||
id: get-current-commitish
|
||||
run: |
|
||||
cd vue-torrent
|
||||
echo "Current commitish: $(git rev-parse HEAD)"
|
||||
echo "::set-output name=current_commitish::$(git rev-parse HEAD)"
|
||||
```
|
||||
|
||||
这里直接进入子模块的目录里,使用 `git rev-parse HEAD` 命令获取当前 repo 使用的上游的 commit-ish。
|
||||
因为我们每次构建镜像前,都会先更新子模块的 commit 位置,所以这里就是上次发布镜像时的 commit-ish 了。
|
||||
|
||||
再因为我们一直是单调地往按时间往更新的构建,所以不需要比较 commit 的新旧,只要不一样,就是要构建新的镜像。
|
||||
所以我们这一步,就直接比较最新的 commit 和现在的 commit 是否一直:
|
||||
|
||||
```yaml
|
||||
- name: Compare versions
|
||||
id: compare
|
||||
run: |
|
||||
echo "Current version: ${{ steps.git-get-release.outputs.tag_name }}"
|
||||
echo "::set-output name=should_update::${{ steps.git-get-release.outputs.target_commitish != steps.get-current-commitish.outputs.current_commitish }}"
|
||||
```
|
||||
|
||||
下面就是重要的三个步骤了,一更新子模块,二提交更新,三打标签。
|
||||
|
||||
#### 更新子模块
|
||||
|
||||
```yaml
|
||||
- name: Update
|
||||
if: steps.compare.outputs.should_update == 'true'
|
||||
working-directory: ./vue-torrent
|
||||
run: |
|
||||
git fetch --depth=1 origin ${{ steps.git-get-release.outputs.tag_name }}
|
||||
git checkout -b ${{ steps.git-get-release.outputs.tag_name }} ${{ steps.git-get-release.outputs.target_commitish }}
|
||||
git reset --hard HEAD
|
||||
```
|
||||
|
||||
_这里使用了 `working-directory` 更改执行目录到子模块中,用 `cd` 进去应该也一样。_
|
||||
|
||||
因为之前检出存储库时是只检出最新的那个 commit,所以需使用 `git fetch` 将我们需要的那个 commit 拉到运行环境中,否则会报形如 `fatal: Could not parse object '6ab00a179b9509ef162a14862fb828c78144caff'.` 的错误。
|
||||
|
||||
之后使用 `git checkout -b` 将目标的 commit 拉到新的分支上。
|
||||
|
||||
最后,将当前的位置设到 HEAD,即目标 commit。
|
||||
|
||||
后两步应该是可以直接改成 `git reset --hard ${{ steps.git-get-release.outputs.target_commitish }}`,不过我没试过,仅供参考。
|
||||
|
||||
#### 提交更新
|
||||
|
||||
```yaml
|
||||
- name: Commit changes
|
||||
if: steps.compare.outputs.should_update == 'true'
|
||||
run: |
|
||||
git diff
|
||||
git config user.name "GitHub Actionss"
|
||||
git config user.email "bot@noreply.github.com"
|
||||
git add .
|
||||
git commit -m "Update to ${{ steps.git-get-release.outputs.tag_name }}"
|
||||
git push origin ${{ github.ref_name }}
|
||||
```
|
||||
|
||||
这就没什么好说的了,需要注意的一点就是权限问题。因为我们是 push 到当前的 repo 上,所以可以直接使用自动注入的 `GITHUB_TOKEN`,不过需要在 repo 的设置页面更改下权限:
|
||||
|
||||

|
||||
|
||||
选择 “Read and write permissions",这样就能写入当前的 repo。
|
||||
|
||||
#### 打标签
|
||||
|
||||
```yaml
|
||||
- name: Tag
|
||||
if: steps.compare.outputs.should_update == 'true'
|
||||
run: |
|
||||
git tag ${{ steps.git-get-release.outputs.tag_name }}
|
||||
git push origin ${{ steps.git-get-release.outputs.tag_name }}
|
||||
```
|
||||
|
||||
目的就是后面构建镜像时,能方便地从这里取到版本号。
|
||||
|
||||
### 构建镜像
|
||||
|
||||
这个就比较简单了,代码在这:
|
||||
|
||||
[Action](https://github.com/IvanLi-CN/vue-torrent-docker/blob/7439b89cb87bb4627d87f0445e8c1fc39ed89f78/.github/workflows/auto-build.yaml)
|
||||
|
||||
[Dockerfile](https://github.com/IvanLi-CN/vue-torrent-docker/blob/7439b89cb87bb4627d87f0445e8c1fc39ed89f78/.github/workflows/auto-build.yaml)
|
||||
|
||||
因为直接做成子模块了,流程就简单很多了,只要检出代码时将子模块一并检出,之后直接构建 Docker 镜像就行。
|
||||
|
||||
我也不知道有没有人用,只构建了 x86 的自用。
|
||||
|
||||
## 最后
|
||||
|
||||
分享一下我现在用的追番的 Docker Compose 吧:
|
||||
|
||||
`docker-compose.yaml`
|
||||
|
||||
```yaml
|
||||
version: '3.2'
|
||||
services:
|
||||
caddy:
|
||||
container_name: caddy
|
||||
ports:
|
||||
- ${QB_PORT}:80
|
||||
networks:
|
||||
- auto_bangumi
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./caddy:/etc/caddy
|
||||
image: caddy:2
|
||||
vuetorrent:
|
||||
container_name: vuetorrent
|
||||
expose:
|
||||
- 3000
|
||||
networks:
|
||||
- auto_bangumi
|
||||
restart: unless-stopped
|
||||
image: ghcr.io/ivanli-cn/vue-torrent:main
|
||||
qbittorrent:
|
||||
container_name: qBittorrent
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- TemPath=/downloads
|
||||
- SavePath=/downloads
|
||||
- PGID=${GID}
|
||||
- PUID=${UID}
|
||||
- WEBUI_PORT=8080
|
||||
volumes:
|
||||
- qb_config:/config
|
||||
- ${DOWNLOAD_PATH}:/downloads
|
||||
ports:
|
||||
- 6881:6881
|
||||
- 6881:6881/udp
|
||||
networks:
|
||||
- auto_bangumi
|
||||
restart: unless-stopped
|
||||
image: superng6/qbittorrent:latest
|
||||
|
||||
auto_bangumi:
|
||||
container_name: AutoBangumi
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- PGID=${GID}
|
||||
- PUID=${UID}
|
||||
- AB_DOWNLOADER_HOST=qbittorrent:${QB_PORT}
|
||||
networks:
|
||||
- auto_bangumi
|
||||
volumes:
|
||||
- ./auto_bangumi/config:/app/config
|
||||
- ./auto_bangumi/data:/app/data
|
||||
ports:
|
||||
- 7892:7892
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 223.5.5.5
|
||||
restart: unless-stopped
|
||||
image: estrellaxd/auto_bangumi:latest
|
||||
depends_on:
|
||||
- qbittorrent
|
||||
|
||||
plex:
|
||||
container_name: Plex
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- PUID=${UID}
|
||||
- PGID=${GID}
|
||||
- VERSION=docker
|
||||
- PLEX_CLAIM=${PLEX_CLAIM}
|
||||
networks:
|
||||
- auto_bangumi
|
||||
ports:
|
||||
- 32400:32400
|
||||
volumes:
|
||||
- plex_config:/config
|
||||
- ${DOWNLOAD_PATH}/Bangumi:/tv
|
||||
restart: unless-stopped
|
||||
image: lscr.io/linuxserver/plex:latest
|
||||
|
||||
networks:
|
||||
auto_bangumi:
|
||||
|
||||
volumes:
|
||||
qb_config:
|
||||
external: false
|
||||
plex_config:
|
||||
external: false
|
||||
```
|
||||
|
||||
`caddy/Caddyfile`
|
||||
|
||||
```Caddyfile
|
||||
:80 {
|
||||
reverse_proxy /api/* qbittorrent:8080
|
||||
reverse_proxy /* vuetorrent:3000
|
||||
}
|
||||
```
|
||||
|
||||
`.env`
|
||||
|
||||
```bash
|
||||
QB_PORT=8080
|
||||
DOWNLOAD_PATH=/home/ivan/downloads
|
||||
UID=1000
|
||||
GID=1000
|
||||
|
||||
PLEX_CLAIM=claim-DwbcewEB7j3pmNotG_eT
|
||||
```
|
@ -4,10 +4,7 @@ date: '2022-10-28'
|
||||
tags: ['PVE', 'PVE', 'DE', '环境搭建', 'Debian']
|
||||
draft: false
|
||||
summary: 虽然 PVE 宿主机不应该安装乱七八糟的东西,但是我穷,为了物尽其用,为了在主力电脑翻车时有一个立即可用的备用环境,所以还是安装了基础的桌面环境。现在的 Linux 桌面环境越来越好了,我选择安装 KDE Plasma 作为桌面环境,并且默认关闭,按需启用。
|
||||
images:
|
||||
[
|
||||
'https://pan.ivanli.cc/api/v3/file/source/2243/1200px-Kde_dragons.png?sign=yGZL9jYeVt53Ve43ddhHt_0EzVV2cW_WbxHc0dEcwWY%3D%3A0',
|
||||
]
|
||||
images: ['https://minio.ivanli.cc/ivan-public/uPic/2023/qldEtP.png']
|
||||
---
|
||||
|
||||
## 前言
|
||||
@ -160,7 +157,7 @@ ibus-setup
|
||||
|
||||
在打开的 GUI 中添加中文输入法,找到 Rime 并添加输入法:
|
||||
|
||||

|
||||

|
||||
|
||||
现在,新打开的软件应该能使用输入法了。像 Chrome 这类,关闭后还需要手动杀死进程后再打开才能使用。最简单的方法就是重启电脑啦~
|
||||
|
||||
|
@ -4,10 +4,7 @@ date: '2022-09-23'
|
||||
tags: ['Verdaccio', 'Self-Hosted', 'Docker', 'Caddy', 'registry', 'Node.js']
|
||||
draft: false
|
||||
summary: 作为靠着 JavaScript 生态吃饭的 Web 开发者,自建一个 Node regsitry 是很有必要的,我这次继续选择 Verdaccio 来搭建存储库。这次使用 Docker Compose 部署 Verdaccio,并将 Caddy 用于反向代理该服务。
|
||||
images:
|
||||
[
|
||||
'https://pan.ivanli.cc/api/v3/file/source/2233/verdaccio.png?sign=qpoeADXzbhHk2MY5CehgTftUJ67pnUj-Ylko9D5jscU%3D%3A0',
|
||||
]
|
||||
images: ['https://minio.ivanli.cc/ivan-public/uPic/2023/3Dqijk.png']
|
||||
---
|
||||
|
||||
## 为何自建存储库?
|
||||
|
@ -4,10 +4,7 @@ date: '2022-10-17'
|
||||
tags: ['Arch Linux', '环境搭建', 'VPS']
|
||||
draft: false
|
||||
summary: 又到了新装 Arch Linux 的日子了。这次又是温故而知新的机会,把之前写的笔记稍微整理了一下,在这里记录下教徒搭窝的备忘录。
|
||||
images:
|
||||
[
|
||||
'https://pan.ivanli.cc/api/v3/file/source/2238/archlinux-logo-light.png?sign=bWxqFFy3RUDT5UsWb4UD5byt-_L4h79wede3runRKFc%3D%3A0',
|
||||
]
|
||||
images: ['https://minio.ivanli.cc/ivan-public/uPic/2023/RTr3IU.png']
|
||||
---
|
||||
|
||||
## 起势
|
||||
|
@ -39,7 +39,7 @@ useEffect(() => {
|
||||
|
||||
### 在 React 18 的测试代码
|
||||
|
||||

|
||||

|
||||
|
||||
代码:[Code Sandbox](https://codesandbox.io/p/sandbox/clever-cache-pm1oct?file=%2Fsrc%2FApp.tsx&selection=%5B%7B%22endColumn%22%3A20%2C%22endLineNumber%22%3A33%2C%22startColumn%22%3A20%2C%22startLineNumber%22%3A33%7D%5D)
|
||||
|
||||
@ -51,7 +51,7 @@ useEffect(() => {
|
||||
2. `useEffect(() => /* */, [])`执行一此后,以新的严格模式的规则,调用了 `destructor` 后,进行了二次调用。
|
||||
|
||||
在第 2 点中,两次 useEffect 都是使用同一个值,是因为严格模式的二次调用按钩子分别执行两次,所以 useMemo 两次的调用都完毕后,得到的值再被 useEffect 执行两次。我调整了一下代码,将测试代码复制了一份在后面,可以看到 “useMemo” 和 “useMemo 2” 先执行了一次,又再执行了一次,然后再到 “useEffect“ 和 “useEffect 2":
|
||||

|
||||

|
||||
|
||||
## 结论
|
||||
|
||||
|
@ -8,10 +8,8 @@ const siteMetadata = {
|
||||
theme: 'system', // system, dark or light
|
||||
siteUrl: 'https://ivanli.cc/',
|
||||
siteRepo: 'https://git.ivanli.cc/ivan/tailwind-nextjs-blog',
|
||||
siteLogo:
|
||||
'https://pan.ivanli.cc/api/v3/file/source/1234/%E5%A4%B4%E5%83%8F.png?sign=xIgy54DyFRYupxjZJbK02HmpKX8C53YR-O0I18Rxm70%3D%3A0',
|
||||
image:
|
||||
'https://pan.ivanli.cc/api/v3/file/source/1234/%E5%A4%B4%E5%83%8F.png?sign=xIgy54DyFRYupxjZJbK02HmpKX8C53YR-O0I18Rxm70%3D%3A0',
|
||||
siteLogo: 'https://minio.ivanli.cc/ivan-public/uPic/2023/Urpetm.png',
|
||||
image: 'https://minio.ivanli.cc/ivan-public/uPic/2023/Urpetm.png',
|
||||
socialBanner: '/static/images/twitter-card.png',
|
||||
email: 'master@ivanli.cc',
|
||||
github: 'https://github.com/IvanLi-CN',
|
||||
@ -86,6 +84,6 @@ const siteMetadata = {
|
||||
url: process.env.NEXT_PUBLIC_COMMENTO_URL,
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = siteMetadata
|
||||
module.exports = siteMetadata;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { visit, Parent } from 'unist-util-visit';
|
||||
import { Parent } from 'unist';
|
||||
import { visit } from 'unist-util-visit';
|
||||
|
||||
export default function remarkCodeTitles() {
|
||||
return (tree: Parent & { lang?: string }) =>
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { VFile } from 'vfile';
|
||||
import { visit, Parent } from 'unist-util-visit';
|
||||
import { visit } from 'unist-util-visit';
|
||||
import { load } from 'js-yaml';
|
||||
import { Parent } from 'unist';
|
||||
|
||||
export default function extractFrontmatter() {
|
||||
return (tree: Parent, file: VFile) => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Literal } from 'unist';
|
||||
import { visit, Parent, Node } from 'unist-util-visit';
|
||||
import { Literal, Parent, Node } from 'unist';
|
||||
import { visit } from 'unist-util-visit';
|
||||
import sizeOf from 'image-size';
|
||||
import fs from 'fs';
|
||||
|
||||
|
72
package.json
72
package.json
@ -14,66 +14,66 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@fontsource/inter": "4.5.2",
|
||||
"@mailchimp/mailchimp_marketing": "^3.0.58",
|
||||
"@mailchimp/mailchimp_marketing": "^3.0.80",
|
||||
"@next/bundle-analyzer": "12.0.9",
|
||||
"@tailwindcss/forms": "^0.4.0",
|
||||
"@tailwindcss/typography": "^0.5.0",
|
||||
"autoprefixer": "^10.4.0",
|
||||
"esbuild": "^0.13.13",
|
||||
"github-slugger": "^1.3.0",
|
||||
"gray-matter": "^4.0.2",
|
||||
"@tailwindcss/forms": "^0.4.1",
|
||||
"@tailwindcss/typography": "^0.5.9",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"esbuild": "^0.13.15",
|
||||
"github-slugger": "^1.5.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
"image-size": "1.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"mdx-bundler": "^8.0.0",
|
||||
"next": "=12.2.0",
|
||||
"mdx-bundler": "^8.1.0",
|
||||
"next": "^12.2.0",
|
||||
"next-themes": "^0.0.14",
|
||||
"postcss": "^8.4.5",
|
||||
"preact": "^10.6.2",
|
||||
"postcss": "^8.4.25",
|
||||
"preact": "^10.15.1",
|
||||
"react": "17.0.2",
|
||||
"react-commento": "^1.0.0",
|
||||
"react-cusdis": "^2.1.3",
|
||||
"react-dom": "17.0.2",
|
||||
"reading-time": "1.3.0",
|
||||
"rehype-autolink-headings": "^6.1.0",
|
||||
"rehype-citation": "^0.2.0",
|
||||
"rehype-katex": "^6.0.2",
|
||||
"rehype-autolink-headings": "^6.1.1",
|
||||
"rehype-citation": "^0.2.5",
|
||||
"rehype-katex": "^6.0.3",
|
||||
"rehype-preset-minify": "6.0.0",
|
||||
"rehype-prism-plus": "^1.1.3",
|
||||
"rehype-slug": "^5.0.0",
|
||||
"rehype-prism-plus": "^1.6.1",
|
||||
"rehype-slug": "^5.1.0",
|
||||
"remark-footnotes": "^4.0.1",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"remark-math": "^5.1.1",
|
||||
"sharp": "^0.28.3",
|
||||
"smoothscroll-polyfill": "^0.4.4",
|
||||
"tailwindcss": "^3.0.18",
|
||||
"unist-util-visit": "^4.0.0",
|
||||
"vfile": "^5.3.5"
|
||||
"tailwindcss": "^3.3.2",
|
||||
"unist-util-visit": "^5.0.0",
|
||||
"vfile": "^5.3.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@svgr/webpack": "^6.1.2",
|
||||
"@types/react": "^17.0.50",
|
||||
"@types/tailwindcss": "^2.2.0",
|
||||
"@svgr/webpack": "^6.5.1",
|
||||
"@types/react": "^17.0.62",
|
||||
"@types/tailwindcss": "^2.2.4",
|
||||
"@types/unist": "^2.0.6",
|
||||
"@typescript-eslint/eslint-plugin": "^4.28.1",
|
||||
"@typescript-eslint/parser": "^4.28.1",
|
||||
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
||||
"@typescript-eslint/parser": "^4.33.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"dedent": "^0.7.0",
|
||||
"eslint": "^7.29.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-next": "12.0.9",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-prettier": "^3.3.1",
|
||||
"file-loader": "^6.0.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-prettier": "^3.4.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"globby": "11.0.3",
|
||||
"husky": "^6.0.0",
|
||||
"inquirer": "^8.1.1",
|
||||
"lint-staged": "^11.0.0",
|
||||
"next-export-optimize-images": "^2.0.0",
|
||||
"inquirer": "^8.2.5",
|
||||
"lint-staged": "^11.2.6",
|
||||
"next-export-optimize-images": "^2.1.0",
|
||||
"next-remote-watch": "^1.0.0",
|
||||
"prettier": "^2.5.1",
|
||||
"prettier-plugin-tailwindcss": "^0.1.4",
|
||||
"socket.io": "^4.4.0",
|
||||
"socket.io-client": "^4.4.0",
|
||||
"typescript": "^4.6.1-rc"
|
||||
"prettier": "^2.8.8",
|
||||
"prettier-plugin-tailwindcss": "^0.1.13",
|
||||
"socket.io": "^4.7.1",
|
||||
"socket.io-client": "^4.7.1",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.+(js|jsx|ts|tsx)": [
|
||||
|
4968
pnpm-lock.yaml
generated
4968
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 26 KiB |
Reference in New Issue
Block a user