chore: Add google analytics

This commit is contained in:
ChangJoo Park(박창주) 2025-05-14 14:59:27 +09:00
parent 5c177a942b
commit a86d882f53
2 changed files with 24 additions and 0 deletions

View file

@ -1,5 +1,6 @@
import { rehypeMermaid } from "@beoe/rehype-mermaid";
import { getCache } from "@beoe/cache";
const googleAnalyticsId = 'G-FTYYK8J5MY'
const cache = await getCache();
@ -27,6 +28,25 @@ export default defineConfig({
}),
starlight({
title: "Flutter 배우기",
head: [
// Adding google analytics
{
tag: 'script',
attrs: {
src: `https://www.googletagmanager.com/gtag/js?id=${googleAnalyticsId}`,
},
},
{
tag: 'script',
content: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${googleAnalyticsId}');
`,
},
],
social: [
{
icon: "github",

View file

@ -507,6 +507,10 @@ void main() {
}
```
![fpdart code](https://raw.githubusercontent.com/SandroMaglione/fpdart/main/resources/screenshots/screenshot_fpdart.png)
[fpdart](https://pub.dev/packages/fpdart)를 이용하면 Result외에 더 다양한 함수형 프로그래밍 기능을 사용하실 수 있습니다.
## 결론
Dart의 타입 시스템과 제네릭은 타입 안전성과 코드 재사용성을 동시에 얻을 수 있게 해줍니다. 정적 타입 시스템은 컴파일 시간에 많은 오류를 잡아낼 수 있으며, 제네릭은 다양한 타입에 대해 동일한 로직을 적용할 수 있게 해줍니다.