Skip to content

Commit 6d6f37e

Browse files
authored
docs: add english translation (#14)
* docs: add english translation * refactor: remove unused files
1 parent a71269c commit 6d6f37e

25 files changed

+1399
-1310
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# Build Your Own TanStack Query
22

3-
<a href="https://mugglim.github.io/build-your-own-tanstack-query">한국어</a> | <a href="/en.md">English</a>
3+
<a href="https://mugglim.github.io/build-your-own-tanstack-query">English</a> | <a href="https://mugglim.github.io/build-your-own-tanstack-query/ko">한국어</a>
44

55
## Introduction
66

7-
We're going to rewrite TanStack Query and useQuery from scratch.
8-
We'll be using the ideas and code from [Let's Build React Query in 150 Lines of Code!](https://www.youtube.com/watch?v=9SrIirrnwk0) and TanStack Query v5.
7+
We're going to rewrite TanStack Query and useQuery from scratch. We'll be using the ideas and code from [Let's Build React Query in 150 Lines of Code!](https://www.youtube.com/watch?v=9SrIirrnwk0) and TanStack Query v5.
98

109
## Demo
1110

docs/.vitepress/config.mts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { defineConfig } from "vitepress";
2+
import koConfig from "./ko.mts";
3+
import enConfig from "./en.mts";
4+
5+
export default defineConfig({
6+
base: "/build-your-own-tanstack-query/",
7+
title: "Build your own TanStack Query",
8+
description: "Build your own TanStack Query",
9+
rewrites: {
10+
"en/:doc.md": ":doc.md"
11+
},
12+
head: [
13+
["link", { rel: "icon", href: "/build-your-own-tanstack-query/tanstack-query-logo.png" }],
14+
["meta", { property: "og:title", content: "Build your own TanStack Query" }],
15+
["meta", { property: "og:description", content: "Build your own TanStack Query" }],
16+
["meta", { property: "og:image", content: "/build-your-own-tanstack-query/tanstack-query-logo.png" }],
17+
["meta", { name: "twitter:image", content: "/build-your-own-tanstack-query/tanstack-query-logo.png" }]
18+
],
19+
locales: {
20+
root: { label: "English", ...enConfig },
21+
ko: { label: "한국어", ...koConfig }
22+
},
23+
themeConfig: {
24+
siteTitle: "Home",
25+
outline: { level: "deep" },
26+
socialLinks: [{ icon: "github", link: "https://github.com/mugglim/build-your-own-tanstack-query" }]
27+
}
28+
});

docs/.vitepress/config.ts

Lines changed: 0 additions & 55 deletions
This file was deleted.

docs/.vitepress/en.mts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { DefaultTheme, defineConfig } from "vitepress";
2+
3+
const sidebarList: DefaultTheme.SidebarItem[] = [
4+
{ text: "Introduction", items: [{ text: "Overview", link: "/intro.html" }] },
5+
{
6+
text: "Guide",
7+
items: [
8+
{ text: "Overview", link: "/guide.html" },
9+
{ text: "Core", link: "/core.html" },
10+
{ text: "React", link: "/react.html" },
11+
{
12+
text: "Learn More",
13+
items: [
14+
{ text: "Window Focus Refetching", link: "/window-focus-refetching.html" },
15+
{ text: "Devtools", link: "/devtools.html" }
16+
]
17+
}
18+
]
19+
}
20+
];
21+
22+
const enConfig = defineConfig({
23+
lang: "en-US",
24+
themeConfig: {
25+
sidebar: sidebarList
26+
}
27+
});
28+
29+
export default enConfig;

docs/.vitepress/ko.mts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { DefaultTheme, defineConfig } from "vitepress";
2+
3+
const sidebarList: DefaultTheme.SidebarItem[] = [
4+
{ text: "소개", items: [{ text: "개요", link: "/ko/intro.html" }] },
5+
{
6+
text: "가이드",
7+
items: [
8+
{ text: "개요", link: "/ko/guide.html" },
9+
{ text: "코어 영역", link: "/ko/core.html" },
10+
{ text: "React 영역", link: "/ko/react.html" },
11+
{
12+
text: "더 알아보기",
13+
items: [
14+
{ text: "Window Focus Refetching", link: "/ko/window-focus-refetching.html" },
15+
{ text: "Devtools", link: "/ko/devtools.html" }
16+
]
17+
}
18+
]
19+
}
20+
];
21+
22+
const koConfig = defineConfig({
23+
lang: "ko-KR",
24+
themeConfig: {
25+
sidebar: sidebarList
26+
}
27+
});
28+
29+
export default koConfig;

docs/core/index.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

docs/core/query-cache.md

Lines changed: 0 additions & 112 deletions
This file was deleted.

0 commit comments

Comments
 (0)