diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6f25bf9e..af15eeba 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -48,5 +48,9 @@ jobs: - name: Install dependencies run: pnpm install + - name: ESLint check + run: pnpm lint + - name: Build run: pnpm build + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f158090..37d59e00 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,16 +50,20 @@ jobs: - name: Build run: pnpm build - # - name: Obtain a GitHub App Installation Access Token - # id: githubAppAuth - # run: | - # echo "GITHUB_APP_TOKEN=$(npx obtain-github-app-installation-access-token ci ${{ secrets.GH_APP_CREDENTIALS_TOKEN }})" >> $GITHUB_OUTPUT + - name: Generate a token + id: generate_token + uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} - name: Release env: # GITHUB_TOKEN: ${{ steps.githubAppAuth.outputs.GITHUB_APP_TOKEN }} - GH_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} - GITHUB_TOKEN: ${{ secrets.NPM_TOKEN }} +# GH_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} +# GITHUB_TOKEN: ${{ secrets.NPM_TOKEN }} + GH_TOKEN: ${{ steps.generate_token.outputs.token }} + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }} GIT_AUTHOR_NAME: ${{ secrets. GIT_AUTHOR_NAME }} diff --git a/_config.yml b/_config.yml index 3291442d..fac13dab 100644 --- a/_config.yml +++ b/_config.yml @@ -211,3 +211,10 @@ footer_links: - title: Friends # link of friends mode / 友链模式 mode: 'links' +#! --------------------------------------------------------------- +#! Highlighter Shiki +#! --------------------------------------------------------------- +shiki: + enable: true + backgroundColor: "#1a1a1a" + diff --git a/package.json b/package.json index e4100572..d2e41374 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "script-ext-html-webpack-plugin": "^2.1.5", "semantic-release": "^21.1.1", "tailwindcss": "3.3.3", - "typescript": "~5.2.2", + "typescript": "^5.1.0", "vite": "^4.4.9", "vite-plugin-html-transformer": "^4.0.0", "vite-plugin-pages": "^0.31.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe2222f0..1031fe7e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -116,7 +116,7 @@ devDependencies: specifier: 3.3.3 version: 3.3.3(ts-node@10.9.1) typescript: - specifier: ~5.2.2 + specifier: ^5.1.0 version: 5.2.2 vite: specifier: ^4.4.9 diff --git a/src/App.vue b/src/App.vue index e588fc4e..29243f81 100644 --- a/src/App.vue +++ b/src/App.vue @@ -182,7 +182,7 @@ export default defineComponent({ onMounted(() => { let wrapperHeight = screen.height const footerEl = document.getElementById('footer') - const footerHeight = footerEl?.getBoundingClientRect().height + const footerHeight = footerEl?.getBoundingClientRect().height ?? 0 wrapperHeight = wrapperHeight - footerHeight * 2 wrapperStyle.value = { 'min-height': wrapperHeight + 'px' diff --git a/src/components/ArticleCard/index.ts b/src/components/ArticleCard/index.ts index bee8510f..57040f23 100644 --- a/src/components/ArticleCard/index.ts +++ b/src/components/ArticleCard/index.ts @@ -1,2 +1,2 @@ export { default as HorizontalArticle } from './src/HorizontalArticle.vue' -export { default as Article } from './src/Article.vue' +export { default as ArticleCard } from './src/ArticleCard.vue' diff --git a/src/components/ArticleCard/src/Article.vue b/src/components/ArticleCard/src/ArticleCard.vue similarity index 99% rename from src/components/ArticleCard/src/Article.vue rename to src/components/ArticleCard/src/ArticleCard.vue index 8f5a2476..9423cb81 100644 --- a/src/components/ArticleCard/src/Article.vue +++ b/src/components/ArticleCard/src/ArticleCard.vue @@ -128,7 +128,7 @@ import SvgIcon from '@/components/SvgIcon/index.vue' import { useRouter } from 'vue-router' export default defineComponent({ - name: 'ObFeatureList', + name: 'ARArticleCard', components: { SvgIcon }, props: { data: { diff --git a/src/components/ArticleCard/src/HorizontalArticle.vue b/src/components/ArticleCard/src/HorizontalArticle.vue index 7da39e91..c690ee0f 100644 --- a/src/components/ArticleCard/src/HorizontalArticle.vue +++ b/src/components/ArticleCard/src/HorizontalArticle.vue @@ -141,7 +141,7 @@ export default defineComponent({ props: { data: { type: Object, - default: {} + default: () => ({}) } }, setup(props) { diff --git a/src/components/Breadcrumbs.vue b/src/components/Breadcrumbs.vue index 8905052b..cb5726a8 100644 --- a/src/components/Breadcrumbs.vue +++ b/src/components/Breadcrumbs.vue @@ -12,7 +12,7 @@ import { defineComponent } from 'vue' import { useI18n } from 'vue-i18n' export default defineComponent({ - name: 'Breadcrumb', + name: 'ArBreadcrumbBar', props: { current: String }, diff --git a/src/components/Comment.vue b/src/components/Comment.vue index 75406a47..8749422f 100644 --- a/src/components/Comment.vue +++ b/src/components/Comment.vue @@ -1,6 +1,6 @@