{"id":18862594,"url":"https://github.com/zk-phi/zk-phi.github.io","last_synced_at":"2026-03-01T12:31:22.850Z","repository":{"id":37167646,"uuid":"195982101","full_name":"zk-phi/zk-phi.github.io","owner":"zk-phi","description":"GitHub Pages page","archived":false,"fork":false,"pushed_at":"2025-12-27T07:03:05.000Z","size":21015,"stargazers_count":0,"open_issues_count":26,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-28T23:15:00.332Z","etag":null,"topics":["web"],"latest_commit_sha":null,"homepage":"","language":"Nunjucks","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zk-phi.png","metadata":{"files":{"readme":"Readme.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-07-09T09:56:52.000Z","updated_at":"2025-12-27T07:02:18.000Z","dependencies_parsed_at":"2024-01-29T22:33:30.948Z","dependency_job_id":"d8b4ffee-dc4d-4631-b34a-fec0467cfdfe","html_url":"https://github.com/zk-phi/zk-phi.github.io","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zk-phi/zk-phi.github.io","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fzk-phi.github.io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fzk-phi.github.io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fzk-phi.github.io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fzk-phi.github.io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zk-phi","download_url":"https://codeload.github.com/zk-phi/zk-phi.github.io/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fzk-phi.github.io/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29969243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T11:43:06.159Z","status":"ssl_error","status_checked_at":"2026-03-01T11:43:03.887Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["web"],"created_at":"2024-11-08T04:35:09.515Z","updated_at":"2026-03-01T12:31:22.830Z","avatar_url":"https://github.com/zk-phi.png","language":"Nunjucks","funding_links":[],"categories":[],"sub_categories":[],"readme":"https://zk-phi.github.io\n\nおためし 11ty\n\n直す気のないところ以外は lighthouse 満点までチューニングしてみた\n- 画像の解像度が低すぎ → 元からこのサイズなので\n- 小さすぎるリンクがある → 元から押されることを意図していないリンクが一つあるので\n\n# workflows\n\n- なんらかの branch を push すると lighthouse が走る\n- `master` に push するとビルドが走って `gh-pages` に発射される\n- 毎早朝にビルドが走る\n\n## develop\n\n`npm install` して `npm run develop` で開発用サーバー立ち上げ\n\n## build\n\n`npm run build` で静的ページが `_site` に生成される (`npm run serve` で確認できる)。\n\nweb フォントのサブセット化に必要なツール\n\n```\npip install fonttools\n```\n\nを入れてから `npm run opt` すると、生成された静的ページがもろもろ最適化される。\n\n# optimizations\n\n試してみたこと。\n\n## テンプレートレベル\n\n(see `_includes/layout/minimal.njk`)\n\n- index.njk のクリティカルな css をすべてインラインに展開\n  - それ以外のページはキャッシュに期待して普通に配置\n\n- index.njk のフォントを preload\n   - css 側で `font-display: swap` な fontface を定義\n   \u003c!-- - 呼び出し (`font-family: ...`) をクラスで囲んでおいて、 js で遅れてトリガー --\u003e\n   \u003c!--   - 初回レンダーをブロックしないのを狙っている、数字見るといちおう意味ありそう --\u003e\n   \u003c!-- - Font Loading API を使った方が丁寧っぽい https://dev.opera.com/articles/better-font-face/ --\u003e\n   \u003c!-- - initial rendering vs FOUT 時間はトレードオフっぽい？ --\u003e\n   \u003c!--   - 前者を取ってあえて preload しないでみた (多分いけてない) --\u003e\n\n- 追加の css, js をすべて遅延ロード\n   - 各種インタラクションなど、初回のレンダリングに必要のないもの\n   - js, css は `requestIdleCallback` でアイドルを待ってからロード (see `js/loader.js`)\n     - `loader.js` 自体は `defer` で遅延ロード\n\n## ビルド時\n\n(see `.eleventy.js`)\n\n- `eleventy-img` でラスター画像の自動 webp 化 \u0026 lazy load\n\n## ビルド後\n\n(see `package.json`)\n\n- `glyphhanger` で web フォントをサブセット化\n   - `index.html` 用とそれ以外用で別々にサブセット化\n   - `@fontface` の CSS をインライン化してあるので、 `index.html` だけ外から URL を書き換える\n     - ※ html の minify 前に走らせないと、書き換え箇所が複数ある時うまくいかないっぽい\n\n- `htmlmin` で html (とインライン js, css) を minify\n   - タグ間のスペースまで消す設定にして、空白は margin でつける\n   - → フォントが後から読み込まれた時の CLS が小さい\n   - (※ この影響で opt 前後で空白の大きさが若干変わることがある)\n\n- `uglifyjs-folder` で js を minify\n\n- `cleancss` で css を minify\n\n- `svgo` で svg 画像を minify\n\n## クライアント側\n\n(see `js/prefetch.js`)\n\n- サイト内リンクをほぼすべてアイドル中に `prefetch`\n  - `mousedown` (`touchstart`) で `prerender`\n  - 「最近の活動」ページだけリンクがすごく多いので自重\n\n- 全ページ共通で使用している CSS などもアイドル中に `prefetch`\n  - index.njk だけ初回レンダー最優先でインライン化しているので\n\n# directories\n\n- `_data`\n  - `lastUpdatedDate.js` ... GitHub からこのリポジトリの最終更新日を取ってくる\n  - `monthEmoji.js` ... それぞれの月を表す絵文字\n  - `recentActivities.js` ... 最近の僕の活動をいろんなフィードから取ってくる\n- `_layouts` ... いろんなページで共通して使っている DOM 構造\n- `css` ... css\n- `fonts` ... web フォント\n- `img` ... ラスター画像\n- `js` ... js\n- `pages` ... 各ページ (のテンプレート)\n- `svg` ... SVG\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk-phi%2Fzk-phi.github.io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzk-phi%2Fzk-phi.github.io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk-phi%2Fzk-phi.github.io/lists"}