Switch to Astro #4

Merged
array-in-a-matrix merged 22 commits from astro into main 2024-01-15 17:55:49 -05:00
5 changed files with 54 additions and 5 deletions
Showing only changes of commit 818d64d3da - Show all commits

View file

@ -3,7 +3,8 @@ import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap'; import sitemap from '@astrojs/sitemap';
import remarkMath from 'remark-math'; import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex'; import rehypeKatex from 'rehype-katex';
import rehypeMermaid from 'rehype-mermaid' import rehypeMermaid from 'rehype-mermaid';
import remarkRehype from 'remark-rehype';
export default defineConfig({ export default defineConfig({
site: 'https://bloginamatrix.xyz', site: 'https://bloginamatrix.xyz',
@ -11,14 +12,14 @@ export default defineConfig({
mdx({ mdx({
extendMarkdownConfig: true, extendMarkdownConfig: true,
optimize: true, optimize: true,
remarkPlugins: [remarkMath], remarkPlugins: [remarkMath, remarkRehype],
rehypePlugins: [rehypeKatex, rehypeMermaid] rehypePlugins: [rehypeKatex, rehypeMermaid]
}), }),
sitemap()], sitemap()],
markdown: { markdown: {
gfm: true, gfm: true,
remarkPlugins: [remarkMath], remarkPlugins: [remarkMath, remarkRehype],
rehypePlugins: [rehypeKatex, rehypeMermaid], rehypePlugins: [rehypeKatex, rehypeMermaid],
} }
}); });

View file

@ -14,8 +14,10 @@
"@astrojs/rss": "^4.0.2", "@astrojs/rss": "^4.0.2",
"@astrojs/sitemap": "^3.0.4", "@astrojs/sitemap": "^3.0.4",
"astro": "^4.1.2", "astro": "^4.1.2",
"playwright": "^1.40.1",
"rehype-katex": "^7.0.0", "rehype-katex": "^7.0.0",
"rehype-mermaid": "^2.0.1", "rehype-mermaid": "^2.0.1",
"remark-math": "^6.0.0" "remark-math": "^6.0.0",
"remark-rehype": "^11.1.0"
} }
} }

24
pnpm-lock.yaml generated
View file

@ -17,6 +17,9 @@ dependencies:
astro: astro:
specifier: ^4.1.2 specifier: ^4.1.2
version: 4.1.2 version: 4.1.2
playwright:
specifier: ^1.40.1
version: 1.40.1
rehype-katex: rehype-katex:
specifier: ^7.0.0 specifier: ^7.0.0
version: 7.0.0 version: 7.0.0
@ -26,6 +29,9 @@ dependencies:
remark-math: remark-math:
specifier: ^6.0.0 specifier: ^6.0.0
version: 6.0.0 version: 6.0.0
remark-rehype:
specifier: ^11.1.0
version: 11.1.0
packages: packages:
@ -1986,6 +1992,14 @@ packages:
dev: false dev: false
optional: true optional: true
/fsevents@2.3.2:
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
os: [darwin]
requiresBuild: true
dev: false
optional: true
/fsevents@2.3.3: /fsevents@2.3.3:
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@ -3691,6 +3705,16 @@ packages:
hasBin: true hasBin: true
dev: false dev: false
/playwright@1.40.1:
resolution: {integrity: sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==}
engines: {node: '>=16'}
hasBin: true
dependencies:
playwright-core: 1.40.1
optionalDependencies:
fsevents: 2.3.2
dev: false
/postcss@8.4.33: /postcss@8.4.33:
resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==} resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==}
engines: {node: ^10 || ^12 || >=14} engines: {node: ^10 || ^12 || >=14}

View file

@ -35,6 +35,10 @@ sequenceDiagram
Bob-->>John: Jolly good! Bob-->>John: Jolly good!
``` ```
```math
\int_^1 f(x) dx
```
```abc ```abc
K:F K:F
!f!(fgag-g2c2)| !f!(fgag-g2c2)|

View file

@ -33,4 +33,22 @@ this $\LaTeX$
$$ $$
\KaTeX \KaTeX
$$ $$
```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail...
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```
```math
\int_^1 f(x) dx
```