Small Pics

適用於 EmDash 的 Small Pics 圖片分發。

外掛

Small Pics

適用於 EmDash 的 Small Pics 圖片分發。

  • 分類: 媒體
  • 狀態: 可用
  • 版本: 0.1.0
  • 價格: 未知
  • 來源: npm 套件
  • 安裝方式: npm 原生整合
  • 核實日期: 2026-11-01

適用於 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 }),
  ],
});

詳細資訊