mirror of
https://github.com/immich-app/static-pages.git
synced 2026-09-30 13:23:05 +08:00
1.1 KiB
1.1 KiB
@immich/import-post
Imports an Outline document into the blog. It:
- Fetches the document from the Outline API.
- Downloads every referenced image/video attachment.
- Optimizes and uploads them to and R2 bucket using md5 hash as filename
- Updates the markdown link to use static.immich.cloud
- Writes the updated markdown to disk
- Runs
prettier --writeon the file
Usage
pnpm --filter @immich/import-post run import "<outline-post-url>"
Required environment variables:
| Variable | Description |
|---|---|
OUTLINE_API_KEY |
Outline API token |
R2_BUCKET_NAME |
Target bucket |
R2_ENDPOINT_URL |
S3-compatible endpoint |
R2_ACCESS_KEY_ID |
Access key |
R2_SECRET_ACCESS_KEY |
Secret key |
R2_PUBLIC_URL |
Public base URL for uploaded assets |
The post URL may also be supplied via OUTLINE_POST_URL instead of an argument.