Skip to content

Commit 4854d23

Browse files
committed
fix sitemap
1 parent 81e1f52 commit 4854d23

File tree

3 files changed

+337
-3
lines changed

3 files changed

+337
-3
lines changed

app/profile/[login]/sitemap.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use cache';
2+
13
import { startOfMonth } from 'date-fns';
24
import { cacheLife } from 'next/dist/server/use-cache/cache-life';
35

@@ -19,7 +21,11 @@ export default async function sitemap() {
1921
changeFrequency: 'monthly',
2022
images: rankingTypes.map(
2123
(rankingType) =>
22-
`${process.env.NEXT_PUBLIC_URI}/api/badge/v2/${profile.login}?ranking=${rankingType}&context=global&type=position&meta=none&label=${RANK_NAME[rankingType]}`,
24+
`${process.env.NEXT_PUBLIC_URI}/api/badge/v2/${
25+
profile.login
26+
}?ranking=${rankingType}&context=global&type=position&meta=none&label=${encodeURIComponent(
27+
RANK_NAME[rankingType],
28+
)}`,
2329
),
2430
priority: 0.95,
2531
}));

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"codegen": "dotenv -e .env.local graphql-codegen",
1212
"standalone": "dotenv -e .env.local node .next/standalone/server.js",
1313
"icons": "pnpm dlx @svgr/cli --out-dir components/icons --filename-case kebab --typescript --no-dimensions --replace-attr-values \"#000=currentColor\" -- public/icons",
14-
"figma:icons": "tsc lib/figma/download-icons.ts --outDir dist && dotenv -e .env.local node dist/download-icons.js && pnpm run icons"
14+
"figma:icons": "tsc lib/figma/download-icons.ts --outDir dist && dotenv -e .env.local node dist/download-icons.js && pnpm run icons",
15+
"indexnow": "tsx lib/indexnow/indexnow-submit.ts --sitemap=https://gitranks.com/profile/login/sitemap.xml --host=gitranks.com --key=ef3b3dfb08554fce864bebfc1702134c --keyLocation=https://gitranks.com/ef3b3dfb08554fce864bebfc1702134c.txt"
1516
},
1617
"dependencies": {
1718
"@auth/mongodb-adapter": "^3.10.0",
@@ -71,6 +72,7 @@
7172
"@types/node": "^24.1.0",
7273
"@types/react": "^19.1.8",
7374
"@types/react-dom": "^19.1.6",
75+
"@types/xml2js": "^0.4.14",
7476
"dotenv-cli": "^9.0.0",
7577
"eslint": "^9.32.0",
7678
"eslint-config-next": "15.4.0-canary.51",
@@ -79,7 +81,9 @@
7981
"graphql": "^16.11.0",
8082
"postcss": "^8.5.6",
8183
"tailwindcss": "^4.1.11",
82-
"typescript": "^5.8.3"
84+
"tsx": "^4.20.4",
85+
"typescript": "^5.8.3",
86+
"xml2js": "^0.6.2"
8387
},
8488
"packageManager": "[email protected]+sha512.398035c7bd696d0ba0b10a688ed558285329d27ea994804a52bad9167d8e3a72bcb993f9699585d3ca25779ac64949ef422757a6c31102c12ab932e5cbe5cc92"
8589
}

0 commit comments

Comments
 (0)