From 08fac7564f290bed0e508876111cb442aad92ff3 Mon Sep 17 00:00:00 2001 From: junkisai Date: Tue, 8 Oct 2024 15:05:05 +0900 Subject: [PATCH 1/6] feat: Enable writing articles using MDX files --- frontend/apps/service-site/contentlayer.config.ts | 3 ++- .../apps/service-site/contents/posts/1/{en.md => en.mdx} | 0 .../apps/service-site/contents/posts/1/{ja.md => ja.mdx} | 0 .../apps/service-site/contents/posts/10/{en.md => en.mdx} | 0 .../apps/service-site/contents/posts/11/{en.md => en.mdx} | 0 .../apps/service-site/contents/posts/12/{en.md => en.mdx} | 0 .../apps/service-site/contents/posts/13/{en.md => en.mdx} | 0 .../apps/service-site/contents/posts/14/{en.md => en.mdx} | 0 .../apps/service-site/contents/posts/2/{en.md => en.mdx} | 0 .../apps/service-site/contents/posts/2/{ja.md => ja.mdx} | 0 .../apps/service-site/contents/posts/3/{en.md => en.mdx} | 0 .../apps/service-site/contents/posts/3/{ja.md => ja.mdx} | 0 .../apps/service-site/contents/posts/4/{en.md => en.mdx} | 0 .../apps/service-site/contents/posts/5/{en.md => en.mdx} | 0 .../apps/service-site/contents/posts/6/{en.md => en.mdx} | 0 .../apps/service-site/contents/posts/7/{en.md => en.mdx} | 0 .../apps/service-site/contents/posts/8/{en.md => en.mdx} | 0 .../apps/service-site/contents/posts/9/{en.md => en.mdx} | 0 .../apps/service-site/src/app/[lang]/posts/[slug]/page.tsx | 6 ++++-- frontend/apps/service-site/src/app/[lang]/posts/page.tsx | 6 ++++-- frontend/apps/service-site/src/app/posts/[slug]/page.tsx | 6 ++++-- frontend/apps/service-site/src/app/posts/page.tsx | 6 ++++-- 22 files changed, 18 insertions(+), 9 deletions(-) rename frontend/apps/service-site/contents/posts/1/{en.md => en.mdx} (100%) rename frontend/apps/service-site/contents/posts/1/{ja.md => ja.mdx} (100%) rename frontend/apps/service-site/contents/posts/10/{en.md => en.mdx} (100%) rename frontend/apps/service-site/contents/posts/11/{en.md => en.mdx} (100%) rename frontend/apps/service-site/contents/posts/12/{en.md => en.mdx} (100%) rename frontend/apps/service-site/contents/posts/13/{en.md => en.mdx} (100%) rename frontend/apps/service-site/contents/posts/14/{en.md => en.mdx} (100%) rename frontend/apps/service-site/contents/posts/2/{en.md => en.mdx} (100%) rename frontend/apps/service-site/contents/posts/2/{ja.md => ja.mdx} (100%) rename frontend/apps/service-site/contents/posts/3/{en.md => en.mdx} (100%) rename frontend/apps/service-site/contents/posts/3/{ja.md => ja.mdx} (100%) rename frontend/apps/service-site/contents/posts/4/{en.md => en.mdx} (100%) rename frontend/apps/service-site/contents/posts/5/{en.md => en.mdx} (100%) rename frontend/apps/service-site/contents/posts/6/{en.md => en.mdx} (100%) rename frontend/apps/service-site/contents/posts/7/{en.md => en.mdx} (100%) rename frontend/apps/service-site/contents/posts/8/{en.md => en.mdx} (100%) rename frontend/apps/service-site/contents/posts/9/{en.md => en.mdx} (100%) diff --git a/frontend/apps/service-site/contentlayer.config.ts b/frontend/apps/service-site/contentlayer.config.ts index 3f09eca4d..3134de9f7 100644 --- a/frontend/apps/service-site/contentlayer.config.ts +++ b/frontend/apps/service-site/contentlayer.config.ts @@ -2,7 +2,8 @@ import { defineDocumentType, makeSource } from 'contentlayer/source-files' export const Post = defineDocumentType(() => ({ name: 'Post', - filePathPattern: 'posts/*/*.md', + filePathPattern: 'posts/*/*.mdx', + contentType: 'mdx', fields: { title: { type: 'string', required: true }, date: { type: 'date', required: true }, diff --git a/frontend/apps/service-site/contents/posts/1/en.md b/frontend/apps/service-site/contents/posts/1/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/1/en.md rename to frontend/apps/service-site/contents/posts/1/en.mdx diff --git a/frontend/apps/service-site/contents/posts/1/ja.md b/frontend/apps/service-site/contents/posts/1/ja.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/1/ja.md rename to frontend/apps/service-site/contents/posts/1/ja.mdx diff --git a/frontend/apps/service-site/contents/posts/10/en.md b/frontend/apps/service-site/contents/posts/10/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/10/en.md rename to frontend/apps/service-site/contents/posts/10/en.mdx diff --git a/frontend/apps/service-site/contents/posts/11/en.md b/frontend/apps/service-site/contents/posts/11/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/11/en.md rename to frontend/apps/service-site/contents/posts/11/en.mdx diff --git a/frontend/apps/service-site/contents/posts/12/en.md b/frontend/apps/service-site/contents/posts/12/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/12/en.md rename to frontend/apps/service-site/contents/posts/12/en.mdx diff --git a/frontend/apps/service-site/contents/posts/13/en.md b/frontend/apps/service-site/contents/posts/13/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/13/en.md rename to frontend/apps/service-site/contents/posts/13/en.mdx diff --git a/frontend/apps/service-site/contents/posts/14/en.md b/frontend/apps/service-site/contents/posts/14/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/14/en.md rename to frontend/apps/service-site/contents/posts/14/en.mdx diff --git a/frontend/apps/service-site/contents/posts/2/en.md b/frontend/apps/service-site/contents/posts/2/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/2/en.md rename to frontend/apps/service-site/contents/posts/2/en.mdx diff --git a/frontend/apps/service-site/contents/posts/2/ja.md b/frontend/apps/service-site/contents/posts/2/ja.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/2/ja.md rename to frontend/apps/service-site/contents/posts/2/ja.mdx diff --git a/frontend/apps/service-site/contents/posts/3/en.md b/frontend/apps/service-site/contents/posts/3/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/3/en.md rename to frontend/apps/service-site/contents/posts/3/en.mdx diff --git a/frontend/apps/service-site/contents/posts/3/ja.md b/frontend/apps/service-site/contents/posts/3/ja.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/3/ja.md rename to frontend/apps/service-site/contents/posts/3/ja.mdx diff --git a/frontend/apps/service-site/contents/posts/4/en.md b/frontend/apps/service-site/contents/posts/4/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/4/en.md rename to frontend/apps/service-site/contents/posts/4/en.mdx diff --git a/frontend/apps/service-site/contents/posts/5/en.md b/frontend/apps/service-site/contents/posts/5/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/5/en.md rename to frontend/apps/service-site/contents/posts/5/en.mdx diff --git a/frontend/apps/service-site/contents/posts/6/en.md b/frontend/apps/service-site/contents/posts/6/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/6/en.md rename to frontend/apps/service-site/contents/posts/6/en.mdx diff --git a/frontend/apps/service-site/contents/posts/7/en.md b/frontend/apps/service-site/contents/posts/7/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/7/en.md rename to frontend/apps/service-site/contents/posts/7/en.mdx diff --git a/frontend/apps/service-site/contents/posts/8/en.md b/frontend/apps/service-site/contents/posts/8/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/8/en.md rename to frontend/apps/service-site/contents/posts/8/en.mdx diff --git a/frontend/apps/service-site/contents/posts/9/en.md b/frontend/apps/service-site/contents/posts/9/en.mdx similarity index 100% rename from frontend/apps/service-site/contents/posts/9/en.md rename to frontend/apps/service-site/contents/posts/9/en.mdx diff --git a/frontend/apps/service-site/src/app/[lang]/posts/[slug]/page.tsx b/frontend/apps/service-site/src/app/[lang]/posts/[slug]/page.tsx index 74a9623b1..ef4130fd1 100644 --- a/frontend/apps/service-site/src/app/[lang]/posts/[slug]/page.tsx +++ b/frontend/apps/service-site/src/app/[lang]/posts/[slug]/page.tsx @@ -3,6 +3,7 @@ import { langSchema, langs } from '@/features/i18n' import { findPostByLangAndSlug } from '@/features/posts' import { allPosts } from 'contentlayer/generated' import { format, parseISO } from 'date-fns' +import { useMDXComponent } from 'next-contentlayer/hooks' import { notFound } from 'next/navigation' import { object, parse, string } from 'valibot' @@ -32,6 +33,8 @@ export default function Page({ params }: PageProps) { const post = findPostByLangAndSlug({ lang, slug }) if (!post) notFound() + const MDXContent = useMDXComponent(post.body.code) + return (
@@ -40,8 +43,7 @@ export default function Page({ params }: PageProps) {

{post.title}

- {/* biome-ignore lint/security/noDangerouslySetInnerHtml: */} -
+
) } diff --git a/frontend/apps/service-site/src/app/[lang]/posts/page.tsx b/frontend/apps/service-site/src/app/[lang]/posts/page.tsx index 3faa4df0a..e24fa9ff3 100644 --- a/frontend/apps/service-site/src/app/[lang]/posts/page.tsx +++ b/frontend/apps/service-site/src/app/[lang]/posts/page.tsx @@ -3,10 +3,13 @@ import { getTranslation, langSchema, langs } from '@/features/i18n' import { filterPostsByLang } from '@/features/posts' import type { Post } from 'contentlayer/generated' import { compareDesc, format, parseISO } from 'date-fns' +import { useMDXComponent } from 'next-contentlayer/hooks' import Link from 'next/link' import { object, parse } from 'valibot' function PostCard(post: Post) { + const MDXContent = useMDXComponent(post.body.code) + return (

@@ -15,8 +18,7 @@ function PostCard(post: Post) { - {/* biome-ignore lint/security/noDangerouslySetInnerHtml: No problem, as it is only via Markdown written by in-house members. */} -
+
) } diff --git a/frontend/apps/service-site/src/app/posts/[slug]/page.tsx b/frontend/apps/service-site/src/app/posts/[slug]/page.tsx index 72879a88d..0aef62960 100644 --- a/frontend/apps/service-site/src/app/posts/[slug]/page.tsx +++ b/frontend/apps/service-site/src/app/posts/[slug]/page.tsx @@ -3,6 +3,7 @@ import { fallbackLang } from '@/features/i18n' import { findPostByLangAndSlug } from '@/features/posts' import { allPosts } from 'contentlayer/generated' import { format, parseISO } from 'date-fns' +import { useMDXComponent } from 'next-contentlayer/hooks' import { notFound } from 'next/navigation' import { object, parse, string } from 'valibot' @@ -28,6 +29,8 @@ export default function Page({ params }: PageProps) { const post = findPostByLangAndSlug({ lang: fallbackLang, slug }) if (!post) notFound() + const MDXContent = useMDXComponent(post.body.code) + return (
@@ -36,8 +39,7 @@ export default function Page({ params }: PageProps) {

{post.title}

- {/* biome-ignore lint/security/noDangerouslySetInnerHtml: */} -
+
) } diff --git a/frontend/apps/service-site/src/app/posts/page.tsx b/frontend/apps/service-site/src/app/posts/page.tsx index c143cdfad..5d355018e 100644 --- a/frontend/apps/service-site/src/app/posts/page.tsx +++ b/frontend/apps/service-site/src/app/posts/page.tsx @@ -2,9 +2,12 @@ import { fallbackLang, getTranslation } from '@/features/i18n' import { filterPostsByLang } from '@/features/posts' import type { Post } from 'contentlayer/generated' import { compareDesc, format, parseISO } from 'date-fns' +import { useMDXComponent } from 'next-contentlayer/hooks' import Link from 'next/link' function PostCard(post: Post) { + const MDXContent = useMDXComponent(post.body.code) + return (

@@ -13,8 +16,7 @@ function PostCard(post: Post) { - {/* biome-ignore lint/security/noDangerouslySetInnerHtml: No problem, as it is only via Markdown written by in-house members. */} -
+
) } From 99638e3310871bf7b95ca322c29ca8622c753581 Mon Sep 17 00:00:00 2001 From: junkisai Date: Tue, 8 Oct 2024 18:20:34 +0900 Subject: [PATCH 2/6] feat: Add mdx-components package --- frontend/packages/mdx-components/.gitignore | 5 +++ frontend/packages/mdx-components/package.json | 35 +++++++++++++++++++ .../src/Callout/Callout.module.css | 11 ++++++ .../mdx-components/src/Callout/Callout.tsx | 22 ++++++++++++ .../mdx-components/src/Callout/index.ts | 1 + .../mdx-components/src/MDXContent.tsx | 18 ++++++++++ frontend/packages/mdx-components/src/index.ts | 1 + .../packages/mdx-components/tsconfig.json | 22 ++++++++++++ 8 files changed, 115 insertions(+) create mode 100644 frontend/packages/mdx-components/.gitignore create mode 100644 frontend/packages/mdx-components/package.json create mode 100644 frontend/packages/mdx-components/src/Callout/Callout.module.css create mode 100644 frontend/packages/mdx-components/src/Callout/Callout.tsx create mode 100644 frontend/packages/mdx-components/src/Callout/index.ts create mode 100644 frontend/packages/mdx-components/src/MDXContent.tsx create mode 100644 frontend/packages/mdx-components/src/index.ts create mode 100644 frontend/packages/mdx-components/tsconfig.json diff --git a/frontend/packages/mdx-components/.gitignore b/frontend/packages/mdx-components/.gitignore new file mode 100644 index 000000000..750a3e623 --- /dev/null +++ b/frontend/packages/mdx-components/.gitignore @@ -0,0 +1,5 @@ +# build +dist + +# typed-css-modules +*.css.d.ts \ No newline at end of file diff --git a/frontend/packages/mdx-components/package.json b/frontend/packages/mdx-components/package.json new file mode 100644 index 000000000..7289c6d88 --- /dev/null +++ b/frontend/packages/mdx-components/package.json @@ -0,0 +1,35 @@ +{ + "name": "@packages/mdx-components", + "version": "0.0.1", + "private": true, + "type": "module", + "files": [ + "src" + ], + "main": "./src/index.ts", + "scripts": { + "dev": "conc -c auto pnpm:dev:*", + "dev:css": "tcm src --watch", + "lint": "conc -c auto pnpm:lint:*", + "lint:biome": "biome check .", + "lint:tsc": "tsc --noEmit", + "fmt": "conc -c auto pnpm:fmt:*", + "fmt:biome": "biome check --write --unsafe ." + }, + "dependencies": { + "clsx": "^2.1.1", + "next-contentlayer": "^0.3.4", + "react": "^18", + "react-dom": "^18" + }, + "devDependencies": { + "@biomejs/biome": "1.9.3", + "@packages/biome-config": "workspace:*", + "@types/mdx": "^2.0.13", + "@types/react": "^18", + "@types/react-dom": "^18", + "concurrently": "^9.0.1", + "typed-css-modules": "^0.9.1", + "typescript": "^5" + } +} diff --git a/frontend/packages/mdx-components/src/Callout/Callout.module.css b/frontend/packages/mdx-components/src/Callout/Callout.module.css new file mode 100644 index 000000000..d03dc3bd4 --- /dev/null +++ b/frontend/packages/mdx-components/src/Callout/Callout.module.css @@ -0,0 +1,11 @@ +.wrapper { + width: 100%; + padding: var(--spacing-4, 1rem); + color: var(--s-callout-s-default-text, #bebfc1); + background: var(--s-callout-s-default-background, rgba(255, 255, 255, 0.05)); +} + +.danger { + color: var(--s-callout-s-danger-text, #ea928e); + background: var(--s-callout-s-danger-background, rgba(247, 80, 73, 0.1)); +} diff --git a/frontend/packages/mdx-components/src/Callout/Callout.tsx b/frontend/packages/mdx-components/src/Callout/Callout.tsx new file mode 100644 index 000000000..80128c05e --- /dev/null +++ b/frontend/packages/mdx-components/src/Callout/Callout.tsx @@ -0,0 +1,22 @@ +import clsx from 'clsx' +import type { FC, PropsWithChildren } from 'react' +import styles from './Callout.module.css' + +type Props = { + type?: 'default' | 'danger' +} + +export const Callout: FC> = ({ + type = 'default', + children, +}) => { + return ( +
+ {children} +
+ ) +} diff --git a/frontend/packages/mdx-components/src/Callout/index.ts b/frontend/packages/mdx-components/src/Callout/index.ts new file mode 100644 index 000000000..f8269f529 --- /dev/null +++ b/frontend/packages/mdx-components/src/Callout/index.ts @@ -0,0 +1 @@ +export * from './Callout' diff --git a/frontend/packages/mdx-components/src/MDXContent.tsx b/frontend/packages/mdx-components/src/MDXContent.tsx new file mode 100644 index 000000000..1ad0f2fc4 --- /dev/null +++ b/frontend/packages/mdx-components/src/MDXContent.tsx @@ -0,0 +1,18 @@ +import type { MDXComponents } from 'mdx/types' +import { useMDXComponent } from 'next-contentlayer/hooks' +import type { FC } from 'react' +import { Callout } from './Callout' + +const mdxComponents: MDXComponents = { + Callout: (props) => , +} + +type Props = { + code: string +} + +export const MDXContent: FC = ({ code }) => { + const Content = useMDXComponent(code) + + return +} diff --git a/frontend/packages/mdx-components/src/index.ts b/frontend/packages/mdx-components/src/index.ts new file mode 100644 index 000000000..67d2c1245 --- /dev/null +++ b/frontend/packages/mdx-components/src/index.ts @@ -0,0 +1 @@ +export * from './MDXContent' diff --git a/frontend/packages/mdx-components/tsconfig.json b/frontend/packages/mdx-components/tsconfig.json new file mode 100644 index 000000000..edbaac772 --- /dev/null +++ b/frontend/packages/mdx-components/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["src/**/*"], + "exclude": ["node_modules"] +} From ba4829a57079946b6397167c5952c4436948910d Mon Sep 17 00:00:00 2001 From: junkisai Date: Tue, 8 Oct 2024 18:21:40 +0900 Subject: [PATCH 3/6] feat: Enable calling mdx-components in MDX files --- frontend/apps/service-site/.eslintrc.json | 16 +- .../apps/service-site/contents/posts/2/en.mdx | 14 +- frontend/apps/service-site/package.json | 1 + .../src/app/[lang]/posts/[slug]/page.tsx | 6 +- .../src/app/[lang]/posts/page.tsx | 6 +- .../src/app/posts/[slug]/page.tsx | 7 +- .../apps/service-site/src/app/posts/page.tsx | 6 +- frontend/package.json | 7 +- frontend/packages/mdx-components/package.json | 2 +- frontend/pnpm-lock.yaml | 467 +++++++++++++++++- 10 files changed, 510 insertions(+), 22 deletions(-) diff --git a/frontend/apps/service-site/.eslintrc.json b/frontend/apps/service-site/.eslintrc.json index 372241854..3b1630efa 100644 --- a/frontend/apps/service-site/.eslintrc.json +++ b/frontend/apps/service-site/.eslintrc.json @@ -1,3 +1,17 @@ { - "extends": ["next/core-web-vitals", "next/typescript"] + "extends": ["next/core-web-vitals", "next/typescript"], + "rules": { + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "next-contentlayer/hooks", + "importNames": ["useMDXComponent"], + "message": "Please use `import { MDXContent } from \"@packages/mdx-components\"`" + } + ] + } + ] + } } diff --git a/frontend/apps/service-site/contents/posts/2/en.mdx b/frontend/apps/service-site/contents/posts/2/en.mdx index 77c5af9e9..cc8717e21 100644 --- a/frontend/apps/service-site/contents/posts/2/en.mdx +++ b/frontend/apps/service-site/contents/posts/2/en.mdx @@ -1,5 +1,5 @@ --- -title: '5 Best Practices for Successful No-Code App Development' +title: "5 Best Practices for Successful No-Code App Development" date: 2024-09-26 tags: - Vision @@ -32,3 +32,15 @@ A no-code platform provides a user-friendly interface where developers, or even As the capabilities of no-code platforms continue to expand, more complex applications can be built without needing to write a single line of code. AI integration and automation are the next frontiers in no-code development, offering even more opportunities for innovation. The no-code movement is democratizing the app development process, empowering more people to participate in creating the future of software. As these platforms evolve, they will continue to blur the line between developer and non-developer, making app development accessible to everyone. + + + No-code platforms are breaking down the barriers to innovation, allowing + anyone with an idea to bring it to life without needing to write a single line + of code. + + + + No-code platforms are breaking down the barriers to innovation, allowing + anyone with an idea to bring it to life without needing to write a single line + of code. + diff --git a/frontend/apps/service-site/package.json b/frontend/apps/service-site/package.json index 967a6367e..f25338a32 100644 --- a/frontend/apps/service-site/package.json +++ b/frontend/apps/service-site/package.json @@ -33,6 +33,7 @@ "devDependencies": { "@biomejs/biome": "1.9.3", "@packages/configs": "workspace:*", + "@packages/mdx-components": "workspace:*", "@storybook/nextjs": "^8.3.4", "@storybook/react": "^8.3.4", "@types/node": "^20", diff --git a/frontend/apps/service-site/src/app/[lang]/posts/[slug]/page.tsx b/frontend/apps/service-site/src/app/[lang]/posts/[slug]/page.tsx index ef4130fd1..57e170994 100644 --- a/frontend/apps/service-site/src/app/[lang]/posts/[slug]/page.tsx +++ b/frontend/apps/service-site/src/app/[lang]/posts/[slug]/page.tsx @@ -1,9 +1,9 @@ import type { PageProps } from '@/app/types' import { langSchema, langs } from '@/features/i18n' import { findPostByLangAndSlug } from '@/features/posts' +import { MDXContent } from '@packages/mdx-components' import { allPosts } from 'contentlayer/generated' import { format, parseISO } from 'date-fns' -import { useMDXComponent } from 'next-contentlayer/hooks' import { notFound } from 'next/navigation' import { object, parse, string } from 'valibot' @@ -33,8 +33,6 @@ export default function Page({ params }: PageProps) { const post = findPostByLangAndSlug({ lang, slug }) if (!post) notFound() - const MDXContent = useMDXComponent(post.body.code) - return (
@@ -43,7 +41,7 @@ export default function Page({ params }: PageProps) {

{post.title}

- +
) } diff --git a/frontend/apps/service-site/src/app/[lang]/posts/page.tsx b/frontend/apps/service-site/src/app/[lang]/posts/page.tsx index e24fa9ff3..4d6f899a1 100644 --- a/frontend/apps/service-site/src/app/[lang]/posts/page.tsx +++ b/frontend/apps/service-site/src/app/[lang]/posts/page.tsx @@ -1,15 +1,13 @@ import type { PageProps } from '@/app/types' import { getTranslation, langSchema, langs } from '@/features/i18n' import { filterPostsByLang } from '@/features/posts' +import { MDXContent } from '@packages/mdx-components' import type { Post } from 'contentlayer/generated' import { compareDesc, format, parseISO } from 'date-fns' -import { useMDXComponent } from 'next-contentlayer/hooks' import Link from 'next/link' import { object, parse } from 'valibot' function PostCard(post: Post) { - const MDXContent = useMDXComponent(post.body.code) - return (

@@ -18,7 +16,7 @@ function PostCard(post: Post) { - +

) } diff --git a/frontend/apps/service-site/src/app/posts/[slug]/page.tsx b/frontend/apps/service-site/src/app/posts/[slug]/page.tsx index 0aef62960..4bc275e82 100644 --- a/frontend/apps/service-site/src/app/posts/[slug]/page.tsx +++ b/frontend/apps/service-site/src/app/posts/[slug]/page.tsx @@ -1,9 +1,9 @@ import type { PageProps } from '@/app/types' import { fallbackLang } from '@/features/i18n' import { findPostByLangAndSlug } from '@/features/posts' +import { MDXContent } from '@packages/mdx-components' import { allPosts } from 'contentlayer/generated' import { format, parseISO } from 'date-fns' -import { useMDXComponent } from 'next-contentlayer/hooks' import { notFound } from 'next/navigation' import { object, parse, string } from 'valibot' @@ -29,17 +29,16 @@ export default function Page({ params }: PageProps) { const post = findPostByLangAndSlug({ lang: fallbackLang, slug }) if (!post) notFound() - const MDXContent = useMDXComponent(post.body.code) - return (
+ {/* */}

{post.title}

- +
) } diff --git a/frontend/apps/service-site/src/app/posts/page.tsx b/frontend/apps/service-site/src/app/posts/page.tsx index 5d355018e..daf0b54d5 100644 --- a/frontend/apps/service-site/src/app/posts/page.tsx +++ b/frontend/apps/service-site/src/app/posts/page.tsx @@ -1,13 +1,11 @@ import { fallbackLang, getTranslation } from '@/features/i18n' import { filterPostsByLang } from '@/features/posts' +import { MDXContent } from '@packages/mdx-components' import type { Post } from 'contentlayer/generated' import { compareDesc, format, parseISO } from 'date-fns' -import { useMDXComponent } from 'next-contentlayer/hooks' import Link from 'next/link' function PostCard(post: Post) { - const MDXContent = useMDXComponent(post.body.code) - return (

@@ -16,7 +14,7 @@ function PostCard(post: Post) { - +

) } diff --git a/frontend/package.json b/frontend/package.json index 54614a814..b948be635 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -3,15 +3,18 @@ "version": "0.0.1", "private": true, "scripts": { - "dev": "pnpm -F \"service-site\" dev", + "dev": "conc -c auto pnpm:dev:*", + "dev:service-site": "pnpm -F 'service-site' dev", + "dev:mdx-components": "pnpm -F 'mdx-components' dev", "lint:packageVersion": "syncpack list-mismatches", "service-site": "pnpm -F \"service-site\"", "gen:turbo": "turbo gen" }, "packageManager": "pnpm@9.11.0+sha512.0a203ffaed5a3f63242cd064c8fb5892366c103e328079318f78062f24ea8c9d50bc6a47aa3567cabefd824d170e78fa2745ed1f16b132e16436146b7688f19b", "devDependencies": { + "concurrently": "^9.0.1", "syncpack": "^13.0.0", "turbo": "^2.1.2", "@turbo/gen": "^2.1.2" } -} \ No newline at end of file +} diff --git a/frontend/packages/mdx-components/package.json b/frontend/packages/mdx-components/package.json index 7289c6d88..4c4be1515 100644 --- a/frontend/packages/mdx-components/package.json +++ b/frontend/packages/mdx-components/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@biomejs/biome": "1.9.3", - "@packages/biome-config": "workspace:*", + "@packages/configs": "workspace:*", "@types/mdx": "^2.0.13", "@types/react": "^18", "@types/react-dom": "^18", diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index e16af4c98..892e56966 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@turbo/gen': specifier: ^2.1.2 version: 2.1.3(@types/node@22.7.4)(typescript@5.6.2) + concurrently: + specifier: ^9.0.1 + version: 9.0.1 syncpack: specifier: ^13.0.0 version: 13.0.0(typescript@5.6.2) @@ -63,6 +66,9 @@ importers: '@packages/configs': specifier: workspace:* version: link:../../packages/configs + '@packages/mdx-components': + specifier: workspace:* + version: link:../../packages/mdx-components '@storybook/nextjs': specifier: ^8.3.4 version: 8.3.4(esbuild@0.18.20)(next@14.2.13(@babel/core@7.25.2)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.3.4)(type-fest@3.13.1)(typescript@5.6.2)(webpack-hot-middleware@2.26.1)(webpack@5.95.0(esbuild@0.18.20)) @@ -100,7 +106,45 @@ importers: specifier: 1.9.3 version: 1.9.3 - packages/ui: {} + packages/mdx-components: + dependencies: + clsx: + specifier: ^2.1.1 + version: 2.1.1 + next-contentlayer: + specifier: ^0.3.4 + version: 0.3.4(contentlayer@0.3.4(esbuild@0.21.5))(esbuild@0.21.5)(next@14.2.13(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: + specifier: ^18 + version: 18.3.1 + react-dom: + specifier: ^18 + version: 18.3.1(react@18.3.1) + devDependencies: + '@biomejs/biome': + specifier: 1.9.3 + version: 1.9.3 + '@packages/configs': + specifier: workspace:* + version: link:../configs + '@types/mdx': + specifier: ^2.0.13 + version: 2.0.13 + '@types/react': + specifier: ^18 + version: 18.3.10 + '@types/react-dom': + specifier: ^18 + version: 18.3.0 + concurrently: + specifier: ^9.0.1 + version: 9.0.1 + typed-css-modules: + specifier: ^0.9.1 + version: 0.9.1 + typescript: + specifier: ^5 + version: 5.6.2 packages: @@ -888,138 +932,276 @@ packages: peerDependencies: esbuild: '*' + '@esbuild/aix-ppc64@0.21.5': + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.18.20': resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.21.5': + resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.18.20': resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} engines: {node: '>=12'} cpu: [arm] os: [android] + '@esbuild/android-arm@0.21.5': + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.18.20': resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} engines: {node: '>=12'} cpu: [x64] os: [android] + '@esbuild/android-x64@0.21.5': + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.18.20': resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.21.5': + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.18.20': resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} engines: {node: '>=12'} cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.21.5': + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.18.20': resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.21.5': + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.18.20': resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.21.5': + resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.18.20': resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.21.5': + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.18.20': resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} engines: {node: '>=12'} cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.21.5': + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.18.20': resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.21.5': + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.18.20': resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.21.5': + resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.18.20': resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.21.5': + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.18.20': resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.21.5': + resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.18.20': resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.21.5': + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.18.20': resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.21.5': + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.18.20': resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} engines: {node: '>=12'} cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.21.5': + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + '@esbuild/netbsd-x64@0.18.20': resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.21.5': + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + '@esbuild/openbsd-x64@0.18.20': resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.21.5': + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + '@esbuild/sunos-x64@0.18.20': resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.21.5': + resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.18.20': resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.21.5': + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.18.20': resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} engines: {node: '>=12'} cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.21.5': + resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.18.20': resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} engines: {node: '>=12'} cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.4.0': resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2244,6 +2426,10 @@ packages: camel-case@4.1.2: resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + caniuse-lite@1.0.30001666: resolution: {integrity: sha512-gD14ICmoV5ZZM1OdzPWmpx+q4GyefaK06zi8hmfHV5xe4/2nOQX3+Dw5o+fSqOws2xVwL9j+anOPFwHzdEdV4g==} @@ -2354,6 +2540,10 @@ packages: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} @@ -2805,6 +2995,11 @@ packages: engines: {node: '>=12'} hasBin: true + esbuild@0.21.5: + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} + engines: {node: '>=12'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -3382,6 +3577,9 @@ packages: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} + icss-replace-symbols@1.1.0: + resolution: {integrity: sha512-chIaY3Vh2mh2Q3RGXttaDIzeiPvaVXJ+C4DAh/w3c37SKZ/U6PGMmuicR2EQQp9bKG8zLMCl7I+PtIoOOPp8Gg==} + icss-utils@5.1.0: resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} engines: {node: ^10 || ^12 || >= 14} @@ -3623,6 +3821,9 @@ packages: resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} engines: {node: '>= 0.4'} + is-there@4.5.1: + resolution: {integrity: sha512-vIZ7HTXAoRoIwYSsTnxb0sg9L6rth+JOulNcavsbskQkCIWoSM2cjFOWZs4wGziGZER+Xgs/HXiCQZgiL8ppxQ==} + is-typed-array@1.1.13: resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} engines: {node: '>= 0.4'} @@ -4206,6 +4407,11 @@ packages: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true + mkdirp@3.0.1: + resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} + engines: {node: '>=10'} + hasBin: true + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -5463,6 +5669,11 @@ packages: resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} engines: {node: '>= 0.4'} + typed-css-modules@0.9.1: + resolution: {integrity: sha512-W2HWKncdKd+bLWsnuWB2EyuQBzZ7KJ9Byr/67KLiiyGegcN52rOveun9JR8yAvuL5IXunRMxt0eORMtAUj5bmA==} + engines: {node: '>=18.0.0'} + hasBin: true + typescript@5.6.2: resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} @@ -6690,6 +6901,18 @@ snapshots: - markdown-wasm - supports-color + '@contentlayer/cli@0.3.4(esbuild@0.21.5)': + dependencies: + '@contentlayer/core': 0.3.4(esbuild@0.21.5) + '@contentlayer/utils': 0.3.4 + clipanion: 3.2.1(typanion@3.14.0) + typanion: 3.14.0 + transitivePeerDependencies: + - '@effect-ts/otel-node' + - esbuild + - markdown-wasm + - supports-color + '@contentlayer/client@0.3.4(esbuild@0.18.20)': dependencies: '@contentlayer/core': 0.3.4(esbuild@0.18.20) @@ -6699,6 +6922,15 @@ snapshots: - markdown-wasm - supports-color + '@contentlayer/client@0.3.4(esbuild@0.21.5)': + dependencies: + '@contentlayer/core': 0.3.4(esbuild@0.21.5) + transitivePeerDependencies: + - '@effect-ts/otel-node' + - esbuild + - markdown-wasm + - supports-color + '@contentlayer/core@0.3.4(esbuild@0.18.20)': dependencies: '@contentlayer/utils': 0.3.4 @@ -6719,6 +6951,26 @@ snapshots: - '@effect-ts/otel-node' - supports-color + '@contentlayer/core@0.3.4(esbuild@0.21.5)': + dependencies: + '@contentlayer/utils': 0.3.4 + camel-case: 4.1.2 + comment-json: 4.2.5 + gray-matter: 4.0.3 + mdx-bundler: 9.2.1(esbuild@0.21.5) + rehype-stringify: 9.0.4 + remark-frontmatter: 4.0.1 + remark-parse: 10.0.2 + remark-rehype: 10.1.0 + source-map-support: 0.5.21 + type-fest: 3.13.1 + unified: 10.1.2 + optionalDependencies: + esbuild: 0.21.5 + transitivePeerDependencies: + - '@effect-ts/otel-node' + - supports-color + '@contentlayer/source-files@0.3.4(esbuild@0.18.20)': dependencies: '@contentlayer/core': 0.3.4(esbuild@0.18.20) @@ -6738,6 +6990,25 @@ snapshots: - markdown-wasm - supports-color + '@contentlayer/source-files@0.3.4(esbuild@0.21.5)': + dependencies: + '@contentlayer/core': 0.3.4(esbuild@0.21.5) + '@contentlayer/utils': 0.3.4 + chokidar: 3.6.0 + fast-glob: 3.3.2 + gray-matter: 4.0.3 + imagescript: 1.3.0 + micromatch: 4.0.8 + ts-pattern: 4.3.0 + unified: 10.1.2 + yaml: 2.5.1 + zod: 3.23.8 + transitivePeerDependencies: + - '@effect-ts/otel-node' + - esbuild + - markdown-wasm + - supports-color + '@contentlayer/source-remote-files@0.3.4(esbuild@0.18.20)': dependencies: '@contentlayer/core': 0.3.4(esbuild@0.18.20) @@ -6749,6 +7020,17 @@ snapshots: - markdown-wasm - supports-color + '@contentlayer/source-remote-files@0.3.4(esbuild@0.21.5)': + dependencies: + '@contentlayer/core': 0.3.4(esbuild@0.21.5) + '@contentlayer/source-files': 0.3.4(esbuild@0.21.5) + '@contentlayer/utils': 0.3.4 + transitivePeerDependencies: + - '@effect-ts/otel-node' + - esbuild + - markdown-wasm + - supports-color + '@contentlayer/utils@0.3.4': dependencies: '@effect-ts/core': 0.60.5 @@ -6826,72 +7108,151 @@ snapshots: transitivePeerDependencies: - supports-color + '@esbuild-plugins/node-resolve@0.1.4(esbuild@0.21.5)': + dependencies: + '@types/resolve': 1.20.6 + debug: 4.3.7 + esbuild: 0.21.5 + escape-string-regexp: 4.0.0 + resolve: 1.22.8 + transitivePeerDependencies: + - supports-color + + '@esbuild/aix-ppc64@0.21.5': + optional: true + '@esbuild/android-arm64@0.18.20': optional: true + '@esbuild/android-arm64@0.21.5': + optional: true + '@esbuild/android-arm@0.18.20': optional: true + '@esbuild/android-arm@0.21.5': + optional: true + '@esbuild/android-x64@0.18.20': optional: true + '@esbuild/android-x64@0.21.5': + optional: true + '@esbuild/darwin-arm64@0.18.20': optional: true + '@esbuild/darwin-arm64@0.21.5': + optional: true + '@esbuild/darwin-x64@0.18.20': optional: true + '@esbuild/darwin-x64@0.21.5': + optional: true + '@esbuild/freebsd-arm64@0.18.20': optional: true + '@esbuild/freebsd-arm64@0.21.5': + optional: true + '@esbuild/freebsd-x64@0.18.20': optional: true + '@esbuild/freebsd-x64@0.21.5': + optional: true + '@esbuild/linux-arm64@0.18.20': optional: true + '@esbuild/linux-arm64@0.21.5': + optional: true + '@esbuild/linux-arm@0.18.20': optional: true + '@esbuild/linux-arm@0.21.5': + optional: true + '@esbuild/linux-ia32@0.18.20': optional: true + '@esbuild/linux-ia32@0.21.5': + optional: true + '@esbuild/linux-loong64@0.18.20': optional: true + '@esbuild/linux-loong64@0.21.5': + optional: true + '@esbuild/linux-mips64el@0.18.20': optional: true + '@esbuild/linux-mips64el@0.21.5': + optional: true + '@esbuild/linux-ppc64@0.18.20': optional: true + '@esbuild/linux-ppc64@0.21.5': + optional: true + '@esbuild/linux-riscv64@0.18.20': optional: true + '@esbuild/linux-riscv64@0.21.5': + optional: true + '@esbuild/linux-s390x@0.18.20': optional: true + '@esbuild/linux-s390x@0.21.5': + optional: true + '@esbuild/linux-x64@0.18.20': optional: true + '@esbuild/linux-x64@0.21.5': + optional: true + '@esbuild/netbsd-x64@0.18.20': optional: true + '@esbuild/netbsd-x64@0.21.5': + optional: true + '@esbuild/openbsd-x64@0.18.20': optional: true + '@esbuild/openbsd-x64@0.21.5': + optional: true + '@esbuild/sunos-x64@0.18.20': optional: true + '@esbuild/sunos-x64@0.21.5': + optional: true + '@esbuild/win32-arm64@0.18.20': optional: true + '@esbuild/win32-arm64@0.21.5': + optional: true + '@esbuild/win32-ia32@0.18.20': optional: true + '@esbuild/win32-ia32@0.21.5': + optional: true + '@esbuild/win32-x64@0.18.20': optional: true + '@esbuild/win32-x64@0.21.5': + optional: true + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': dependencies: eslint: 8.57.1 @@ -7068,6 +7429,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@mdx-js/esbuild@2.3.0(esbuild@0.21.5)': + dependencies: + '@mdx-js/mdx': 2.3.0 + esbuild: 0.21.5 + node-fetch: 3.3.2 + vfile: 5.3.7 + transitivePeerDependencies: + - supports-color + '@mdx-js/mdx@2.3.0': dependencies: '@types/estree-jsx': 1.0.5 @@ -8401,6 +8771,8 @@ snapshots: pascal-case: 3.1.2 tslib: 2.7.0 + camelcase@6.3.0: {} + caniuse-lite@1.0.30001666: {} case-sensitive-paths-webpack-plugin@2.4.0: {} @@ -8523,6 +8895,8 @@ snapshots: clone@1.0.4: {} + clsx@2.1.1: {} + color-convert@1.9.3: dependencies: color-name: 1.1.3 @@ -8612,6 +8986,20 @@ snapshots: - markdown-wasm - supports-color + contentlayer@0.3.4(esbuild@0.21.5): + dependencies: + '@contentlayer/cli': 0.3.4(esbuild@0.21.5) + '@contentlayer/client': 0.3.4(esbuild@0.21.5) + '@contentlayer/core': 0.3.4(esbuild@0.21.5) + '@contentlayer/source-files': 0.3.4(esbuild@0.21.5) + '@contentlayer/source-remote-files': 0.3.4(esbuild@0.21.5) + '@contentlayer/utils': 0.3.4 + transitivePeerDependencies: + - '@effect-ts/otel-node' + - esbuild + - markdown-wasm + - supports-color + convert-source-map@1.9.0: {} convert-source-map@2.0.0: {} @@ -9101,6 +9489,32 @@ snapshots: '@esbuild/win32-ia32': 0.18.20 '@esbuild/win32-x64': 0.18.20 + esbuild@0.21.5: + optionalDependencies: + '@esbuild/aix-ppc64': 0.21.5 + '@esbuild/android-arm': 0.21.5 + '@esbuild/android-arm64': 0.21.5 + '@esbuild/android-x64': 0.21.5 + '@esbuild/darwin-arm64': 0.21.5 + '@esbuild/darwin-x64': 0.21.5 + '@esbuild/freebsd-arm64': 0.21.5 + '@esbuild/freebsd-x64': 0.21.5 + '@esbuild/linux-arm': 0.21.5 + '@esbuild/linux-arm64': 0.21.5 + '@esbuild/linux-ia32': 0.21.5 + '@esbuild/linux-loong64': 0.21.5 + '@esbuild/linux-mips64el': 0.21.5 + '@esbuild/linux-ppc64': 0.21.5 + '@esbuild/linux-riscv64': 0.21.5 + '@esbuild/linux-s390x': 0.21.5 + '@esbuild/linux-x64': 0.21.5 + '@esbuild/netbsd-x64': 0.21.5 + '@esbuild/openbsd-x64': 0.21.5 + '@esbuild/sunos-x64': 0.21.5 + '@esbuild/win32-arm64': 0.21.5 + '@esbuild/win32-ia32': 0.21.5 + '@esbuild/win32-x64': 0.21.5 + escalade@3.2.0: {} escape-html@1.0.3: {} @@ -9920,6 +10334,8 @@ snapshots: dependencies: safer-buffer: 2.1.2 + icss-replace-symbols@1.1.0: {} + icss-utils@5.1.0(postcss@8.4.47): dependencies: postcss: 8.4.47 @@ -10144,6 +10560,8 @@ snapshots: dependencies: has-symbols: 1.0.3 + is-there@4.5.1: {} + is-typed-array@1.1.13: dependencies: which-typed-array: 1.1.15 @@ -10611,6 +11029,21 @@ snapshots: transitivePeerDependencies: - supports-color + mdx-bundler@9.2.1(esbuild@0.21.5): + dependencies: + '@babel/runtime': 7.25.6 + '@esbuild-plugins/node-resolve': 0.1.4(esbuild@0.21.5) + '@fal-works/esbuild-plugin-global-externals': 2.1.2 + '@mdx-js/esbuild': 2.3.0(esbuild@0.21.5) + esbuild: 0.21.5 + gray-matter: 4.0.3 + remark-frontmatter: 4.0.1 + remark-mdx-frontmatter: 1.1.1 + uuid: 8.3.2 + vfile: 5.3.7 + transitivePeerDependencies: + - supports-color + media-typer@0.3.0: {} memfs@3.5.3: @@ -11071,6 +11504,8 @@ snapshots: dependencies: minimist: 1.2.8 + mkdirp@3.0.1: {} + mri@1.2.0: {} ms@2.0.0: {} @@ -11103,6 +11538,20 @@ snapshots: - markdown-wasm - supports-color + next-contentlayer@0.3.4(contentlayer@0.3.4(esbuild@0.21.5))(esbuild@0.21.5)(next@14.2.13(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + '@contentlayer/core': 0.3.4(esbuild@0.21.5) + '@contentlayer/utils': 0.3.4 + contentlayer: 0.3.4(esbuild@0.21.5) + next: 14.2.13(@babel/core@7.25.2)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + transitivePeerDependencies: + - '@effect-ts/otel-node' + - esbuild + - markdown-wasm + - supports-color + next@14.2.13(@babel/core@7.25.2)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 14.2.13 @@ -12567,6 +13016,22 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 + typed-css-modules@0.9.1: + dependencies: + camelcase: 6.3.0 + chalk: 4.1.2 + chokidar: 3.6.0 + glob: 10.3.10 + icss-replace-symbols: 1.1.0 + is-there: 4.5.1 + mkdirp: 3.0.1 + postcss: 8.4.47 + postcss-modules-extract-imports: 3.1.0(postcss@8.4.47) + postcss-modules-local-by-default: 4.0.5(postcss@8.4.47) + postcss-modules-scope: 3.2.0(postcss@8.4.47) + postcss-modules-values: 4.0.0(postcss@8.4.47) + yargs: 17.7.2 + typescript@5.6.2: {} uglify-js@3.19.3: From acd6ee7eabd1221226eb03c06cad101a0cb29d33 Mon Sep 17 00:00:00 2001 From: junkisai Date: Tue, 8 Oct 2024 19:16:12 +0900 Subject: [PATCH 4/6] fix: clean debug code --- frontend/apps/service-site/src/app/posts/[slug]/page.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/apps/service-site/src/app/posts/[slug]/page.tsx b/frontend/apps/service-site/src/app/posts/[slug]/page.tsx index 4bc275e82..cc8b794b3 100644 --- a/frontend/apps/service-site/src/app/posts/[slug]/page.tsx +++ b/frontend/apps/service-site/src/app/posts/[slug]/page.tsx @@ -31,7 +31,6 @@ export default function Page({ params }: PageProps) { return (
- {/* */}