Back

medium-zoom#

Checkout medium-zoom for more.

src/site.config.ts
export const integrationConfig: IntegrationConfig = {
  // ...
  // A lightbox library that can add zoom effect
  mediumZoom: {
    enable: true, // disable it will not load the whole library
    selector: '.prose .zoomable',
    options: {
      className: 'zoomable'
    }
  }
}
ts

This theme has integrated it in BlogPost.astro by default, which means any content in src/content/post doesn’t need to import. If you want to use it in any other layout or page, you can use the following code:

---
import { MediumZoom } from '@/components/advanced'
---

<div class="prose">
  <img src="/path/to/image.jpg" class="zoomable" />
</div>

<MediumZoom />
{/* Or with configs */}
<MediumZoom
  selector=".prose .zoomable"
  background="rgba(0, 0, 0, 0.7)"
 />
astro

@playform/compress#

Checkout playform/compress for more.

@tailwindcss/typography#

Configure typography; configs are in tailwind.config.mjs.

tailwind.config.mjs
const typographyConfig = ({ theme }) => ({
  pure: {
    css: { 
      // ...
    }
  }
})
js

And it will be applied to class list configuration:

src/site.config.ts
export const integrationConfig: IntegrationConfig = {
  // ...
  typography: {
    class: 'prose prose-pure dark:prose-invert dark:prose-pure prose-headings:font-medium'
  }
}
ts

Checkout tailwindcss-typography for more.