オンデマンドレンダリングアダプター
https://docs.astro.build/ja/guides/server-side-rendering/
Unknown Content Collection Error
90 - Ratchagitja.md - Setup Astro
My notes & stuff
https://garden.narze.live/100daysofcode-r3-90-ratchagitja-md-setup-astro/
gatsby の contents/blog を src/content/blog にシンボリックリンクしたのがよくなかった。
Content entry frontmatter does not match schema
元記事にあわせて pubDate を date に変えたが、不整合ではまる。
わりとあっさり動いた
gatsby
と比べるとだいぶシンプル。
gatsby
は md => GraphQL => html
なのに対して、
astro
は md => html
なのでシンプル。
theme: astro-ink を導入してみる
よくわからなかったのでコピペでやった。
新規にコピー元になるサイトを作る。
npm create astro@latest -- --template one-aalam/astro-ink
src や各種設定をコピーした。
追加の依存を解決するべく、npm install
するとエラーになったので、
npm-check-updates
した。
alias path の解決。 https://docs.astro.build/ja/guides/aliases/
schema 調整。 optional 付けて、date を調整するというので動きそう。
結果、 svelte
や tailwind
といった知らないライブラリーが入ったが、
動いた。
のだが gh-pages に deploy したら動いてなかった。
どうも SSR
向けの theme
らしい。
ルーティング
Astroのルーティングの紹介
https://docs.astro.build/ja/core-concepts/routing/#静的ssgモード
なんとなく動いた。
astro の blog template に戻した
改めて、
初めてのAstroブログ
プロジェクトベースのチュートリアルでAstroの基本を学びましょう。始めるために必要なすべての前提知識をお届けします!
https://docs.astro.build/ja/tutorial/0-introduction/
コンテンツコレクション
コンテンツコレクションは、Markdownを整理し、フロントマターをスキーマで型チェックするのに役立ちます。
https://docs.astro.build/ja/guides/content-collections/
に目を通してシンプル化した。
nvim 設定
neoformat で prettier-plugin-astro
が動くように
npx prettier
になるようした。