Skip to content

Commit

Permalink
chore: fix default favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismclarke committed Feb 2, 2024
1 parent 9c276ae commit 7fe67e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/data-models/deployment.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export interface IDeploymentConfig {
translated_strings_path?: string;
};
web: {
/** Relative path of custom favicon asset to load from app_data assets */
favicon_asset?: string;
};
workflows: {
Expand Down
10 changes: 6 additions & 4 deletions src/app/shared/services/seo/seo.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@ export class SeoService extends SyncServiceBase {
*/
private getDefaultSEOTags(): ISEOMeta {
const PUBLIC_URL = location.origin;
const faviconUrl = environment.deploymentConfig.web?.favicon_asset
? `${PUBLIC_URL}/assets/app_data/assets/` + environment.deploymentConfig.web.favicon_asset
: "";
let faviconUrl = `${PUBLIC_URL}/assets/icon/favicon.png`;
const { web, app_config } = environment.deploymentConfig;
if (web?.favicon_asset) {
faviconUrl = `${PUBLIC_URL}/assets/app_data/assets/${web.favicon_asset}`;
}
return {
title: environment.deploymentConfig.app_config.APP_HEADER_DEFAULTS.title,
title: app_config.APP_HEADER_DEFAULTS.title,
description: "",
faviconUrl,
imageUrl: ``,
Expand Down

0 comments on commit 7fe67e6

Please sign in to comment.