Update dependencies and enhance package-lock.json
This commit updates multiple dependencies within `package-lock.json`, including upgrades for Astro, @astrojs packages, and various Sharp components. Additionally, it introduces new optional dependencies and enforces compatibility with Node 18 and higher in certain components.
This commit is contained in:
86
README.md
86
README.md
@ -1,47 +1,55 @@
|
||||
# Astro Starter Kit: Minimal
|
||||
# Gallus Pub Website
|
||||
|
||||
This is the Gallus Pub website built with Astro. It includes an admin area at `/admin` for editing content (events, gallery, texts). Changes are committed back to the Git repository via the Gitea API which triggers your Woodpecker + Fly.io deployment pipeline.
|
||||
|
||||
## Local development
|
||||
|
||||
To run the site locally with OAuth login (Gitea):
|
||||
|
||||
1. Copy the example env file and fill values:
|
||||
```bash
|
||||
cp .env.example .env.local
|
||||
```
|
||||
- Create a Gitea OAuth application with Redirect URI: `http://localhost:4321/api/auth/callback`.
|
||||
- Set `OAUTH_CLIENT_ID` and `OAUTH_CLIENT_SECRET` from Gitea.
|
||||
- Set `GITEA_OWNER`, `GITEA_REPO`, and a `GITEA_TOKEN` (PAT) with write access to the repo.
|
||||
- Generate random secrets for sessions/CSRF (e.g. `openssl rand -hex 32`).
|
||||
|
||||
2. Install dependencies:
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
3. Start dev server using your local env file:
|
||||
```bash
|
||||
npm run dev:local
|
||||
```
|
||||
The site runs at http://localhost:4321. Visit http://localhost:4321/admin to log in via Gitea OAuth.
|
||||
|
||||
Notes:
|
||||
- If OAuth variables are missing or malformed, the auth endpoints return a clear 500 with guidance instead of crashing.
|
||||
- Production secrets are configured on Fly.io; `.env.local` is ignored by Git.
|
||||
|
||||
## Project structure
|
||||
|
||||
```sh
|
||||
npm create astro@latest -- --template minimal
|
||||
```
|
||||
|
||||
[](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal)
|
||||
[](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/minimal)
|
||||
[](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/minimal/devcontainer.json)
|
||||
|
||||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
||||
|
||||
## 🚀 Project Structure
|
||||
|
||||
Inside of your Astro project, you'll see the following folders and files:
|
||||
|
||||
```text
|
||||
/
|
||||
├── public/
|
||||
├── public/ # static assets
|
||||
├── src/
|
||||
│ └── pages/
|
||||
│ └── index.astro
|
||||
│ ├── content/ # editable JSON content (events, gallery)
|
||||
│ ├── pages/ # Astro pages, includes /admin and API routes
|
||||
│ ├── components/ # UI components
|
||||
│ └── utils/ # session helpers
|
||||
├── .env.example # template for local env
|
||||
├── fly.toml # Fly.io config
|
||||
├── Dockerfile
|
||||
└── 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.
|
||||
## Commands
|
||||
|
||||
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](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
|
||||
- `npm install` – install deps
|
||||
- `npm run dev` – dev server without loading .env.local (expects env to be present in the shell)
|
||||
- `npm run dev:local` – dev server loading `.env.local` via dotenv-cli
|
||||
- `npm run build` – production build (SSR via @astrojs/node)
|
||||
- `npm run preview` – preview the production build
|
||||
|
||||
Reference in New Issue
Block a user