1
+ import type { HeadConfig } from 'vitepress'
1
2
import type { DocsConfig } from '@stacksjs/types'
2
3
import { SocialLinkIcon } from '@stacksjs/types'
4
+ import analytics from '../config/analytics'
5
+
6
+ export const faviconHead : HeadConfig [ ] = [
7
+ [
8
+ 'link' ,
9
+ {
10
+ rel : 'icon' ,
11
+ href : 'https://raw.githubusercontent.com/stacksjs/stacks/main/public/logo-transparent.svg?https://raw.githubusercontent.com/stacksjs/stacks/main/public/logo-transparent.svg?asdas' ,
12
+ } ,
13
+ ] ,
14
+ ]
15
+
16
+ export const googleAnalyticsHead : HeadConfig [ ] = [
17
+ [
18
+ 'script' ,
19
+ {
20
+ async : '' ,
21
+ src : `https://www.googletagmanager.com/gtag/js?id=${ analytics . drivers ?. googleAnalytics ?. trackingId } ` ,
22
+ } ,
23
+ ] ,
24
+ [
25
+ 'script' ,
26
+ { } ,
27
+ `window.dataLayer = window.dataLayer || [];
28
+ function gtag(){dataLayer.push(arguments);}
29
+ gtag('js', new Date());
30
+ gtag('config', 'TAG_ID');` ,
31
+ ] ,
32
+ ]
33
+
34
+ export const fathomAnalyticsHead : HeadConfig [ ] = [
35
+ [
36
+ 'script' ,
37
+ {
38
+ 'src' : 'https://cdn.usefathom.com/script.js' ,
39
+ 'data-site' : analytics . drivers ?. fathom ?. siteId || '' ,
40
+ 'defer' : '' ,
41
+ } ,
42
+ ] ,
43
+ ]
44
+
45
+ export const analyticsHead
46
+ = analytics . driver === 'fathom'
47
+ ? fathomAnalyticsHead
48
+ : analytics . driver === 'google-analytics'
49
+ ? googleAnalyticsHead
50
+ : [ ]
51
+
3
52
4
53
const nav = [
5
54
{
@@ -576,8 +625,24 @@ export default {
576
625
deploy : true ,
577
626
base : '/' ,
578
627
628
+ metaChunk : true ,
629
+
630
+ head : [
631
+ [ 'link' , { rel : 'icon' , type : 'image/svg+xml' , href : '/images/logos/logo-mini.svg' } ] ,
632
+ [ 'link' , { rel : 'icon' , type : 'image/png' , href : '/images/logos/logo.png' } ] ,
633
+ [ 'meta' , { name : 'theme-color' , content : '#1e40af' } ] ,
634
+ [ 'meta' , { property : 'og:type' , content : 'website' } ] ,
635
+ [ 'meta' , { property : 'og:locale' , content : 'en' } ] ,
636
+ [ 'meta' , { property : 'og:title' , content : 'Stacks | A better developer environment.' } ] ,
637
+ [ 'meta' , { property : 'og:site_name' , content : 'Stacks' } ] ,
638
+ [ 'meta' , { property : 'og:image' , content : 'https://stacksjs.org/images/og-image.png' } ] ,
639
+ [ 'meta' , { property : 'og:url' , content : 'https://stacksjs.org/' } ] ,
640
+ // ['script', { 'src': 'https://cdn.usefathom.com/script.js', 'data-site': '', 'data-spa': 'auto', 'defer': '' }],
641
+ ...analyticsHead
642
+ ] ,
643
+
579
644
themeConfig : {
580
- logo : 'https://raw.githubusercontent.com/stacksjs/stacks/main/public/ logo-transparent.svg?https://raw.githubusercontent.com/stacksjs/stacks/main/public/logo-transparent.svg?asdas ' ,
645
+ logo : '/images/logos/ logo-transparent.svg' ,
581
646
582
647
nav,
583
648
sidebar,
@@ -594,10 +659,8 @@ export default {
594
659
595
660
socialLinks : [
596
661
{ icon : SocialLinkIcon . Twitter , link : 'https://twitter.com/stacksjs' } ,
597
- {
598
- icon : SocialLinkIcon . GitHub ,
599
- link : 'https://github.com/stacksjs/stacks' ,
600
- } ,
662
+ { icon : SocialLinkIcon . Bluesky , link : 'https://bsky.app/profile/chrisbreuer.dev' } ,
663
+ { icon : SocialLinkIcon . GitHub , link : 'https://github.com/stacksjs/stacks' } ,
601
664
{ icon : SocialLinkIcon . Discord , link : 'https://discord.gg/stacksjs' } ,
602
665
] ,
603
666
0 commit comments