mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-03-13 10:30:18 +08:00
chore: fix art template on vercel (#20647)
This commit is contained in:
@@ -83,7 +83,7 @@ async function handler(ctx) {
|
||||
|
||||
item.author = content('.bbs-user-wrapper-content-name-span').first().text();
|
||||
item.pubDate = item.pubDate ?? timezone(parseRelativeDate(content('.second-line-user-info').first().text()), +8);
|
||||
item.description = art(path.join(__dirname, 'templates/description.art'), {
|
||||
item.description = art(path.resolve(__dirname, 'templates/description.art'), {
|
||||
videos,
|
||||
description: content('.bbs-content').first().html(),
|
||||
});
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"build:docs": "npm run build:routes && tsx scripts/workflow/build-docs.ts",
|
||||
"build:lib": "npm run build:routes && tsdown --config ./tsdown-lib.config.ts",
|
||||
"build:routes": "cross-env NODE_ENV=dev tsx scripts/workflow/build-routes.ts",
|
||||
"build:vercel": "npm run build:routes && tsdown --config ./tsdown-vercel.config.ts && mv dist/server.mjs dist/index.mjs",
|
||||
"vercel-build": "npm run build:routes && tsdown --config ./tsdown-vercel.config.ts",
|
||||
"dev": "cross-env NODE_ENV=dev NODE_OPTIONS='--max-http-header-size=32768' tsx watch --inspect --clear-screen=false lib/index.ts",
|
||||
"dev:cache": "cross-env NODE_ENV=production NODE_OPTIONS='--max-http-header-size=32768' tsx watch --clear-screen=false lib/index.ts",
|
||||
"format": "eslint --cache --fix \"**/*.{ts,tsx,js,yml}\" --concurrency auto && prettier . --write --experimental-cli",
|
||||
|
||||
@@ -4,6 +4,9 @@ import artTemplatesPlugin from './plugins/rollup-plugin-art-templates.ts';
|
||||
|
||||
export default defineConfig({
|
||||
entry: ['./lib/server.ts'],
|
||||
// Wait for https://github.com/vercel/vercel/pull/14429
|
||||
// Then we can set outDir to outputDirectory in vercel.json
|
||||
outDir: 'src',
|
||||
minify: true,
|
||||
shims: true,
|
||||
clean: true,
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
{
|
||||
"$schema": "https://openapi.vercel.sh/vercel.json",
|
||||
"framework": "hono",
|
||||
"buildCommand": "pnpm run build:vercel",
|
||||
"outputDirectory": "dist",
|
||||
"outputDirectory": "src",
|
||||
"functions": {
|
||||
"src/server.mjs": {
|
||||
"includeFiles": "./src/templates/**/*.art"
|
||||
}
|
||||
},
|
||||
"rewrites": [
|
||||
{
|
||||
"source": "/favicon.ico",
|
||||
|
||||
Reference in New Issue
Block a user