budougumi0617 / github-pages-astro

study to publish web pages by astro on GitHub pages, and preview pull request on Vercel

Home Page:https://budougumi0617.github.io/github-pages-astro/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

github-page-astro

前提

本番リリースはGitHub Actionsを用いてGitHub Pagesにデプロイすることを前提とする。
また、メインのPagesのリポジトリとはことなるため、サブディレクトリを含んだルートURLになることを想定する。

Vercelとの接続

base pathを設定しているときにVercelを用いてpreviewサイトを作成するにはBASE_URLを空文字列にする必要がある。 なお、org配下にあるrepoで利用するにはteamを作成する必要がある。つまり、public repoでも課金の必要がありそう

Netlifyとの接続

同様にBASE_URLを空文字列にする必要がある。


以下、Astroが自動生成したREADME。

Astro Starter Kit: Basics

npm create astro@latest -- --template basics

Open in StackBlitz Open with CodeSandbox Open in GitHub Codespaces

🧑‍🚀 Seasoned astronaut? Delete this file. Have fun!

just-the-basics

🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

/
├── public/
│   └── favicon.svg
├── src/
│   ├── components/
│   │   └── Card.astro
│   ├── layouts/
│   │   └── Layout.astro
│   └── pages/
│       └── index.astro
└── package.json

Astro looks for .astro or .md files in the src/pages/ directory. Each page is exposed as a route based on its file name.

There's nothing special about src/components/, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the public/ directory.

🧞 Commands

All commands are run from the root of the project, from a terminal:

Command Action
npm install Installs dependencies
npm run dev Starts local dev server at localhost:4321
npm run build Build your production site to ./dist/
npm run preview Preview your build locally, before deploying
npm run astro ... Run CLI commands like astro add, astro check
npm run astro -- --help Get help using the Astro CLI

👀 Want to learn more?

Feel free to check our documentation or jump into our Discord server.

About

study to publish web pages by astro on GitHub pages, and preview pull request on Vercel

https://budougumi0617.github.io/github-pages-astro/


Languages

Language:Astro 97.4%Language:JavaScript 2.6%