Skip to content

Commit fe95874

Browse files
committed
style: changed '|' in title to '-'
1 parent 03f3384 commit fe95874

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

astro.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default defineConfig({
2020
Sidebar: './src/components/overrides/Sidebar.astro',
2121
SocialIcons: './src/components/overrides/SocialIcons.astro',
2222
LastUpdated: "./src/components/overrides/LastUpdated.astro",
23+
Head: './src/components/overrides/CustomHead.astro',
2324
},
2425
lastUpdated: true,
2526
// credits: true,
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
import type { Props } from '@astrojs/starlight/props';
3+
import Default from '@astrojs/starlight/components/Head.astro';
4+
5+
const html = await Astro.slots.render('default');
6+
---
7+
<Default {...Astro.props} />
8+
9+
<script is:inline>
10+
document.addEventListener('astro:page-load', () => {
11+
if (document.title.includes(' | ')) {
12+
document.title = document.title.replace(' | ', ' - ');
13+
}
14+
});
15+
16+
if (document.title.includes(' | ')) {
17+
document.title = document.title.replace(' | ', ' - ');
18+
}
19+
</script>

src/content/docs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ head:
1212
- tag: meta
1313
attrs:
1414
property: og:title
15-
content: "Welcome | Jozelot Docs"
15+
content: "Welcome - Jozelot Docs"
1616
- tag: meta
1717
attrs:
1818
property: og:image

0 commit comments

Comments
 (0)