Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,10 @@ jobs:
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
run: |
aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"
echo "CloudFront cache invalidation requested."
echo "CloudFront cache invalidation requested."

- name: Ping IndexNow
run: |
echo "Notifying Bing and other search engines via IndexNow..."
curl -s "https://api.indexnow.org/indexnow?url=https://pdflince.com&key=7a258aaa2a9b472bb6e97935fe5e82ca"
echo "IndexNow pinged successfully."
1 change: 1 addition & 0 deletions public/7a258aaa2a9b472bb6e97935fe5e82ca.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7a258aaa2a9b472bb6e97935fe5e82ca
7 changes: 6 additions & 1 deletion src/app/robots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ export const revalidate = false;
export default function robots(): MetadataRoute.Robots {
const baseUrl = "https://pdflince.com";

return {
// Cast to bypass Next.js restricted Sitemap type since it doesn't officially support 'host' yet
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const robotsObj: any = {
rules: {
userAgent: "*",
allow: "/",
Expand All @@ -15,5 +17,8 @@ export default function robots(): MetadataRoute.Robots {
],
},
sitemap: `${baseUrl}/sitemap.xml`,
host: "https://api.indexnow.org/indexnow?url=https://pdflince.com&key=7a258aaa2a9b472bb6e97935fe5e82ca",
};

return robotsObj as MetadataRoute.Robots;
}