fix: remove Jan prefix from blog post titles for better SEO

- Blog posts now use only frontmatter title without 'Jan -' prefix
- Other pages maintain existing branding (Jan Desktop, Jan Server, Jan)
- Improves SEO for blog content while preserving site branding
This commit is contained in:
eckartal 2025-09-30 11:25:45 +08:00
parent b69330ffca
commit 8b9aca27bf

View File

@ -107,14 +107,15 @@ const config: DocsThemeConfig = {
head: function useHead() { head: function useHead() {
const { title, frontMatter } = useConfig() const { title, frontMatter } = useConfig()
const { asPath } = useRouter() const { asPath } = useRouter()
const titleTemplate = const titleTemplate = asPath.includes('/post/')
(asPath.includes('/desktop') ? (frontMatter?.title || title)
: (asPath.includes('/desktop')
? 'Jan Desktop' ? 'Jan Desktop'
: asPath.includes('/server') : asPath.includes('/server')
? 'Jan Server' ? 'Jan Server'
: 'Jan') + : 'Jan') +
' - ' + ' - ' +
(frontMatter?.title || title) (frontMatter?.title || title)
return ( return (
<Fragment> <Fragment>