File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,4 +156,10 @@ jobs:
156156 CLOUDFRONT_DISTRIBUTION_ID : ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
157157 run : |
158158 aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"
159- echo "CloudFront cache invalidation requested."
159+ echo "CloudFront cache invalidation requested."
160+
161+ - name : Ping IndexNow
162+ run : |
163+ echo "Notifying Bing and other search engines via IndexNow..."
164+ curl -s "https://api.indexnow.org/indexnow?url=https://pdflince.com&key=7a258aaa2a9b472bb6e97935fe5e82ca"
165+ echo "IndexNow pinged successfully."
Original file line number Diff line number Diff line change 1+ 7a258aaa2a9b472bb6e97935fe5e82ca
Original file line number Diff line number Diff line change @@ -6,7 +6,9 @@ export const revalidate = false;
66export default function robots ( ) : MetadataRoute . Robots {
77 const baseUrl = "https://pdflince.com" ;
88
9- return {
9+ // Cast to bypass Next.js restricted Sitemap type since it doesn't officially support 'host' yet
10+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11+ const robotsObj : any = {
1012 rules : {
1113 userAgent : "*" ,
1214 allow : "/" ,
@@ -15,5 +17,8 @@ export default function robots(): MetadataRoute.Robots {
1517 ] ,
1618 } ,
1719 sitemap : `${ baseUrl } /sitemap.xml` ,
20+ host : "https://api.indexnow.org/indexnow?url=https://pdflince.com&key=7a258aaa2a9b472bb6e97935fe5e82ca" ,
1821 } ;
22+
23+ return robotsObj as MetadataRoute . Robots ;
1924}
You can’t perform that action at this time.
0 commit comments