Compare commits

...

6 Commits

Author SHA1 Message Date
Anye
42d172f27d Merge branch 'halo-dev:main' into main 2025-03-31 15:52:17 +08:00
Ryan Wang
c45ec68ce7 chore: fix workflow
Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-03-17 12:52:19 +08:00
Ryan Wang
ff3ca768d8 chore: release 1.12.4
Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-03-17 12:49:04 +08:00
Ryan Wang
11b5d817bd chore: add cd workflow for publishing theme to halo app store (#239)
Add cd workflow for publishing theme to halo app store


```release-note
None
```
2025-03-17 04:47:16 +00:00
虚空云馆
04ae86464d fix: add null check for pagination element before adding event listener (#234)
![2025-01-06_15-48-10](https://github.com/user-attachments/assets/bd532417-750b-44e6-97db-0bbaef467467)

```release-note
修复在 pagination 不存在时添加事件监听器的问题
```
2025-01-06 09:58:22 +00:00
虚空云馆
4776b49724 fix: correct offset for active toc item (#233)
![2025-01-06_15-12-38](https://github.com/user-attachments/assets/eeda6f2f-216d-42b7-ab5c-e50682bcba4f)

```release-note
修复文章目录激活项偏移错误的问题
```
2025-01-06 09:56:22 +00:00
6 changed files with 33 additions and 19 deletions

18
.github/workflows/cd.yaml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: CD
on:
release:
types:
- published
jobs:
cd:
uses: halo-sigs/reusable-workflows/.github/workflows/theme-cd.yaml@v3
secrets:
halo-pat: ${{ secrets.HALO_PAT }}
permissions:
contents: write
with:
app-id: app-KgWqR
pnpm-version: 10
node-version: 20

View File

@@ -1,14 +0,0 @@
build: clean
echo "Building theme"
pnpm install
pnpm build
echo "Theme built successfully!"
echo "Collect theme dist"
mkdir dist
cp -r templates dist
cp -r i18n dist
cp theme.yaml settings.yaml README.md dist
clean:
echo "Clean dist folder"
rm -rf dist

View File

@@ -5,11 +5,13 @@
"description": "Default theme for Halo 2.0",
"scripts": {
"dev": "vite build --watch",
"build": "tsc && vite build",
"build-only": "tsc && vite build",
"build": "pnpm run build-only && pnpm package",
"lint": "eslint ./src --ext .js,.cjs,.mjs,.ts,.cts,.mts --ignore-path .gitignore",
"prettier": "prettier --write \"./src/**/*.{js,ts,css,json,ml,yaml,html}\" \"./templates/**/*.html\"",
"release": "release-it",
"prepare": "husky"
"prepare": "husky",
"package": "npx @halo-dev/theme-package-cli"
},
"keywords": [
"halo",
@@ -71,5 +73,6 @@
"alpinejs": "^3.14.3",
"pupa": "^3.1.0",
"tocbot": "^4.32.2"
}
},
"packageManager": "pnpm@10.6.3+sha512.bb45e34d50a9a76e858a95837301bfb6bd6d35aea2c5d52094fa497a467c43f5c440103ce2511e9e0a2f89c3d6071baac3358fc68ac6fb75e2ceb3d2736065e6"
}

View File

@@ -50,6 +50,7 @@ export function generateToc() {
collapseDepth: 6,
headingsOffset: 100,
scrollSmooth: false,
tocScrollOffset: 50,
});
}

View File

@@ -29,7 +29,13 @@
<script th:inline="javascript">
document.addEventListener("DOMContentLoaded", () => {
document.getElementById("pagination").addEventListener("change", (event) => {
const paginationSelect = document.getElementById("pagination");
if (!paginationSelect) {
return;
}
paginationSelect.addEventListener("change", (event) => {
const selectedPage = event.target.value;
window.location.href = `[(${context})]page/${selectedPage}`;
});

View File

@@ -18,7 +18,7 @@ spec:
issues: https://github.com/halo-dev/theme-earth/issues
settingName: "theme-earth-setting"
configMapName: "theme-earth-configMap"
version: 1.12.3
version: 1.12.4
requires: ">=2.20.0"
license:
- name: "GPL-3.0"