(), {
- Sponsor
+ {{ member.actionText || 'Sponsor' }}
diff --git a/src/client/theme-default/support/translation.ts b/src/client/theme-default/support/translation.ts
index 607d5db3..12ade37b 100644
--- a/src/client/theme-default/support/translation.ts
+++ b/src/client/theme-default/support/translation.ts
@@ -3,14 +3,14 @@ import { useData } from '../composables/data'
/**
* @param themeObject Can be an object with `translations` and `locales` properties
*/
-export function createTranslate(
- themeObject: any,
+export function createSearchTranslate(
defaultTranslations: Record
): (key: string) => string {
- const { localeIndex } = useData()
+ const { localeIndex, theme } = useData()
function translate(key: string): string {
const keyPath = key.split('.')
+ const themeObject = theme.value.search?.options
const isObject = themeObject && typeof themeObject === 'object'
const locales =
diff --git a/src/node/build/build.ts b/src/node/build/build.ts
index 1634b358..7dca478a 100644
--- a/src/node/build/build.ts
+++ b/src/node/build/build.ts
@@ -8,6 +8,7 @@ import { rimraf } from 'rimraf'
import { pathToFileURL } from 'url'
import type { BuildOptions, Rollup } from 'vite'
import { resolveConfig, type SiteConfig } from '../config'
+import { clearCache } from '../markdownToVue'
import { slash, type HeadConfig } from '../shared'
import { deserializeFunctions, serializeFunctions } from '../utils/fnSerialize'
import { task } from '../utils/task'
@@ -140,6 +141,7 @@ export async function build(
await generateSitemap(siteConfig)
await siteConfig.buildEnd?.(siteConfig)
+ clearCache()
siteConfig.logger.info(
`build complete in ${((Date.now() - start) / 1000).toFixed(2)}s.`
diff --git a/src/shared/shared.ts b/src/shared/shared.ts
index c69f7277..9dd05e34 100644
--- a/src/shared/shared.ts
+++ b/src/shared/shared.ts
@@ -113,6 +113,10 @@ export function createTitle(siteData: SiteData, pageData: PageData): string {
const templateString = createTitleTemplate(siteData.title, template)
+ if (title === templateString.slice(3)) {
+ return title
+ }
+
return `${title}${templateString}`
}
diff --git a/types/default-theme.d.ts b/types/default-theme.d.ts
index 59590e4e..015c6f26 100644
--- a/types/default-theme.d.ts
+++ b/types/default-theme.d.ts
@@ -348,6 +348,7 @@ export namespace DefaultTheme {
desc?: string
links?: SocialLink[]
sponsor?: string
+ actionText?: string
}
// outline -------------------------------------------------------------------