Skip to content

Commit

Permalink
Merge pull request #245 from k35o/check
Browse files Browse the repository at this point in the history
blog周りのお手入れなど。。。
  • Loading branch information
k35o committed Sep 4, 2024
2 parents 08b7ba7 + bf8ab11 commit f44b7dd
Show file tree
Hide file tree
Showing 52 changed files with 1,150 additions and 177 deletions.
6 changes: 3 additions & 3 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { StorybookConfig } from '@storybook/nextjs';
const config: StorybookConfig = {
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
stories: ['../src/**/*.stories.tsx'],

addons: [
'@storybook/addon-a11y',
Expand All @@ -20,7 +20,7 @@ const config: StorybookConfig = {
},

typescript: {
reactDocgen: 'react-docgen-typescript'
}
reactDocgen: 'react-docgen-typescript',
},
};
export default config;
48 changes: 30 additions & 18 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import withMdx from "@next/mdx";
import BundleAnalyzer from '@next/bundle-analyzer';
import rehypePrettyCode from "rehype-pretty-code";
import rehypeKatex from "rehype-katex";
import remarkMath from "remark-math";
import { createHighlighter } from "shiki";
import { createHighlighter, createJavaScriptRegexEngine } from "shiki";

/** @type {import('next').NextConfig} */
const nextConfig = {
Expand All @@ -13,21 +14,32 @@ const nextConfig = {
},
};

export default withMdx({
options: {
remarkPlugins: [
remarkMath,
],
rehypePlugins: [
rehypeKatex,
[
rehypePrettyCode,
/** @type {Partial<import("rehype-pretty-code").Options>} */
({
theme: "one-dark-pro",
createHighlighter,
}),
const withBundleAnalyzer = BundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});

export default withBundleAnalyzer(
withMdx({
options: {
remarkPlugins: [
remarkMath,
],
],
},
})(nextConfig);
rehypePlugins: [
rehypeKatex,
[
rehypePrettyCode,
/** @type {Partial<import("rehype-pretty-code").Options>} */
({
theme: "one-dark-pro",
createHighlighter: (options) => {
createHighlighter({
...options,
engine: createJavaScriptRegexEngine(),
})
},
}),
],
],
},
})(nextConfig)
);
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"zod": "3.23.8"
},
"devDependencies": {
"@next/bundle-analyzer": "^14.2.7",
"@storybook/addon-a11y": "8.2.9",
"@storybook/addon-essentials": "8.2.9",
"@storybook/addon-interactions": "8.2.9",
Expand Down
104 changes: 101 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions src/app/blog/color-contrast/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@ import { BlogLayout } from '../_components/blog-layout/blog-layout';
export const metadata: Metadata = {
title: '色のコントラスト比は重要だけどどうやって求めるんだっけ?',
description:
'React で開発する時、どのようにルーティングを実装していますか?Next.jsやRemixなどのフレームワークを用いて開発するときはフレームワークに実装されたルーティング利用し、フレームワークを利',
'背景色とテキスト色のコントラスト比はWCAG 2.1においてAA基準とAAA基準の2つの達成基準によって定められています。 AA基準における大文字のテキストの最小コントラスト比は4.5:1、小文字のテ',
category: 'color contrast',
openGraph: {
title: '色のコントラスト比は重要だけどどうやって求めるんだっけ?',
description:
'React で開発する時、どのようにルーティングを実装していますか?Next.jsやRemixなどのフレームワークを用いて開発するときはフレームワークに実装されたルーティング利用し、フレームワークを利',
'背景色とテキスト色のコントラスト比はWCAG 2.1においてAA基準とAAA基準の2つの達成基準によって定められています。 AA基準における大文字のテキストの最小コントラスト比は4.5:1、小文字のテ',
url: 'https://k8o.me/blog/color-contrast',
publishedTime: '2024/02/12T00:00:00.000Z',
authors: ['k8o'],
siteName: 'k8o',
locale: 'ja',
type: 'article',
},
twitter: {
title: '色のコントラスト比は重要だけどどうやって求めるんだっけ?',
card: 'summary',
card: 'summary_large_image',
description:
'React で開発する時、どのようにルーティングを実装していますか?Next.jsやRemixなどのフレームワークを用いて開発するときはフレームワークに実装されたルーティング利用し、フレームワークを利',
'背景色とテキスト色のコントラスト比はWCAG 2.1においてAA基準とAAA基準の2つの達成基準によって定められています。 AA基準における大文字のテキストの最小コントラスト比は4.5:1、小文字のテ',
},
};

Expand Down
Loading

0 comments on commit f44b7dd

Please sign in to comment.