Skip to content

Commit a0ea717

Browse files
committed
feat: add a dynamic version update
1 parent 14a7880 commit a0ea717

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

website/.vitepress/config.mts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
import { defineConfig } from 'vitepress'
22
import hairaGrammar from './haira.tmLanguage.json'
33

4+
const hairaVersion = await fetch('https://api.github.com/repos/mrzdevcore/haira/releases/latest')
5+
.then(r => r.json())
6+
.then(d => d.tag_name ?? 'latest')
7+
.catch(() => 'latest')
8+
49
const sharedNav = (prefix: string) => [
510
{ text: prefix ? 'Docs' : 'Docs', link: `${prefix}/docs/getting-started/installation` },
611
{ text: 'Examples', link: `${prefix}/docs/examples` },
712
{ text: 'ARP', link: `${prefix}/agentic-rendering-protocol` },
813
{ text: 'Generative UI', link: `${prefix}/generative-ui` },
914
{
10-
text: 'v0.4.0',
15+
text: hairaVersion,
1116
items: [
1217
{ text: 'Changelog', link: 'https://github.com/mrzdevcore/haira/releases' },
1318
{ text: 'Specification (PDF)', link: '/haira-spec.pdf' },

0 commit comments

Comments
 (0)