0.3.4 • Published 7 months ago

astro-link-preview v0.3.4

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

demo

Features

  • Supports both Static Site Generation (SSG) and Server-Side Rendering (SSR) modes.
  • Automatically optimizes images to improve loading performance.
  • Provides customizable styles for preview images.

Installation

# Using NPM
npm install astro-link-preview
# Using Yarn
yarn add astro-link-preview
# Using PNPM
pnpm add astro-link-preview

Config

// astro.config.mjs
import {defineConfig} from "astro/config"
import linkPreview from "astro-link-preview"
export default defineConfig({
  integrations: [
    linkPreview()
  ],
})

Options

import type { LaunchOptions } from 'playwright'

export interface Options {
  /**
   * Whether to log stats
   * @default true
   */
  logStats?: boolean
  /**
   * proxy settings
   */
  proxy?: LaunchOptions['proxy']
  /**
   * preview image format
   * @default 'jpg'
   */
  previewImageFormat?: 'png' | 'jpg'
  /**
   * whether to allow image previews on mobile devices
   * @default false
   */
  enableOnMobile?: boolean
}

How to use

see example

License

MIT © nemurubaka

0.3.2

10 months ago

0.3.4

7 months ago

0.3.3

7 months ago

0.2.10

11 months ago

0.3.0

11 months ago

0.2.9

11 months ago

0.3.1

11 months ago

0.2.8

11 months ago

0.2.7

11 months ago

0.2.6

11 months ago

0.2.5

11 months ago

0.2.4

11 months ago

0.2.3

11 months ago

0.2.2

11 months ago

0.2.1

11 months ago

0.2.0

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago