This is my personal web page for research, work and some activities.
- URL:
https://knhnd.github.io/mypage/
Web フレームワーク Astro で実装.テンプレートテーマに Astrofy を採用.
- package manager:
pnpm
- Install & Local Server
- Astrofy Repository からプロジェクトを clone
- プロジェクトルートで
pnpm install
でパッケージインストール pnpm run dev
でローカルサーバの起動
Astrofy のプロジェクト構成は以下のとおり(デフォルトからは少しだけ変えている).
├── src/
│ ├── components/
│ │ ├── TimeLine
│ │ ├── BaseHead.astro
│ │ ├── Card.astro
│ │ ├── Footer.astro
│ │ ├── Header.astro
│ │ └── HorizontalCard.astro
│ │ └── SideBar.astro
│ │ └── SideBarMenu.astro
│ │ └── SideBarFooter.astro
│ ├── content/
│ ├── layouts/
│ │ └── BaseLayout.astro
│ │ └── PostLayout.astro
│ └── pages/
│ │ ├── blog/
│ │ │ ├── [...page].astro
│ │ │ ├── [slug].astro
│ │ └── cv.astro
│ │ └── index.astro
│ │ └── projects.astro
│ │ └── rss.xml.js
│ ├── styles/
│ │ └── global.css
│ └── config.ts
├── public/
│ ├── favicon.svg
│ └── profile.webp
│ └── social_img.webp
├── astro.config.mjs
├── tailwind.config.cjs
├── package.json
└── tsconfig.json
- サイト設定:
/src/config.ts
- コンポーネント:
/src/components
の.astro
ファイル - コンテンツ:
src/pages/
の.astro
ファイル
詳細はリポジトリの README を参照.
src/pages
に.astro
の新規ファイルを追加/src/components
のSideBarMenu.astro
に追記
公式ドキュメントを参考に GitHub Pages にデプロイ.
push
すれば自動デプロイ
- GitHub Pages にデプロイするとページと画像の PATH がおかしくなる
astro.config.mjs
の設定とconst basePath = import.meta.env.BASE_URL;
の記述で解決