Skip to content

Commit 71f336e

Browse files
committed
feat: add blog section with initial setup
- Add blog pages and layouts - Configure content collections for blog posts - Setup typography and styling for blog posts - Remove tags feature from blog - Fix rehype plugin configuration - Add initial blog post structure
1 parent f42abb5 commit 71f336e

14 files changed

Lines changed: 6713 additions & 5777 deletions

File tree

astro.config.mjs

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineConfig } from "astro/config";
22
import path from "path";
3-
import rehypeExternalLinks from "rehype-external-links";
43
import { fileURLToPath } from "url";
4+
// Remove direct import and let Astro handle plugin loading
55

66
import mdx from "@astrojs/mdx";
77

@@ -22,6 +22,13 @@ export default defineConfig({
2222
site: "https://defguard.net",
2323
trailingSlash: "ignore",
2424
prefetch: true,
25+
build: {
26+
assets: 'assets',
27+
},
28+
// Keep configuration simple to avoid conflicts
29+
mdx: {
30+
// Will inherit from markdown config
31+
},
2532
integrations: [
2633
react(),
2734
mdx(),
@@ -42,14 +49,16 @@ export default defineConfig({
4249
],
4350
markdown: {
4451
rehypePlugins: [
45-
[
46-
rehypeExternalLinks,
47-
{
48-
target: "_blank",
49-
rel: ["nofollow", "noopener", "noreferrer"],
50-
},
51-
],
52+
// Keep string-based configuration which works with both versions
53+
['rehype-external-links', {
54+
target: "_blank",
55+
rel: ["nofollow", "noopener", "noreferrer"],
56+
}],
5257
],
58+
shikiConfig: {
59+
theme: 'github-dark',
60+
wrap: true
61+
},
5362
},
5463
vite: {
5564
resolve: {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"@playform/compress": "^0.1.6",
3434
"@tuplo/numberfmt": "^1.11.0",
3535
"astro": "^4.16.16",
36+
"astro-blog": "^0.2.3",
3637
"astro-font": "^0.1.81",
3738
"astro-imagetools": "^0.9.0",
3839
"clsx": "^2.1.1",
@@ -43,7 +44,7 @@
4344
"react-markdown": "^9.0.1",
4445
"react-multi-carousel": "^2.8.5",
4546
"react-slick": "^0.30.2",
46-
"rehype-external-links": "^3.0.0",
47+
"rehype-external-links": "^2.0.0",
4748
"rehype-raw": "^7.0.0",
4849
"sass": "^1.81.0",
4950
"sharp": "0.33.5",

0 commit comments

Comments
 (0)