Other Integrations
Other integrations that help improve your site
medium-zoom#
Checkout medium-zoom ↗ for more.
src/site.config.ts
export const integ: IntegrationUserConfig = {
// ...
// 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'
}
}
}tsThis theme has integrated it in BlogPost.astro by default, which means any content in src/content/blog 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 'astro-pure/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)"
/>astroimport { MediumZoom } from 'astro-pure/advanced'
// .zoomable class will automatically added using remark plugin

<MediumZoom />
// Or with configs
<MediumZoom
selector=".prose .zoomable"
background="rgba(0, 0, 0, 0.7)"
/>tsx@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: {
// ...
}
}
})jsAnd it will be applied to class list configuration:
src/site.config.ts
export const integ: IntegrationUserConfig = {
// ...
typography: {
class: 'prose prose-pure dark:prose-invert dark:prose-pure prose-headings:font-medium'
}
}tsCheckout tailwindcss-typography ↗ for more.
See more docs
-
中文文档