Compare commits
No commits in common. "66d07bb2a559390970c26821ec53a81edd8e20ff" and "280c69586ffb6c11b6ca827f81f198cda01b73ad" have entirely different histories.
66d07bb2a5
...
280c69586f
20
.github/workflows/npm-publish.yml
vendored
20
.github/workflows/npm-publish.yml
vendored
@ -15,12 +15,18 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
registry-url: https://registry.npmjs.org
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Publish package to npm
|
||||
run: npm publish
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
|
||||
publish-npm:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hexo-highlighter-shiki",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.0",
|
||||
"description": "A package for Hexo which use Shiki to render code highlight.",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
@ -36,7 +36,6 @@
|
||||
"typescript": "^5.6.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"hexo": "^7.0.0",
|
||||
"hexo-util": "^3.3.0"
|
||||
"hexo": "^7.0.0"
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,6 @@ export async function init(hexo: Hexo) {
|
||||
for (const extra_theme of [].concat(config.additional.themes)) {
|
||||
additional_themes.push(JSON.parse(readFileSync(extra_theme, "utf8")));
|
||||
}
|
||||
// 处理主题
|
||||
const themes = additional_themes.concat(
|
||||
(typeof config.theme === "string" ? [config.theme] : Object.values(config.theme)).filter(
|
||||
(theme) => theme in bundledThemes
|
||||
@ -152,7 +151,7 @@ export async function init(hexo: Hexo) {
|
||||
};
|
||||
};
|
||||
try {
|
||||
if (typeof config.theme === "string")
|
||||
if (config.theme === "string")
|
||||
pre = highlighter.codeToHtml(code, {
|
||||
lang,
|
||||
theme: config.theme,
|
||||
|
Loading…
Reference in New Issue
Block a user