Skip to content

Commit d98e874

Browse files
authored
Merge branch 'main' into add-company-tour
2 parents 2f927ea + fcb8907 commit d98e874

File tree

698 files changed

+1950
-1009
lines changed

Some content is hidden

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

698 files changed

+1950
-1009
lines changed

.envrc.sample

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
# if you are using nix
2-
use flake || use nix
1+
# if you are using flakes
2+
watch_file ./shell.nix
3+
use flake
4+
5+
# else if you are using nix-shell
6+
use nix

.github/workflows/check.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ jobs:
1616
bun-version: 1.2.5
1717
- run: bun install --frozen-lockfile
1818
- run: bun check
19-
typos:
20-
name: Check Typos
21-
runs-on: ubuntu-latest
22-
steps:
23-
- uses: actions/checkout@v4
24-
- uses: crate-ci/typos@v1
2519
build:
2620
name: Build
2721
runs-on: ubuntu-latest
@@ -40,3 +34,11 @@ jobs:
4034
node_modules/.astro/assets
4135
restore-keys: ${{ runner.os }}-astro-build
4236
- run: bun run build
37+
dirs-small:
38+
name: All dirs must be small (<5MB)
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: cachix/install-nix-action@v31
43+
- run: nix run github:ut-code/internal-helpers#disallow-large-dir contents/articles/*/*
44+
- run: nix run github:ut-code/internal-helpers#disallow-large-dir contents/members/*

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ dist
1212
# env
1313
.direnv
1414
.envrc
15+
16+
.unlighthouse

.ignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
bun.lock
2+
3+
contents/articles/20*
4+
!contents/articles/2025

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["astro-build.astro-vscode", "tekumara.typos-vscode"]
2+
"recommendations": ["astro-build.astro-vscode"]
33
}

README.md

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,50 @@
11
# ut.code(); 公式ウェブサイト
22

3-
## 環境構築
3+
## 環境構築・コマンド
44

5-
### devcontainer
5+
`./docs/develop.md` を参照。
66

7-
下のボタンを押すと開発環境が起動します。
8-
起動までしばらく時間がかかるのでお待ちください。
7+
## Guidelines
98

10-
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/ut-code/website)
9+
### 一般
1110

12-
### ローカル
11+
フォーマッタは Prettier を用います。
12+
各フロントマッター (トップに書く YAML) のプロパティは `./docs/contents` に説明があります。
1313

14-
- (必須) Bun >= v1.1.39
15-
- (推奨) Typos <https://github.com/crate-ci/typos>
16-
- 任意のエディタ <https://docs.astro.build/en/editor-setup/>
14+
### メンバー
1715

18-
```sh
19-
bun install --frozen-lockfile
20-
```
16+
- メンバー画像や名前に本名・顔写真を使う必要はありません。
17+
- メンバー画像は、 `faceImage``upperBodyImage` の 2 つあります。
18+
- どちらも 1:1 にクロップされます。
19+
- `faceImage` はアップの、 `upperBodyImage` は引いた画像を使ってください。元となる画像は同じ画像を使ってください。
2120

22-
## 開発
21+
### 記事
2322

24-
```sh
25-
bun dev
26-
```
23+
- サムネイルは縦横比 3:5 にクロップされます。
2724

28-
<http://localhost:4321/> で開発用サーバーが起動します。
25+
- 可能なら 3:5 に近い画像を使い、
26+
- できないかつクロップが許容できない場合は、 `fit: contain` と背景色 (`bg_color:`) を指定してください。
2927

30-
## ビルド
28+
- 画像サイズは 1MB 未満に抑えてください。 ffmpeg や ImageMagick を使い、解像度を下げたり、画質 (Quality) を下げたり、WebP (or AVIF) に変換するなどができます。
3129

32-
```sh
33-
bun run build
34-
```
30+
- 参考 <https://stackoverflow.com/questions/7261855/recommendation-for-compressing-jpg-files-with-imagemagick>
31+
- 例:
3532

36-
## ディレクトリ構造
33+
- `mogrify -resize 800x -quality 80 -format webp *.png *.jpg *.jpeg`
34+
- ImageMagick についてきます。
35+
- コマンドの引数は見ての通り。
36+
- `ffmpeg -i ./input.png -vf 'scale=1920:-1' -crf 10 output.avif`
37+
- -> 50〜300kb 程度になります。AVIF の場合、多少 (数秒〜1分程度) 時間がかかります。
38+
- `-vf scale={width}:{height}`: 画像の横幅。height が -1 のときは、横幅から計算する。
39+
- `-crf`: 画像の圧縮率。大きいほうが圧縮率が高い。
3740

38-
- `contents/`: 記事のデータです。Astro の Content Collection を使って `src/pages` から読み込みます。
39-
- `src/`
40-
- `images/`: 記事ではなくデザインに用いる画像です。
41-
- `pages/`: Astro の機能によりファイル名がパスに変換されます。
42-
- `islands/`: Astro で読み込む Island の集合です。
43-
- `content.config.ts`: Astro の Content Collection の設定を書きます。
44-
- `global.css`: Tailwind の設定ファイルです。
45-
- `astro.config.ts`: Astro の設定ファイルです。Vite の設定もここに書きます。
46-
- `biome.jsonc`: Biome の設定ファイルです。Biome のフォーマット部分は Astro に対応していないので、Lint だけ使っています。対応したら両方 Biome にしましょう。
47-
- `.prettier{rc,ignore}`: Prettier の設定ファイルです。 Prettier には、 astro と svelte と tailwind のプラグインが入っています。
48-
- `svelte.config.js`: 最もフィジカルで、最もプリミティブで、そして最もフェティッシュなフレームワークでいかせていただきます。
41+
- HEIC は対応していないので、 ImageMagick で他のフォーマットに変換してください。
42+
- 例: `magick picture.HEIC picture.webp`
43+
44+
- 各記事のファイルサイズの合計は5 MB までに抑えてください。
45+
- 理想は 1MB 未満です。
46+
- ファイルサイズの確認には、`ncdu` が使いやすいです。
47+
48+
### プロジェクト
49+
50+
- サムネイルは縦横比 3:5 にクロップされます。

_typos.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

astro.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export default defineConfig({
2222
icon({
2323
include: {
2424
feather: ["*"],
25+
flowbite: ["*"],
2526
},
2627
}),
2728
mdx(),

0 commit comments

Comments
 (0)