2.0.0 • Published 1 year ago

astro-typograf v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Astro Typograf Integration

A small library that adds typography fixes using the typograf library to your Astro project.

Setup

Using Astro CLI

npx astro add astro-typograf

Manual

Before you start using it, install the library.

npm install astro-typograf --save

Then put the integration in the Astro configuration file.

// astro.config.mjs
import { defineConfig } from 'astro/config'
import typograf from 'astro-typograf'

export default defineConfig({
  integrations: [
    typograf()
  ],
})

Additional options:

// astro.config.mjs
import { defineConfig } from 'astro/config'
import typograf from 'astro-typograf'

export default defineConfig({
  integrations: [
    typograf(
      selector: 'p, h1, h2, h3', // CSS selectors to apply Typograf
      typografOptions: { // Typograf options
        locale: ['ru', 'en-US']
      }
    )
  ],
})