v3: added customizable site emoji (logo), small visual tweaks
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 41s
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 41s
This commit is contained in:
@@ -12,6 +12,17 @@ function readSiteName(): string {
|
||||
|
||||
export const SITE_NAME = readSiteName();
|
||||
|
||||
// The server injects the configured emoji into a <meta name="site-emoji"> tag.
|
||||
// In the Vite dev server it's substituted too; fall back to the default truck.
|
||||
function readSiteEmoji(): string {
|
||||
const meta = document.querySelector('meta[name="site-emoji"]')
|
||||
?.getAttribute("content")?.trim();
|
||||
if (meta && meta !== "__SITE_EMOJI__") return meta;
|
||||
return "🚚";
|
||||
}
|
||||
|
||||
export const SITE_EMOJI = readSiteEmoji();
|
||||
|
||||
/**
|
||||
* Keeps document.title in sync with the current page during client-side
|
||||
* navigation. Without this the tab title only ever reflects the server-rendered
|
||||
|
||||
Reference in New Issue
Block a user