source for getorbyt.com getorbyt.com/
client bsky orbytapp app orbyt bluesky getorbyt orbytvideo atproto video
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Integrate sitemap support and update site URL in Astro configuration

- Added sitemap integration to enhance SEO and site indexing.
- Updated site URL in the Astro configuration for proper site identification.
- Included new dependency for sitemap in package.json and package-lock.json.

+120 -1
+3
astro.config.mjs
··· 1 1 import { defineConfig } from 'astro/config'; 2 2 import cloudflare from '@astrojs/cloudflare'; 3 + import sitemap from '@astrojs/sitemap'; 3 4 4 5 export default defineConfig({ 6 + site: 'https://getorbyt.com', 5 7 adapter: cloudflare({ 6 8 imageService: 'cloudflare', 7 9 platformProxy: { ··· 16 18 }, 17 19 }, 18 20 }), 21 + integrations: [sitemap()], 19 22 });
+75 -1
package-lock.json
··· 10 10 "license": "ISC", 11 11 "dependencies": { 12 12 "@astrojs/cloudflare": "^12.6.12", 13 + "@astrojs/sitemap": "^3.7.0", 13 14 "astro": "^5.16.8" 14 15 } 15 16 }, ··· 81 82 }, 82 83 "engines": { 83 84 "node": "18.20.8 || ^20.3.0 || >=22.0.0" 85 + } 86 + }, 87 + "node_modules/@astrojs/sitemap": { 88 + "version": "3.7.0", 89 + "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.7.0.tgz", 90 + "integrity": "sha512-+qxjUrz6Jcgh+D5VE1gKUJTA3pSthuPHe6Ao5JCxok794Lewx8hBFaWHtOnN0ntb2lfOf7gvOi9TefUswQ/ZVA==", 91 + "license": "MIT", 92 + "dependencies": { 93 + "sitemap": "^8.0.2", 94 + "stream-replace-string": "^2.0.0", 95 + "zod": "^3.25.76" 84 96 } 85 97 }, 86 98 "node_modules/@astrojs/telemetry": { ··· 1735 1747 "@types/unist": "*" 1736 1748 } 1737 1749 }, 1750 + "node_modules/@types/node": { 1751 + "version": "25.2.2", 1752 + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.2.2.tgz", 1753 + "integrity": "sha512-BkmoP5/FhRYek5izySdkOneRyXYN35I860MFAGupTdebyE66uZaR+bXLHq8k4DirE5DwQi3NuhvRU1jqTVwUrQ==", 1754 + "license": "MIT", 1755 + "peer": true, 1756 + "dependencies": { 1757 + "undici-types": "~7.16.0" 1758 + } 1759 + }, 1760 + "node_modules/@types/sax": { 1761 + "version": "1.2.7", 1762 + "resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.7.tgz", 1763 + "integrity": "sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==", 1764 + "license": "MIT", 1765 + "dependencies": { 1766 + "@types/node": "*" 1767 + } 1768 + }, 1738 1769 "node_modules/@types/unist": { 1739 1770 "version": "3.0.3", 1740 1771 "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", ··· 1866 1897 "funding": { 1867 1898 "url": "https://github.com/sponsors/jonschlinkert" 1868 1899 } 1900 + }, 1901 + "node_modules/arg": { 1902 + "version": "5.0.2", 1903 + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", 1904 + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", 1905 + "license": "MIT" 1869 1906 }, 1870 1907 "node_modules/argparse": { 1871 1908 "version": "2.0.1", ··· 5034 5071 "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", 5035 5072 "license": "MIT" 5036 5073 }, 5074 + "node_modules/sitemap": { 5075 + "version": "8.0.2", 5076 + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-8.0.2.tgz", 5077 + "integrity": "sha512-LwktpJcyZDoa0IL6KT++lQ53pbSrx2c9ge41/SeLTyqy2XUNA6uR4+P9u5IVo5lPeL2arAcOKn1aZAxoYbCKlQ==", 5078 + "license": "MIT", 5079 + "dependencies": { 5080 + "@types/node": "^17.0.5", 5081 + "@types/sax": "^1.2.1", 5082 + "arg": "^5.0.0", 5083 + "sax": "^1.4.1" 5084 + }, 5085 + "bin": { 5086 + "sitemap": "dist/cli.js" 5087 + }, 5088 + "engines": { 5089 + "node": ">=14.0.0", 5090 + "npm": ">=6.0.0" 5091 + } 5092 + }, 5093 + "node_modules/sitemap/node_modules/@types/node": { 5094 + "version": "17.0.45", 5095 + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", 5096 + "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", 5097 + "license": "MIT" 5098 + }, 5037 5099 "node_modules/smol-toml": { 5038 5100 "version": "1.6.0", 5039 5101 "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.0.tgz", ··· 5075 5137 "npm": ">=6" 5076 5138 } 5077 5139 }, 5140 + "node_modules/stream-replace-string": { 5141 + "version": "2.0.0", 5142 + "resolved": "https://registry.npmjs.org/stream-replace-string/-/stream-replace-string-2.0.0.tgz", 5143 + "integrity": "sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==", 5144 + "license": "MIT" 5145 + }, 5078 5146 "node_modules/string-width": { 5079 5147 "version": "7.2.0", 5080 5148 "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", ··· 5289 5357 "node": ">=20.18.1" 5290 5358 } 5291 5359 }, 5360 + "node_modules/undici-types": { 5361 + "version": "7.16.0", 5362 + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", 5363 + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", 5364 + "license": "MIT" 5365 + }, 5292 5366 "node_modules/unenv": { 5293 5367 "version": "2.0.0-rc.24", 5294 5368 "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.24.tgz", ··· 5595 5669 "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", 5596 5670 "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", 5597 5671 "license": "MIT", 5598 - "peer": true, 5599 5672 "dependencies": { 5600 5673 "esbuild": "^0.25.0", 5601 5674 "fdir": "^6.4.4", ··· 5724 5797 "integrity": "sha512-Om5ns0Lyx/LKtYI04IV0bjIrkBgoFNg0p6urzr2asekJlfP18RqFzyqMFZKf0i9Gnjtz/JfAS/Ol6tjCe5JJsQ==", 5725 5798 "hasInstallScript": true, 5726 5799 "license": "Apache-2.0", 5800 + "peer": true, 5727 5801 "bin": { 5728 5802 "workerd": "bin/workerd" 5729 5803 },
+1
package.json
··· 25 25 "homepage": "https://github.com/Hann8n/orbyt-site#readme", 26 26 "dependencies": { 27 27 "@astrojs/cloudflare": "^12.6.12", 28 + "@astrojs/sitemap": "^3.7.0", 28 29 "astro": "^5.16.8" 29 30 } 30 31 }
+41
src/pages/sitemap.xml.ts
··· 1 + import type { APIRoute } from 'astro'; 2 + 3 + /** 4 + * Custom sitemap.xml endpoint 5 + * 6 + * This endpoint generates a sitemap index that references the static sitemap 7 + * generated by @astrojs/sitemap. The integration generates sitemap-index.xml 8 + * which contains references to all numbered sitemap files (sitemap-0.xml, etc.). 9 + * 10 + * Note: Dynamic SSR routes (/@[handle] and /@[handle]/[postId]) cannot be 11 + * auto-discovered by @astrojs/sitemap since they're rendered on-demand. 12 + * These routes will be discovered by crawlers through links on your site. 13 + * 14 + * If you need to explicitly include specific handles/posts in the sitemap, 15 + * you can extend this endpoint to fetch them and add additional <sitemap> 16 + * entries pointing to custom sitemap files. 17 + */ 18 + export const GET: APIRoute = ({ site }) => { 19 + // Handle site as URL object or string 20 + const siteUrl = site 21 + ? (typeof site === 'string' ? site : site.href).replace(/\/$/, '') 22 + : 'https://getorbyt.com'; 23 + 24 + // Generate sitemap index XML that references the generated sitemap-index.xml 25 + // This allows robots.txt to reference /sitemap.xml while the actual 26 + // sitemap structure is managed by @astrojs/sitemap 27 + const sitemapIndex = `<?xml version="1.0" encoding="UTF-8"?> 28 + <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 29 + <sitemap> 30 + <loc>${siteUrl}/sitemap-index.xml</loc> 31 + <lastmod>${new Date().toISOString().split('T')[0]}</lastmod> 32 + </sitemap> 33 + </sitemapindex>`; 34 + 35 + return new Response(sitemapIndex, { 36 + headers: { 37 + 'Content-Type': 'application/xml; charset=utf-8', 38 + 'Cache-Control': 'public, max-age=3600', // Cache for 1 hour 39 + }, 40 + }); 41 + };