11import mdx from "@astrojs/mdx" ;
22import partytown from "@astrojs/partytown" ;
3- import sitemap , { ChangeFreqEnum } from "@astrojs/sitemap" ;
3+ import sitemap from "@astrojs/sitemap" ;
44import solid from "@astrojs/solid-js" ;
55import tailwindcss from "@tailwindcss/vite" ;
66import AstroPWA from "@vite-pwa/astro" ;
77import { defineConfig } from "astro/config" ;
88
9- const tailwindPlugin = tailwindcss ( ) as unknown as never ;
10-
119// https://astro.build/config
1210export default defineConfig ( {
1311 site : "https://avaabrazzaq.com" , // Used to generate canonical URLs and sitemap entries.
1412 trailingSlash : "always" , // Consistent URL format - all URLs end with /
1513 vite : {
16- plugins : [ tailwindPlugin ] ,
14+ plugins : [ tailwindcss ( ) ] ,
1715 } ,
1816 integrations : [
1917 solid ( ) ,
@@ -28,52 +26,52 @@ export default defineConfig({
2826 // Enhanced sitemap with priority and changefreq
2927 const url = item . url ;
3028 let priority = 0.5 ;
31- let changefreq = ChangeFreqEnum . MONTHLY ;
29+ let changefreq = "monthly" ;
3230
3331 // Homepage gets highest priority
3432 if ( url === "https://avaabrazzaq.com/" ) {
3533 priority = 1.0 ;
36- changefreq = ChangeFreqEnum . WEEKLY ;
34+ changefreq = "weekly" ;
3735 }
3836 // Blog posts - high priority, updated occasionally
3937 else if ( url . includes ( "/blog/" ) && ! url . endsWith ( "/blog/" ) ) {
4038 priority = 0.8 ;
41- changefreq = ChangeFreqEnum . MONTHLY ;
39+ changefreq = "monthly" ;
4240 }
4341 // Blog index
4442 else if ( url . endsWith ( "/blog/" ) ) {
4543 priority = 0.9 ;
46- changefreq = ChangeFreqEnum . WEEKLY ;
44+ changefreq = "weekly" ;
4745 }
4846 // Service pages - high priority
4947 else if ( url . includes ( "/services/" ) && ! url . endsWith ( "/services/" ) ) {
5048 priority = 0.8 ;
51- changefreq = ChangeFreqEnum . MONTHLY ;
49+ changefreq = "monthly" ;
5250 }
5351 // Services index
5452 else if ( url . endsWith ( "/services/" ) ) {
5553 priority = 0.9 ;
56- changefreq = ChangeFreqEnum . MONTHLY ;
54+ changefreq = "monthly" ;
5755 }
5856 // Portfolio items
5957 else if ( url . includes ( "/portfolio/" ) && ! url . endsWith ( "/portfolio/" ) ) {
6058 priority = 0.7 ;
61- changefreq = ChangeFreqEnum . YEARLY ;
59+ changefreq = "yearly" ;
6260 }
6361 // Portfolio index
6462 else if ( url . endsWith ( "/portfolio/" ) ) {
6563 priority = 0.8 ;
66- changefreq = ChangeFreqEnum . MONTHLY ;
64+ changefreq = "monthly" ;
6765 }
6866 // About and contact
6967 else if ( url . includes ( "/about/" ) || url . includes ( "/contact/" ) ) {
7068 priority = 0.7 ;
71- changefreq = ChangeFreqEnum . MONTHLY ;
69+ changefreq = "monthly" ;
7270 }
7371
7472 return {
7573 ...item ,
76- changefreq,
74+ changefreq : changefreq as typeof item . changefreq ,
7775 priority,
7876 // Note: lastmod is automatically added by Astro sitemap when available
7977 } ;
@@ -94,17 +92,19 @@ export default defineConfig({
9492 src : "/pwa-192x192.png" ,
9593 sizes : "192x192" ,
9694 type : "image/png" ,
95+ purpose : "any" ,
9796 } ,
9897 {
9998 src : "/pwa-512x512.png" ,
10099 sizes : "512x512" ,
101100 type : "image/png" ,
101+ purpose : "any" ,
102102 } ,
103103 {
104- src : "/pwa-192x192 .png" ,
105- sizes : "192x192 " ,
104+ src : "/pwa-512x512 .png" ,
105+ sizes : "512x512 " ,
106106 type : "image/png" ,
107- purpose : "any maskable" ,
107+ purpose : "maskable" ,
108108 } ,
109109 ] ,
110110 } ,
0 commit comments