astro-typograf
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

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']
      }
    )
  ],
})

Package Sidebar

Install

npm i astro-typograf

Weekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

14.9 kB

Total Files

7

Last publish

Collaborators

  • mishamyrt