diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml index e19760d..511196c 100644 --- a/.github/workflows/lint-format.yml +++ b/.github/workflows/lint-format.yml @@ -17,22 +17,22 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: "20" - cache: "pnpm" + node-version: "24" + cache: "npm" - - name: Enable corepack and install pnpm + - name: Enable corepack and install npm run: | corepack enable - corepack prepare pnpm@latest --activate + corepack prepare npm@latest --activate - name: Install dependencies - run: pnpm install --frozen-lockfile + run: npm install --frozen-lockfile - name: Run ESLint - run: pnpm lint + run: npm lint - name: Run Prettier check - run: pnpm format:check + run: npm format:check format: name: Auto-format (eslint --fix) @@ -48,22 +48,22 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: "20" - cache: "pnpm" + node-version: "24" + cache: "npm" - - name: Enable corepack and install pnpm + - name: Enable corepack and install npm run: | corepack enable - corepack prepare pnpm@latest --activate + corepack prepare npm@latest --activate - name: Install dependencies - run: pnpm install --frozen-lockfile + run: npm install --frozen-lockfile - name: Run Prettier --write - run: pnpm format + run: npm format - name: Run ESLint --fix - run: pnpm lint:fix + run: npm lint:fix - name: Commit & push fixes run: | diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..aa8628c --- /dev/null +++ b/netlify.toml @@ -0,0 +1,2 @@ +[images] +remote_images = ["https:\\/\\/.*"] diff --git a/nuxt.config.ts b/nuxt.config.ts index f728cb8..1367bf5 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -88,23 +88,7 @@ export default defineNuxtConfig({ smtpSecure: process.env.SMTP_SECURE ? process.env.SMTP_SECURE === "true" : undefined, wakatimeApiKey: process.env.WAKATIME_API_KEY ?? "", wakatimeApiUrl: process.env.WAKATIME_API_URL ?? "https://wakatime.com/api/v1", - public: { - githubToken: process.env.NUXT_PUBLIC_GITHUB_TOKEN ?? "", - umamiApiKey: process.env.NUXT_PUBLIC_UMAMI_API_KEY ?? "", - // Twikoo 评论服务地址(在 Netlify 或部署环境中设置 NUXT_PUBLIC_TWIKOO_URL) - twikooUrl: process.env.NUXT_PUBLIC_TWIKOO_URL ?? "", - // Giscus 配置(在部署环境中设置 NUXT_PUBLIC_GISCUS_* 系列变量) - giscus: { - repo: process.env.NUXT_PUBLIC_GISCUS_REPO ?? "", - repoId: process.env.NUXT_PUBLIC_GISCUS_REPO_ID ?? "", - category: process.env.NUXT_PUBLIC_GISCUS_CATEGORY ?? "", - categoryId: process.env.NUXT_PUBLIC_GISCUS_CATEGORY_ID ?? "", - mapping: process.env.NUXT_PUBLIC_GISCUS_MAPPING ?? "pathname", - reactionsEnabled: process.env.NUXT_PUBLIC_GISCUS_REACTIONS_ENABLED ?? "1", - emitMetadata: process.env.NUXT_PUBLIC_GISCUS_EMIT_METADATA ?? "0", - inputPosition: process.env.NUXT_PUBLIC_GISCUS_INPUT_POSITION ?? "bottom", - theme: process.env.NUXT_PUBLIC_GISCUS_THEME ?? "light", - }, - }, + githubToken: process.env.NUXT_PUBLIC_GITHUB_TOKEN ?? "", + umamiApiKey: process.env.UMAMI_API_KEY ?? "", }, }); diff --git a/package.json b/package.json index 0510c6f..9c58c1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloud-home", - "private": true, + "private": false, "type": "module", "scripts": { "dev": "nuxt dev",