-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: initialize docs with vitepress and typedoc
- Loading branch information
Showing
154 changed files
with
5,683 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { defineConfig } from 'vitepress' | ||
import typedocSidebar from '../api/typedoc-sidebar.json' | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: 'Home', | ||
titleTemplate: 'Cheshire Cat - :title', | ||
description: 'Hackable and production-ready framework for developing AI agents on top of LLMs', | ||
head: [['link', { rel: 'icon', href: '/favicon.ico' }]], | ||
lastUpdated: true, | ||
cleanUrls: true, | ||
themeConfig: { | ||
logo: { | ||
dark: '/logo-dark.svg', | ||
light: '/logo-light.svg', | ||
alt: 'Cheshire Cat Logo', | ||
}, | ||
footer: { | ||
message: 'Released under the GPL-3.0 License.', | ||
copyright: 'Copyright © 2024-present Daniele Nicosia & Contributors', | ||
}, | ||
search: { | ||
provider: 'local', | ||
}, | ||
nav: [ | ||
{ text: 'Home', link: '/' }, | ||
{ text: 'Docs', link: '/introduction' }, | ||
{ text: 'API', link: '/api/' }, | ||
{ text: 'Contributors', link: '/contributors' }, | ||
], | ||
sidebar: [ | ||
{ | ||
text: 'Documentation', | ||
items: [ | ||
{ | ||
text: 'Introduction', | ||
link: '/introduction', | ||
}, | ||
{ | ||
text: 'Getting Started', | ||
link: '/getting-started', | ||
}, | ||
], | ||
}, | ||
{ | ||
text: 'API Reference', | ||
items: [ | ||
{ | ||
text: 'Overview', | ||
link: '/api/', | ||
}, | ||
...typedocSidebar, | ||
], | ||
}, | ||
{ | ||
text: 'Contributors', | ||
link: '/contributors', | ||
}, | ||
], | ||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/zAlweNy26/ts-cat' }, | ||
{ icon: 'discord', link: 'https://discord.gg/bHX5sNFCYU' }, | ||
{ icon: 'linkedin', link: 'https://www.linkedin.com/company/cheshire-cat-ai' }, | ||
], | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<script setup lang="ts"> | ||
import { useData } from 'vitepress' | ||
import DefaultTheme from 'vitepress/theme' | ||
import { nextTick, provide } from 'vue' | ||
const { isDark } = useData() | ||
function enableTransitions() { | ||
return 'startViewTransition' in document | ||
&& window.matchMedia('(prefers-reduced-motion: no-preference)').matches | ||
} | ||
provide('toggle-appearance', async ({ clientX: x, clientY: y }: MouseEvent) => { | ||
if (!enableTransitions()) { | ||
isDark.value = !isDark.value | ||
return | ||
} | ||
const clipPath = [ | ||
`circle(0px at ${x}px ${y}px)`, | ||
`circle(${Math.hypot( | ||
Math.max(x, innerWidth - x), | ||
Math.max(y, innerHeight - y), | ||
)}px at ${x}px ${y}px)`, | ||
] | ||
await document.startViewTransition(async () => { | ||
isDark.value = !isDark.value | ||
await nextTick() | ||
}).ready | ||
document.documentElement.animate( | ||
{ clipPath: isDark.value ? clipPath.reverse() : clipPath }, | ||
{ | ||
duration: 300, | ||
easing: 'ease-in', | ||
pseudoElement: `::view-transition-${isDark.value ? 'old' : 'new'}(root)`, | ||
}, | ||
) | ||
}) | ||
</script> | ||
|
||
<template> | ||
<DefaultTheme.Layout /> | ||
</template> | ||
|
||
<style> | ||
::view-transition-old(root), | ||
::view-transition-new(root) { | ||
animation: none; | ||
mix-blend-mode: normal; | ||
} | ||
::view-transition-old(root), | ||
.dark::view-transition-new(root) { | ||
z-index: 1; | ||
} | ||
::view-transition-new(root), | ||
.dark::view-transition-old(root) { | ||
z-index: 9999; | ||
} | ||
.VPSwitchAppearance { | ||
width: 22px !important; | ||
} | ||
.VPSwitchAppearance .check { | ||
transform: none !important; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
:root { | ||
--vp-c-brand-1: #3a98a4; | ||
--vp-c-brand-2: #54b1bc; | ||
--vp-c-brand-3: #327a88; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import DefaultTheme from 'vitepress/theme' | ||
import Layout from './Layout.vue' | ||
import './custom.css' | ||
|
||
export default { | ||
extends: DefaultTheme, | ||
Layout, | ||
} |
Oops, something went wrong.