astro-typograf
v2.1.0
Published
Text typographer for statically rendered files in Astro
Downloads
55
Maintainers
Readme
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']
}
)
],
})