|
1 | | -import { defineConfig } from 'vitepress' |
| 1 | +import { defineConfig } from "vitepress"; |
2 | 2 |
|
3 | 3 | // https://vitepress.dev/reference/site-config |
4 | 4 | export default defineConfig({ |
5 | 5 | title: "TypeScript is Like C#", |
6 | | - description: "A guide for backend devs. If you already know TypeScript, then learning C# is easy! This guide walks you through the similarities (and differences) between TypeScript and C#", |
| 6 | + description: |
| 7 | + "A guide for backend devs. If you already know TypeScript, then learning C# is easy! This guide walks you through the similarities (and differences) between TypeScript and C#", |
7 | 8 | sitemap: { |
8 | | - hostname: 'https://typescript-is-like-csharp.chrlschn.dev' |
| 9 | + hostname: "https://typescript-is-like-csharp.chrlschn.dev", |
9 | 10 | }, |
10 | 11 | head: [ |
11 | | - ['link', { rel: 'icon', href: '/csharp-logo-32.png' }], |
12 | | - ['meta', { property: 'og:image', content: 'https://typescript-is-like-csharp.chrlschn.dev/typescript-csharp.png' }], |
13 | | - ['meta', { property: 'twitter:image', content: 'https://typescript-is-like-csharp.chrlschn.dev/typescript-csharp.png' }], |
14 | | - ['script', { |
15 | | - async: '', |
16 | | - src: 'https://www.googletagmanager.com/gtag/js?id=G-QLSJ4QC7YZ' |
17 | | - }], |
18 | | - ['script', {}, ` |
| 12 | + ["link", { rel: "icon", href: "/csharp-logo-32.png" }], |
| 13 | + [ |
| 14 | + "meta", |
| 15 | + { |
| 16 | + property: "og:image", |
| 17 | + content: |
| 18 | + "https://typescript-is-like-csharp.chrlschn.dev/typescript-csharp.png", |
| 19 | + }, |
| 20 | + ], |
| 21 | + [ |
| 22 | + "meta", |
| 23 | + { |
| 24 | + property: "twitter:image", |
| 25 | + content: |
| 26 | + "https://typescript-is-like-csharp.chrlschn.dev/typescript-csharp.png", |
| 27 | + }, |
| 28 | + ], |
| 29 | + [ |
| 30 | + "script", |
| 31 | + { |
| 32 | + async: "", |
| 33 | + src: "https://www.googletagmanager.com/gtag/js?id=G-QLSJ4QC7YZ", |
| 34 | + }, |
| 35 | + ], |
| 36 | + [ |
| 37 | + "script", |
| 38 | + {}, |
| 39 | + ` |
19 | 40 | window.dataLayer = window.dataLayer || []; |
20 | 41 | function gtag(){dataLayer.push(arguments);} |
21 | 42 | gtag('js', new Date()); |
22 | 43 | gtag('config', 'G-QLSJ4QC7YZ'); |
23 | | - `], |
| 44 | + `, |
| 45 | + ], |
24 | 46 | ], |
25 | 47 | themeConfig: { |
26 | 48 | // https://vitepress.dev/reference/default-theme-config |
27 | | - logo: '/csharp-logo.png', |
| 49 | + logo: "/csharp-logo.png", |
28 | 50 |
|
29 | 51 | nav: [ |
30 | | - { text: 'Home', link: '/' }, |
31 | | - { text: 'Intro', link: '/pages/intro-and-motivation' }, |
32 | | - { text: 'About', link: 'https://www.linkedin.com/in/charlescchen/' }, |
| 52 | + { text: "Home", link: "/" }, |
| 53 | + { text: "Intro", link: "/pages/intro-and-motivation" }, |
| 54 | + { text: "About", link: "https://www.linkedin.com/in/charlescchen/" }, |
33 | 55 | ], |
34 | 56 |
|
35 | 57 | editLink: { |
36 | | - pattern: 'https://github.com/CharlieDigital/typescript-is-like-csharp/blob/main/docs/:path' |
| 58 | + pattern: |
| 59 | + "https://github.com/CharlieDigital/typescript-is-like-csharp/blob/main/docs/:path", |
37 | 60 | }, |
38 | 61 |
|
39 | 62 | sidebar: [ |
40 | 63 | { |
41 | | - text: 'Guide', |
| 64 | + text: "Guide", |
42 | 65 | items: [ |
43 | | - { text: 'Intro and Motivation', link: '/pages/intro-and-motivation' }, |
44 | | - { text: 'Getting Started', link: '/pages/getting-started' }, |
| 66 | + { text: "Intro and Motivation", link: "/pages/intro-and-motivation" }, |
| 67 | + { text: "Getting Started", link: "/pages/getting-started" }, |
45 | 68 | { |
46 | | - text: 'Basics', |
| 69 | + text: "Basics", |
47 | 70 | collapsed: true, |
48 | 71 | items: [ |
49 | | - { text: 'Variables', link: '/pages/basics/variables' }, |
50 | | - { text: 'Types', link: '/pages/basics/types' }, |
51 | | - { text: 'Nulls', link: '/pages/basics/nulls' }, |
52 | | - { text: 'Strings', link: '/pages/basics/strings' }, |
53 | | - { text: 'Collections', link: '/pages/basics/collections' }, |
54 | | - { text: 'Error Handling', link: '/pages/basics/error-handling' }, |
55 | | - { text: 'Conditionals', link: '/pages/basics/conditionals' }, |
56 | | - { text: 'Iteration', link: '/pages/basics/iteration' }, |
57 | | - { text: 'Comments', link: '/pages/basics/comments' }, |
58 | | - { text: 'Functions', link: '/pages/basics/functions' }, |
59 | | - { text: 'Classes and Types', link: '/pages/basics/classes' }, |
60 | | - { text: 'Generics', link: '/pages/basics/generics' }, |
61 | | - { text: 'Async/Await', link: '/pages/basics/async-await' }, |
62 | | - { text: 'Packages vs Projects', link: '/pages/basics/projects' }, |
63 | | - { text: 'import vs using', link: '/pages/basics/import-vs-using' }, |
64 | | - { text: 'CLI and Tooling', link: '/pages/basics/cli-tooling' }, |
65 | | - ] |
| 72 | + { text: "Variables", link: "/pages/basics/variables" }, |
| 73 | + { text: "Types", link: "/pages/basics/types" }, |
| 74 | + { text: "Nulls", link: "/pages/basics/nulls" }, |
| 75 | + { text: "Strings", link: "/pages/basics/strings" }, |
| 76 | + { text: "Enums", link: "/pages/basics/enums" }, |
| 77 | + { text: "Collections", link: "/pages/basics/collections" }, |
| 78 | + { text: "Error Handling", link: "/pages/basics/error-handling" }, |
| 79 | + { text: "Conditionals", link: "/pages/basics/conditionals" }, |
| 80 | + { text: "Iteration", link: "/pages/basics/iteration" }, |
| 81 | + { text: "Comments", link: "/pages/basics/comments" }, |
| 82 | + { text: "Functions", link: "/pages/basics/functions" }, |
| 83 | + { text: "Classes and Types", link: "/pages/basics/classes" }, |
| 84 | + { text: "Generics", link: "/pages/basics/generics" }, |
| 85 | + { text: "Async/Await", link: "/pages/basics/async-await" }, |
| 86 | + { text: "Packages vs Projects", link: "/pages/basics/projects" }, |
| 87 | + { |
| 88 | + text: "import vs using", |
| 89 | + link: "/pages/basics/import-vs-using", |
| 90 | + }, |
| 91 | + { text: "CLI and Tooling", link: "/pages/basics/cli-tooling" }, |
| 92 | + ], |
66 | 93 | }, |
67 | 94 | { |
68 | | - text: 'Intermediate', |
| 95 | + text: "Intermediate", |
69 | 96 | collapsed: true, |
70 | 97 | items: [ |
71 | | - { text: 'LINQ', link: '/pages/intermediate/linq' }, |
72 | | - { text: 'Tuples', link: '/pages/intermediate/tuples' }, |
| 98 | + { text: "LINQ", link: "/pages/intermediate/linq" }, |
| 99 | + { text: "Tuples", link: "/pages/intermediate/tuples" }, |
73 | 100 | // { text: 'Records', link: '/pages/intermediate/records' }, |
74 | | - { text: 'Extension Methods', link: '/pages/intermediate/extension-methods' }, |
75 | | - { text: 'Iterators and Enumerables', link: '/pages/intermediate/iterators-enumerables' }, |
76 | | - { text: '🚧 Unit Testing', link: '/pages/intermediate/unit-testing' }, |
77 | | - { text: 'Express vs Minimal API', link: '/pages/intermediate/express-vs-minimal-api' }, |
78 | | - { text: 'Nest.js vs Controller API', link: '/pages/intermediate/nest-vs-controller-api' }, |
79 | | - { text: 'Decorators vs Attributes', link: '/pages/intermediate/decorators-vs-attributes' }, |
| 101 | + { |
| 102 | + text: "Extension Methods", |
| 103 | + link: "/pages/intermediate/extension-methods", |
| 104 | + }, |
| 105 | + { |
| 106 | + text: "Iterators and Enumerables", |
| 107 | + link: "/pages/intermediate/iterators-enumerables", |
| 108 | + }, |
| 109 | + { |
| 110 | + text: "🚧 Unit Testing", |
| 111 | + link: "/pages/intermediate/unit-testing", |
| 112 | + }, |
| 113 | + { |
| 114 | + text: "Express vs Minimal API", |
| 115 | + link: "/pages/intermediate/express-vs-minimal-api", |
| 116 | + }, |
| 117 | + { |
| 118 | + text: "Nest.js vs Controller API", |
| 119 | + link: "/pages/intermediate/nest-vs-controller-api", |
| 120 | + }, |
| 121 | + { |
| 122 | + text: "Decorators vs Attributes", |
| 123 | + link: "/pages/intermediate/decorators-vs-attributes", |
| 124 | + }, |
80 | 125 | // { text: 'Dependency Injection', link: '/pages/intermediate/dependency-injection' }, |
81 | | - { text: 'Databases and ORMs', link: '/pages/intermediate/databases-and-orms' }, |
82 | | - ] |
| 126 | + { |
| 127 | + text: "Databases and ORMs", |
| 128 | + link: "/pages/intermediate/databases-and-orms", |
| 129 | + }, |
| 130 | + ], |
83 | 131 | }, |
84 | 132 | { |
85 | | - text: 'Advanced', |
| 133 | + text: "Advanced", |
86 | 134 | collapsed: true, |
87 | 135 | items: [ |
88 | | - { text: 'Generators and Yield', link: '/pages/advanced/generators-yield' }, |
| 136 | + { |
| 137 | + text: "Generators and Yield", |
| 138 | + link: "/pages/advanced/generators-yield", |
| 139 | + }, |
89 | 140 | // { text: 'dynamic (ExpandoObject)', link: '/pages/advanced/dynamic' }, |
90 | | - { text: 'JSON Serialization', link: '/pages/advanced/json-serialization' }, |
91 | | - { text: '🚧 Reflection', link: '/pages/advanced/reflection' }, |
92 | | - { text: '🚧 Channels', link: '/pages/advanced/channels' }, |
93 | | - { text: '🚧 Source Generation (Roslyn)', link: '/pages/advanced/source-generation-roslyn' }, |
94 | | - ] |
| 141 | + { |
| 142 | + text: "JSON Serialization", |
| 143 | + link: "/pages/advanced/json-serialization", |
| 144 | + }, |
| 145 | + { text: "🚧 Reflection", link: "/pages/advanced/reflection" }, |
| 146 | + { text: "🚧 Channels", link: "/pages/advanced/channels" }, |
| 147 | + { |
| 148 | + text: "🚧 Source Generation (Roslyn)", |
| 149 | + link: "/pages/advanced/source-generation-roslyn", |
| 150 | + }, |
| 151 | + ], |
95 | 152 | }, |
96 | 153 | { |
97 | | - text: 'Ergonomics', |
| 154 | + text: "Ergonomics", |
98 | 155 | collapsed: true, |
99 | 156 | items: [ |
100 | | - { text: 'Switch Expression', link: '/pages/bonus/switch-expression' }, |
101 | | - { text: 'Partial Classes', link: '/pages/bonus/partial-classes' }, |
102 | | - { text: '🚧 Global Using', link: '/pages/bonus/global-usings' } |
103 | | - ] |
| 157 | + { |
| 158 | + text: "Switch Expression", |
| 159 | + link: "/pages/bonus/switch-expression", |
| 160 | + }, |
| 161 | + { text: "Partial Classes", link: "/pages/bonus/partial-classes" }, |
| 162 | + { text: "🚧 Global Using", link: "/pages/bonus/global-usings" }, |
| 163 | + ], |
104 | 164 | }, |
105 | 165 | { |
106 | | - text: 'How Do I...', |
| 166 | + text: "How Do I...", |
107 | 167 | collapsed: true, |
108 | 168 | items: [ |
109 | | - { text: '🚧 Set up Formatters?', link: '/pages/how-to/code-formatting' }, |
110 | | - { text: '🚧 Interface with the Backend?', link: '/pages/how-to/openapi-bindings' }, |
111 | | - { text: '🚧 Build for Other Platforms?', link: '/pages/how-to/cross-platform-build' } |
112 | | - ] |
| 169 | + { |
| 170 | + text: "Set up Formatters?", |
| 171 | + link: "/pages/how-to/code-formatting", |
| 172 | + }, |
| 173 | + { |
| 174 | + text: "🚧 Interface with the Backend?", |
| 175 | + link: "/pages/how-to/openapi-bindings", |
| 176 | + }, |
| 177 | + { |
| 178 | + text: "🚧 Build for Other Platforms?", |
| 179 | + link: "/pages/how-to/cross-platform-build", |
| 180 | + }, |
| 181 | + ], |
113 | 182 | }, |
114 | | - ] |
115 | | - } |
| 183 | + ], |
| 184 | + }, |
116 | 185 | ], |
117 | 186 |
|
118 | 187 | socialLinks: [ |
119 | | - { icon: 'github', link: 'https://github.com/CharlieDigital/typescript-is-like-csharp' } |
120 | | - ] |
121 | | - } |
122 | | -}) |
| 188 | + { |
| 189 | + icon: "github", |
| 190 | + link: "https://github.com/CharlieDigital/typescript-is-like-csharp", |
| 191 | + }, |
| 192 | + ], |
| 193 | + }, |
| 194 | +}); |
0 commit comments