File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,6 +80,17 @@ if (insideNeo) {
8080
8181 fs . writeFileSync ( footerPath , footerContentArray . join ( os . EOL ) ) ;
8282 }
83+
84+ // Update the datePublished in apps/portal/index.html for SEO purposes.
85+ // This ensures the structured data reflects the latest publication date.
86+ const indexPath = path . join ( root , 'apps/portal/index.html' ) ;
87+ if ( fs . existsSync ( indexPath ) ) {
88+ let indexContent = fs . readFileSync ( indexPath , 'utf-8' ) ;
89+ const today = new Date ( ) . toISOString ( ) . slice ( 0 , 10 ) ; // YYYY-MM-DD format
90+ indexContent = indexContent . replace ( / " d a t e P u b l i s h e d " : " \d { 4 } - \d { 2 } - \d { 2 } " / , `"datePublished": "${ today } "` ) ;
91+ fs . writeFileSync ( indexPath , indexContent ) ;
92+ console . log ( 'Updated apps/portal/index.html datePublished' ) ;
93+ }
8394}
8495
8596// Generate sitemap.xml and llm.txt to ensure SEO files are up-to-date with the latest content and routes.
You can’t perform that action at this time.
0 commit comments