From 2097e1435bcfc8ec3cc84a605fc6c424ac461d4d Mon Sep 17 00:00:00 2001 From: Izan Gil <66965250+SrIzan10@users.noreply.github.com> Date: Sat, 25 May 2024 18:51:36 +0200 Subject: [PATCH] feat: add shiki syntax highlight --- package.json | 5 +- src/layouts/BlogPost.astro | 2 +- src/pages/blog/[...slug].astro | 38 +++--- tailwind.config.mjs | 6 +- yarn.lock | 233 ++++++++++++++++++++++++++++++++- 5 files changed, 260 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 5f88fe2..9c951b0 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,11 @@ }, "devDependencies": { "@tailwindcss/typography": "^0.5.13", + "@types/jsdom": "^21.1.6", "@types/tryghost__content-api": "^1.3.16", + "jsdom": "^24.0.0", "prettier": "^3.2.5", - "prettier-plugin-astro": "^0.14.0" + "prettier-plugin-astro": "^0.14.0", + "shiki": "^1.6.0" } } diff --git a/src/layouts/BlogPost.astro b/src/layouts/BlogPost.astro index 3c26597..19751f4 100644 --- a/src/layouts/BlogPost.astro +++ b/src/layouts/BlogPost.astro @@ -33,7 +33,7 @@ const { title, excerpt: description, published_at, updated_at, feature_image, fe -