Skip to content

Commit 3adb7d6

Browse files
committed
got astro to working. TODO: migrate
1 parent 7182260 commit 3adb7d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3432
-24156
lines changed

.devcontainer/devcontainer.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// https://github.com/devcontainers/templates/tree/main/src/javascript-node
2+
// TODO: I don't use devcontainer, someone check if this works
23
{
3-
"name": "Node.js",
4-
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye",
5-
"forwardPorts": [8000],
6-
"updateContentCommand": "npm ci",
7-
"postAttachCommand": "npm run develop",
8-
"portsAttributes": { "8000": { "onAutoForward": "openPreview" } },
4+
"name": "ut.code(); Website",
5+
"image": "ghcr.io/nhaef/devcontainer-bun:latest",
6+
"forwardPorts": [4321],
7+
"updateContentCommand": "bun i --frozen-lockfile",
8+
"postAttachCommand": "bun dev",
9+
"portsAttributes": { "4321": { "onAutoForward": "openPreview" } },
910
"customizations": {
1011
"vscode": {
1112
"extensions": ["dbaeumer.vscode-eslint", "apollographql.vscode-apollo"]

.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
use nix
1+
use flake || use nix || true

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/node_modules/
22

33
# artifact
4-
/.cache/
5-
/public
4+
/.astro/
65
src/gatsby-types.d.ts
6+
dist
77

88
# editor
99
.DS_Store

.helix/languages.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[[language]]
2+
name = "jsonc"
3+
file-types = ["jsonc", { glob = "package.json" }]

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
plugins:
2+
- prettier-plugin-astro
3+
overrides:
4+
- files: '*.astro'
5+
options:
6+
parser: 'astro'

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,25 @@
77

88
## 環境構築 (手動)
99

10-
- (必須) Node.js v18
11-
- (推奨) VSCode
12-
- [ESLint 拡張機能](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
13-
- [Apollo 拡張機能](https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo)
10+
- (必須) Bun >= v1.1.39
11+
- 任意のエディタ https://docs.astro.build/en/editor-setup/
1412

1513
```shell
16-
npm ci
14+
bun install --frozen-lockfile
1715
```
1816

1917
## 開発
2018

2119
```shell
22-
npm start
20+
bun dev
2321
```
2422

25-
<http://localhost:8000/> で開発用サーバーが起動します。
23+
<http://localhost:4321/> で開発用サーバーが起動します。
2624

2725
## ビルド
2826

2927
```shell
30-
npm run build
28+
bun run build
3129
```
3230

3331
## ディレクトリ構造
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function ActionButton({
2121
className={clsx(
2222
"flex items-center w-max px-6 py-3 gap-4 rounded-full bg-white text-black font-bold hover:brightness-95",
2323
variant === "light" && "border border-black",
24-
className
24+
className,
2525
)}
2626
>
2727
<div>{children}</div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function Section({
6464
{
6565
left: "lg:ml-auto lg:rounded-l-2xl",
6666
right: "lg:rounded-r-2xl",
67-
}[edge]
67+
}[edge],
6868
)}
6969
>
7070
{renderImage("w-full h-full")}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function ArticleList({
2020
className={clsx(
2121
"grid grid-flow-dense md:grid-cols-2 gap-9",
2222
variant === "normal" && "lg:grid-cols-3 xl:grid-cols-4",
23-
className
23+
className,
2424
)}
2525
>
2626
{articles.map((article, i) => {
@@ -47,13 +47,13 @@ export default function ArticleList({
4747
to={`/articles/${article.frontmatter?.slug}/`}
4848
className={clsx(
4949
"block hover:opacity-80",
50-
additionalProps.cellClassName
50+
additionalProps.cellClassName,
5151
)}
5252
>
5353
<div
5454
className={clsx(
5555
"w-full h-48 object-cover rounded-xl overflow-clip isolate",
56-
additionalProps.imageClassName
56+
additionalProps.imageClassName,
5757
)}
5858
>
5959
{additionalProps.imageData ? (
@@ -74,9 +74,9 @@ export default function ArticleList({
7474
<time className="block text-gray-500 text-sm">
7575
{format(
7676
new Date(
77-
nullthrows(article.frontmatter?.date, "日付が未設定")
77+
nullthrows(article.frontmatter?.date, "日付が未設定"),
7878
),
79-
"yyyy/MM/dd HH:mm"
79+
"yyyy/MM/dd HH:mm",
8080
)}
8181
</time>
8282
<h3 className="text-lg font-bold">

0 commit comments

Comments
 (0)