Skip to content

Commit 37fa0bc

Browse files
authored
Merge pull request #535 from mwskwong/canary
Canary
2 parents 84ba916 + f0e95f4 commit 37fa0bc

File tree

9 files changed

+191
-162
lines changed

9 files changed

+191
-162
lines changed

.github/workflows/format.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Format Code
22
on: push
33

44
jobs:
5-
prettier:
5+
format:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v4

eslint.config.mjs

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// @ts-check
22

3-
import path from "node:path";
4-
import url from "node:url";
5-
63
import { FlatCompat } from "@eslint/eslintrc";
74
import eslint from "@eslint/js";
85
import commentsPlugin from "@eslint-community/eslint-plugin-eslint-comments/configs";
@@ -14,11 +11,8 @@ import reactCompilerPlugin from "eslint-plugin-react-compiler";
1411
import unicornPlugin from "eslint-plugin-unicorn";
1512
import tseslint from "typescript-eslint";
1613

17-
const __filename = url.fileURLToPath(import.meta.url);
18-
const __dirname = path.dirname(__filename);
19-
2014
const compat = new FlatCompat({
21-
baseDirectory: __dirname,
15+
baseDirectory: import.meta.dirname,
2216
});
2317

2418
const config = tseslint.config(

package-lock.json

+100-100
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@next/bundle-analyzer": "^15.1.6",
4545
"@next/eslint-plugin-next": "^15.1.6",
4646
"@total-typescript/ts-reset": "^0.6.1",
47-
"@types/node": "^22.13.0",
47+
"@types/node": "^22.13.1",
4848
"@types/react": "^19.0.8",
4949
"@types/react-dom": "^19.0.3",
5050
"autoprefixer": "^10.4.20",
@@ -74,6 +74,6 @@
7474
"stylelint-config-recess-order": "^6.0.0",
7575
"stylelint-config-standard": "^37.0.0",
7676
"typescript": "^5.7.3",
77-
"typescript-eslint": "^8.22.0"
77+
"typescript-eslint": "^8.23.0"
7878
}
7979
}
File renamed without changes.

src/app/%5Fparams/page.tsx

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import { Code, Container, Heading, Link, Section } from "@radix-ui/themes";
2+
import * as DataList from "@radix-ui/themes/components/data-list";
3+
import { type Metadata } from "next";
4+
import { type FC } from "react";
5+
6+
import { routes, siteUrl } from "@/constants/site-config";
7+
8+
import styles from "./page.module.css";
9+
10+
const ParamsPage: FC = () => (
11+
<Container asChild>
12+
<main>
13+
<Section>
14+
<Heading size="6">{routes.params.name}</Heading>
15+
<DataList.Root mt="8">
16+
<DataList.Item>
17+
<DataList.Label>Commit</DataList.Label>
18+
<DataList.Value>
19+
<Code asChild className={styles.codeValue} variant="ghost">
20+
<Link
21+
rel="noreferrer"
22+
target="_blank"
23+
href={
24+
process.env.VERCEL_GIT_COMMIT_SHA &&
25+
`https://github.com/mwskwong/mwskwong.com/commit/${process.env.VERCEL_GIT_COMMIT_SHA}`
26+
}
27+
>
28+
{process.env.VERCEL_GIT_COMMIT_SHA}
29+
</Link>
30+
</Code>
31+
</DataList.Value>
32+
</DataList.Item>
33+
<DataList.Item>
34+
<DataList.Label>Region</DataList.Label>
35+
<DataList.Value>
36+
<Code className={styles.codeValue} variant="ghost">
37+
{process.env.VERCEL_REGION}
38+
</Code>
39+
&nbsp;(
40+
<Link
41+
href="https://vercel.com/docs/edge-network/regions#region-list"
42+
rel="noreferrer"
43+
target="_blank"
44+
>
45+
region list
46+
</Link>
47+
)
48+
</DataList.Value>
49+
</DataList.Item>
50+
<DataList.Item>
51+
<DataList.Label>Site URL</DataList.Label>
52+
<DataList.Value>
53+
<Link href={siteUrl} rel="noreferrer" target="_blank">
54+
{siteUrl}
55+
</Link>
56+
</DataList.Value>
57+
</DataList.Item>
58+
<DataList.Item>
59+
<DataList.Label>Contentful ENV</DataList.Label>
60+
<DataList.Value>
61+
<Code asChild className={styles.codeValue} variant="ghost">
62+
<Link
63+
rel="noreferrer"
64+
target="_blank"
65+
href={
66+
process.env.CONTENTFUL_SPACE_ID &&
67+
process.env.CONTENTFUL_ENVIRONMENT &&
68+
`https://app.contentful.com/spaces/${process.env.CONTENTFUL_SPACE_ID}/environments/${process.env.CONTENTFUL_ENVIRONMENT}`
69+
}
70+
>
71+
{process.env.CONTENTFUL_ENVIRONMENT}
72+
</Link>
73+
</Code>
74+
</DataList.Value>
75+
</DataList.Item>
76+
</DataList.Root>
77+
</Section>
78+
</main>
79+
</Container>
80+
);
81+
82+
export const metadata = { title: routes.params.name } satisfies Metadata;
83+
export const dynamic = "force-dynamic";
84+
85+
export default ParamsPage;

src/app/params/page.tsx

-52
This file was deleted.

src/constants/site-config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const routes = {
1414
skills: { name: "Skills", pathname: "/skills" },
1515
blog: { name: "Blog", pathname: "/blog" },
1616
blogRssFeed: { name: "Blog RSS Feed", pathname: "/blog/rss.xml" },
17+
params: { name: "Parameters", pathname: "/_params" },
1718
} as const satisfies Record<string, Route>;
1819

1920
const getSiteUrl = () => {

unlighthouse.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const config = {
1212
scanner: {
1313
samples: 3,
1414
throttle: true,
15+
crawler: false,
1516
},
1617
};
1718

0 commit comments

Comments
 (0)