Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Satori (OG Image generation, tailwind) #80

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
8 changes: 6 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ import { remarkReadingTime } from "./src/plugins/remark-reading-time.mjs"
import { GithubCardComponent } from "./src/plugins/rehype-component-github-card.mjs"
import { AdmonitionComponent } from "./src/plugins/rehype-component-admonition.mjs"
import remarkDirective from "remark-directive" /* Handle directives */
import remarkDirectiveRehype from 'remark-directive-rehype' /* Pass directives to rehype */
import rehypeComponents from "rehype-components"; /* Render the custom directive content */
import {parseDirectiveNode} from "./src/plugins/remark-directive-rehype.js";
import { rawFonts } from "./src/plugins/vite-raw-fonts.mjs"
import svelte from "@astrojs/svelte"
import swup from '@swup/astro';
import sitemap from '@astrojs/sitemap';
import {parseDirectiveNode} from "./src/plugins/remark-directive-rehype.js";


const oklchToHex = (str) => {
const DEFAULT_HUE = 250
Expand Down Expand Up @@ -111,6 +112,9 @@ export default defineConfig({
}
}
},
plugins: [
rawFonts([".woff2", ".ttf"]),
],
css: {
preprocessorOptions: {
stylus: {
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"remark-directive-rehype": "^0.4.2",
"remark-math": "^6.0.0",
"sanitize-html": "^2.13.0",
"satori": "^0.10.13",
"satori-html": "^0.3.2",
"sharp": "^0.33.3",
"svelte": "^4.2.12",
"tailwindcss": "^3.4.1",
Expand All @@ -53,6 +55,7 @@
"@iconify-json/fa6-solid": "^1.1.20",
"@iconify-json/material-symbols": "^1.1.74",
"@iconify/svelte": "^3.1.6",
"@resvg/resvg-js": "^2.6.2",
"@rollup/plugin-yaml": "^4.1.2",
"@tailwindcss/typography": "^0.5.10",
"@types/markdown-it": "^14.0.0",
Expand Down
Loading