Make Apache config optional and add h-feed support
This commit is contained in:
parent
bf82d8bcd6
commit
132b2b69f3
14 changed files with 182 additions and 53 deletions
25
README.md
25
README.md
|
|
@ -5,7 +5,7 @@ Static website built in Astro + Typescript + TailwindCSS.
|
|||
## Requirements
|
||||
|
||||
- Node.js 20+
|
||||
- (optional) rsync, for remote deployment.
|
||||
- (optional) rsync or LFTP, for remote deployment.
|
||||
- (optional) LibreOffice, for the story export script.
|
||||
|
||||
## Development
|
||||
|
|
@ -22,10 +22,18 @@ npm install
|
|||
|
||||
```bash
|
||||
npm run dev # Start development server (quit with Ctrl-C)
|
||||
npm run sync # Rebuild types from src/content/ files
|
||||
npm run sync # Rebuild types from Astro config and src/content/ files
|
||||
npm run prettier # Prettier formatting
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
The following optional environment variables can be set with `.env`:
|
||||
|
||||
| Name | Type | Description |
|
||||
|-|-|-|
|
||||
| `APACHE_CONFIG` | boolean | Whether to generate an `.htaccess` Apache config file at the root of the output directory or not. |
|
||||
|
||||
### Export story for upload
|
||||
|
||||
Requires `libreoffice` to be installed and in your path.
|
||||
|
|
@ -40,8 +48,19 @@ npm run export-story -- -o ~/Documents/TO_UPLOAD slug-for-story-to-export
|
|||
npm run build
|
||||
```
|
||||
|
||||
Then, after configuring the `gallerybm` host (or the name of your choosing) in `~/.ssh/config`, you can use a command like:
|
||||
Then, if you're using rsync, after configuring the `gallerybm` host (or the name of your choosing) in `~/.ssh/config`, you can use a command like:
|
||||
|
||||
```bash
|
||||
rsync --delete-after -acP dist/ gallerybm:/home/public
|
||||
```
|
||||
|
||||
Or if you prefer LFTP, create a `.env` file at the root of the project:
|
||||
|
||||
```env
|
||||
DEPLOY_LFTP_HOST=https://example-webdav-server.com
|
||||
DEPLOY_LFTP_USER=example_user
|
||||
DEPLOY_LFTP_PASSWORD=sup3r_s3cr3t_password
|
||||
DEPLOY_LFTP_TARGETFOLDER=sites/gallery.badmanners.xyz/
|
||||
```
|
||||
|
||||
Then run `npm run deploy-lftp`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue