Skip to content

Commit a704613

Browse files
committed
update docs
1 parent f9a2879 commit a704613

4 files changed

Lines changed: 263 additions & 0 deletions

File tree

docs/.vitepress/config.mts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,66 @@
11
import { defineConfig } from 'vitepress'
22

3+
const GA_ID = "G-6BVYCRK57P";
4+
const GTM_ID = "GTM-P4M9T8ZR";
5+
const ADSENSE_CLIENT_ID = "ca-pub-2040560600290490";
6+
37
export default defineConfig({
48
title: "api.zig",
59
description: "High-performance, multi-threaded HTTP API framework for Zig with GraphQL, WebSocket, and real-time support",
610
base: '/api.zig/',
711
ignoreDeadLinks: true,
812

13+
sitemap: {
14+
hostname: 'https://muhammad-fiaz.github.io',
15+
changefreq: 'weekly',
16+
priority: 0.8,
17+
lastmod: new Date().toISOString(),
18+
transformItems(items) {
19+
return items.map(item => ({
20+
...item,
21+
priority: item.url === '/api.zig/' ? 1.0 : 0.8,
22+
}))
23+
}
24+
},
25+
926
head: [
1027
['meta', { name: 'theme-color', content: '#f7a41d' }],
1128
['meta', { name: 'og:type', content: 'website' }],
1229
['meta', { name: 'og:site_name', content: 'api.zig' }],
1330
['meta', { name: 'keywords', content: 'zig, api, graphql, websocket, http, framework, rest, openapi' }],
31+
['meta', { name: 'google-adsense-account', content: ADSENSE_CLIENT_ID }],
32+
33+
// Google Analytics
34+
['script', { async: true, src: `https://www.googletagmanager.com/gtag/js?id=${GA_ID}` }],
35+
['script', {}, `
36+
window.dataLayer = window.dataLayer || [];
37+
function gtag(){dataLayer.push(arguments);}
38+
gtag('js', new Date());
39+
gtag('config', '${GA_ID}');
40+
`],
41+
42+
// Google Tag Manager
43+
['script', {}, `
44+
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
45+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
46+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
47+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
48+
})(window,document,'script','dataLayer','${GTM_ID}');
49+
`],
50+
51+
// Google AdSense
52+
['script', { async: true, src: `https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${ADSENSE_CLIENT_ID}`, crossorigin: 'anonymous' }],
53+
54+
// Manifest
55+
['link', { rel: 'manifest', href: '/api.zig/manifest.json' }],
56+
['meta', { name: 'application-name', content: 'api.zig' }],
1457
],
1558

59+
transformHtml(html) {
60+
const gtmNoscript = `<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=${GTM_ID}" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>`;
61+
return html.replace('<body>', `<body>\n${gtmNoscript}`);
62+
},
63+
1664
themeConfig: {
1765
logo: '/logo.png',
1866

docs/public/manifest.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "api.zig",
3+
"short_name": "api.zig",
4+
"description": "High-performance, multi-threaded HTTP API framework for Zig with GraphQL, WebSocket, and real-time support",
5+
"start_url": "/api.zig/",
6+
"display": "standalone",
7+
"background_color": "#ffffff",
8+
"theme_color": "#f7a41d",
9+
"icons": [
10+
{
11+
"src": "/api.zig/logo.png",
12+
"sizes": "any",
13+
"type": "image/png"
14+
}
15+
]
16+
}

docs/public/robots.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
User-agent: *
2+
Allow: /
3+
4+
Sitemap: https://muhammad-fiaz.github.io/api.zig/sitemap.xml

docs/public/sitemap.xml

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3+
<url>
4+
<loc>https://muhammad-fiaz.github.io/api.zig/</loc>
5+
<lastmod>2026-06-30</lastmod>
6+
<changefreq>weekly</changefreq>
7+
<priority>1.0</priority>
8+
</url>
9+
<url>
10+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/getting-started</loc>
11+
<lastmod>2026-06-30</lastmod>
12+
<changefreq>weekly</changefreq>
13+
<priority>0.9</priority>
14+
</url>
15+
<url>
16+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/installation</loc>
17+
<lastmod>2026-06-30</lastmod>
18+
<changefreq>weekly</changefreq>
19+
<priority>0.8</priority>
20+
</url>
21+
<url>
22+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/quick-start</loc>
23+
<lastmod>2026-06-30</lastmod>
24+
<changefreq>weekly</changefreq>
25+
<priority>0.8</priority>
26+
</url>
27+
<url>
28+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/routing</loc>
29+
<lastmod>2026-06-30</lastmod>
30+
<changefreq>weekly</changefreq>
31+
<priority>0.8</priority>
32+
</url>
33+
<url>
34+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/handlers</loc>
35+
<lastmod>2026-06-30</lastmod>
36+
<changefreq>weekly</changefreq>
37+
<priority>0.8</priority>
38+
</url>
39+
<url>
40+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/responses</loc>
41+
<lastmod>2026-06-30</lastmod>
42+
<changefreq>weekly</changefreq>
43+
<priority>0.8</priority>
44+
</url>
45+
<url>
46+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/path-parameters</loc>
47+
<lastmod>2026-06-30</lastmod>
48+
<changefreq>weekly</changefreq>
49+
<priority>0.8</priority>
50+
</url>
51+
<url>
52+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/context</loc>
53+
<lastmod>2026-06-30</lastmod>
54+
<changefreq>weekly</changefreq>
55+
<priority>0.8</priority>
56+
</url>
57+
<url>
58+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/middleware</loc>
59+
<lastmod>2026-06-30</lastmod>
60+
<changefreq>weekly</changefreq>
61+
<priority>0.8</priority>
62+
</url>
63+
<url>
64+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/multi-threading</loc>
65+
<lastmod>2026-06-30</lastmod>
66+
<changefreq>weekly</changefreq>
67+
<priority>0.8</priority>
68+
</url>
69+
<url>
70+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/openapi</loc>
71+
<lastmod>2026-06-30</lastmod>
72+
<changefreq>weekly</changefreq>
73+
<priority>0.8</priority>
74+
</url>
75+
<url>
76+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/validation</loc>
77+
<lastmod>2026-06-30</lastmod>
78+
<changefreq>weekly</changefreq>
79+
<priority>0.8</priority>
80+
</url>
81+
<url>
82+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/dependency-injection</loc>
83+
<lastmod>2026-06-30</lastmod>
84+
<changefreq>weekly</changefreq>
85+
<priority>0.8</priority>
86+
</url>
87+
<url>
88+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/security</loc>
89+
<lastmod>2026-06-30</lastmod>
90+
<changefreq>weekly</changefreq>
91+
<priority>0.8</priority>
92+
</url>
93+
<url>
94+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/sub-applications</loc>
95+
<lastmod>2026-06-30</lastmod>
96+
<changefreq>weekly</changefreq>
97+
<priority>0.8</priority>
98+
</url>
99+
<url>
100+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/error-handling</loc>
101+
<lastmod>2026-06-30</lastmod>
102+
<changefreq>weekly</changefreq>
103+
<priority>0.8</priority>
104+
</url>
105+
<url>
106+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/json</loc>
107+
<lastmod>2026-06-30</lastmod>
108+
<changefreq>weekly</changefreq>
109+
<priority>0.8</priority>
110+
</url>
111+
<url>
112+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/logging</loc>
113+
<lastmod>2026-06-30</lastmod>
114+
<changefreq>weekly</changefreq>
115+
<priority>0.8</priority>
116+
</url>
117+
<url>
118+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/graphql</loc>
119+
<lastmod>2026-06-30</lastmod>
120+
<changefreq>weekly</changefreq>
121+
<priority>0.8</priority>
122+
</url>
123+
<url>
124+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/graphql-schema</loc>
125+
<lastmod>2026-06-30</lastmod>
126+
<changefreq>weekly</changefreq>
127+
<priority>0.8</priority>
128+
</url>
129+
<url>
130+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/graphql-resolvers</loc>
131+
<lastmod>2026-06-30</lastmod>
132+
<changefreq>weekly</changefreq>
133+
<priority>0.8</priority>
134+
</url>
135+
<url>
136+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/graphql-subscriptions</loc>
137+
<lastmod>2026-06-30</lastmod>
138+
<changefreq>weekly</changefreq>
139+
<priority>0.8</priority>
140+
</url>
141+
<url>
142+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/graphql-ui</loc>
143+
<lastmod>2026-06-30</lastmod>
144+
<changefreq>weekly</changefreq>
145+
<priority>0.8</priority>
146+
</url>
147+
<url>
148+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/websocket</loc>
149+
<lastmod>2026-06-30</lastmod>
150+
<changefreq>weekly</changefreq>
151+
<priority>0.8</priority>
152+
</url>
153+
<url>
154+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/sessions</loc>
155+
<lastmod>2026-06-30</lastmod>
156+
<changefreq>weekly</changefreq>
157+
<priority>0.8</priority>
158+
</url>
159+
<url>
160+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/caching</loc>
161+
<lastmod>2026-06-30</lastmod>
162+
<changefreq>weekly</changefreq>
163+
<priority>0.8</priority>
164+
</url>
165+
<url>
166+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/metrics</loc>
167+
<lastmod>2026-06-30</lastmod>
168+
<changefreq>weekly</changefreq>
169+
<priority>0.8</priority>
170+
</url>
171+
<url>
172+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/health-checks</loc>
173+
<lastmod>2026-06-30</lastmod>
174+
<changefreq>weekly</changefreq>
175+
<priority>0.8</priority>
176+
</url>
177+
<url>
178+
<loc>https://muhammad-fiaz.github.io/api.zig/guide/deployment</loc>
179+
<lastmod>2026-06-30</lastmod>
180+
<changefreq>weekly</changefreq>
181+
<priority>0.8</priority>
182+
</url>
183+
<url>
184+
<loc>https://muhammad-fiaz.github.io/api.zig/api/</loc>
185+
<lastmod>2026-06-30</lastmod>
186+
<changefreq>weekly</changefreq>
187+
<priority>0.9</priority>
188+
</url>
189+
<url>
190+
<loc>https://muhammad-fiaz.github.io/api.zig/examples/</loc>
191+
<lastmod>2026-06-30</lastmod>
192+
<changefreq>weekly</changefreq>
193+
<priority>0.9</priority>
194+
</url>
195+
</urlset>

0 commit comments

Comments
 (0)