From 53537226cd7ce98ed2b5a4086a4397937c0f3266 Mon Sep 17 00:00:00 2001 From: Timo Knuth Date: Fri, 6 Feb 2026 12:59:47 +0100 Subject: [PATCH] SEO --- bizmatch/angular.json | 5 +- bizmatch/server.ts | 2 + bizmatch/src/app/app.config.ts | 3 +- bizmatch/src/app/app.routes.server.ts | 8 +-- .../components/header/header.component.html | 4 +- .../search-modal-broker.component.html | 28 +++++------ .../search-modal-commercial.component.html | 28 +++++------ .../search-modal/search-modal.component.html | 50 ++++++++++--------- .../validated-quill.component.ts | 8 +-- .../details-business-listing.component.html | 4 +- ...commercial-property-listing.component.html | 4 +- .../details-user/details-user.component.html | 4 +- .../broker-listings.component.html | 4 +- .../business-listings.component.html | 4 +- ...ommercial-property-listings.component.html | 4 +- .../account/account.component.html | 16 +++--- bizmatch/src/build.ts | 2 +- bizmatch/src/index.html | 49 ++++++++---------- 18 files changed, 110 insertions(+), 117 deletions(-) diff --git a/bizmatch/angular.json b/bizmatch/angular.json index e5853b6..085c7cd 100644 --- a/bizmatch/angular.json +++ b/bizmatch/angular.json @@ -53,10 +53,7 @@ ], "styles": [ "src/styles.scss", - "src/styles/lazy-load.css", - "node_modules/quill/dist/quill.snow.css", - "node_modules/leaflet/dist/leaflet.css", - "node_modules/ngx-sharebuttons/themes/default.scss" + "src/styles/lazy-load.css" ] }, "configurations": { diff --git a/bizmatch/server.ts b/bizmatch/server.ts index ce0877f..ac7a2f0 100644 --- a/bizmatch/server.ts +++ b/bizmatch/server.ts @@ -104,6 +104,8 @@ export async function app(): Promise { // All regular routes use the Angular engine server.get('*', async (req, res, next) => { console.log(`[SSR] Handling request: ${req.method} ${req.url}`); + // Cache SSR-rendered pages at CDN level + res.setHeader('Cache-Control', 'public, s-maxage=300, stale-while-revalidate=600'); try { const response = await angularApp.handle(req); if (response) { diff --git a/bizmatch/src/app/app.config.ts b/bizmatch/src/app/app.config.ts index f15e4d9..e55d9e1 100644 --- a/bizmatch/src/app/app.config.ts +++ b/bizmatch/src/app/app.config.ts @@ -20,8 +20,7 @@ import { createLogger } from './utils/utils'; const logger = createLogger('ApplicationConfig'); export const appConfig: ApplicationConfig = { providers: [ - // Temporarily disabled for SSR debugging - // provideClientHydration(), + provideClientHydration(), provideHttpClient(withInterceptorsFromDi()), { provide: APP_INITIALIZER, diff --git a/bizmatch/src/app/app.routes.server.ts b/bizmatch/src/app/app.routes.server.ts index aa0ea8b..063f93c 100644 --- a/bizmatch/src/app/app.routes.server.ts +++ b/bizmatch/src/app/app.routes.server.ts @@ -1,8 +1,8 @@ import { RenderMode, ServerRoute } from '@angular/ssr'; export const serverRoutes: ServerRoute[] = [ - { - path: '**', - renderMode: RenderMode.Server - } + { path: 'home', renderMode: RenderMode.Prerender }, + { path: 'terms-of-use', renderMode: RenderMode.Prerender }, + { path: 'privacy-statement', renderMode: RenderMode.Prerender }, + { path: '**', renderMode: RenderMode.Server } ]; diff --git a/bizmatch/src/app/components/header/header.component.html b/bizmatch/src/app/components/header/header.component.html index b4921bf..d7b446b 100644 --- a/bizmatch/src/app/components/header/header.component.html +++ b/bizmatch/src/app/components/header/header.component.html @@ -9,7 +9,7 @@ @if(isFilterUrl()){
-
- - +