Small Pics
適用於 EmDash 的 Small Pics 圖片分發。
外掛
Small Pics
適用於 EmDash 的 Small Pics 圖片分發。
適用於 EmDash 的 Small Pics 圖片分發。
安裝
從 npm 安裝此套件:
npm install @smallpics/emdash
在 Astro 設定中註冊此外掛:
import { defineConfig } from 'astro/config';
import cloudflare from '@astrojs/cloudflare';
import react from '@astrojs/react';
import emdash from 'emdash/astro';
import { d1, r2 } from '@emdash-cms/cloudflare';
import smallpics, { mediaStorageOptions } from '@smallpics/emdash';
const baseUrl = 'https://media.smallpics.io';
export default defineConfig({
output: 'server',
adapter: cloudflare(),
integrations: [
react(),
emdash({
database: d1({ binding: 'DB' }),
storage: r2(mediaStorageOptions(baseUrl, 'MEDIA')),
images: false,
}),
smallpics({ baseUrl }),
],
});
詳細資訊
- 最新版本: 0.1.0
- 授權條款: MIT
- 發布者: smallpics-dev
- 需求: EmDash
^1.2.0 - 原始碼儲存庫: https://github.com/SmallPics/emdash-smallpics
- npm 套件: @smallpics/emdash