diff --git a/astro.config.mjs b/astro.config.mjs
index ea1607a..d6c791c 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -3,7 +3,6 @@ import { defineConfig } from 'astro/config';
import sitemap from '@astrojs/sitemap';
import mdx from '@astrojs/mdx';
-import remarkToc from 'remark-toc';
import cloudflare from '@astrojs/cloudflare';
@@ -20,10 +19,7 @@ export default defineConfig({
shikiConfig: {
theme: 'nord',
wrap: true
- },
- remarkPlugins: [
- [remarkToc, { heading: 'Contents', maxDepth: 3 }]
- ]
+ }
},
integrations: [sitemap(), mdx()],
diff --git a/package.json b/package.json
index c42ec2d..e72833f 100644
--- a/package.json
+++ b/package.json
@@ -11,15 +11,14 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/cloudflare": "^12.5.4",
+ "@astrojs/cloudflare": "^12.5.2",
"@astrojs/mdx": "^4.2.6",
- "@astrojs/node": "^9.2.2",
+ "@astrojs/node": "^9.2.1",
"@astrojs/rss": "^4.0.1",
"@astrojs/sitemap": "^3.3.1",
"@fontsource-variable/jetbrains-mono": "^5.2.5",
"astro": "^5.2.5",
"ico-endec": "^0.1.6",
- "remark-toc": "^9.0.0",
"sharp": "^0.34.1",
"ultrahtml": "^1.6.0"
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 69bc3ba..4e77c2e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -9,14 +9,14 @@ importers:
.:
dependencies:
'@astrojs/cloudflare':
- specifier: ^12.5.4
- version: 12.5.4(@types/node@22.15.3)(astro@5.7.10(@azure/identity@4.9.1)(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(yaml@2.7.1))(yaml@2.7.1)
+ specifier: ^12.5.2
+ version: 12.5.2(@types/node@22.15.3)(astro@5.7.10(@azure/identity@4.9.1)(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(yaml@2.7.1))(yaml@2.7.1)
'@astrojs/mdx':
specifier: ^4.2.6
version: 4.2.6(astro@5.7.10(@azure/identity@4.9.1)(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(yaml@2.7.1))
'@astrojs/node':
- specifier: ^9.2.2
- version: 9.2.2(astro@5.7.10(@azure/identity@4.9.1)(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(yaml@2.7.1))
+ specifier: ^9.2.1
+ version: 9.2.1(astro@5.7.10(@azure/identity@4.9.1)(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(yaml@2.7.1))
'@astrojs/rss':
specifier: ^4.0.1
version: 4.0.11
@@ -32,9 +32,6 @@ importers:
ico-endec:
specifier: ^0.1.6
version: 0.1.6
- remark-toc:
- specifier: ^9.0.0
- version: 9.0.0
sharp:
specifier: ^0.34.1
version: 0.34.1
@@ -51,8 +48,8 @@ importers:
packages:
- '@astrojs/cloudflare@12.5.4':
- resolution: {integrity: sha512-WKUeMP2tIbddEu0tlVEPj8o9m/8CJB6who3a3jupuIyR56ltmW924ZOMYtp/C9uxH7KeDJXrMszRj3LHs9U97w==}
+ '@astrojs/cloudflare@12.5.2':
+ resolution: {integrity: sha512-zhqBJmy0zXqpniWuAbpWY6CCNdkq3Olm2LMHv0lryvY6CUFcZbDzTK225zgz//r5zPj8ty1qbvWRnXgCaiaaYQ==}
peerDependencies:
astro: ^5.0.0
@@ -71,8 +68,8 @@ packages:
peerDependencies:
astro: ^5.0.0
- '@astrojs/node@9.2.2':
- resolution: {integrity: sha512-PtLPuuojmcl9O3CEvXqL/D+wB4x5DlbrGOvP0MeTAh/VfKFprYAzgw1+45xsnTO+QvPWb26l1cT+ZQvvohmvMw==}
+ '@astrojs/node@9.2.1':
+ resolution: {integrity: sha512-kEHLB37ooW91p7FLGalqa3jVQRIafntfKiZgCnjN1lEYw+j8NP6VJHQbLHmzzbtKUI0J+srGiTnGZmaHErHE5w==}
peerDependencies:
astro: ^5.3.0
@@ -1025,9 +1022,6 @@ packages:
'@types/tmp@0.0.33':
resolution: {integrity: sha512-gVC1InwyVrO326wbBZw+AO3u2vRXz/iRWq9jYhpG4W8LXyIgDv3ZmcLQ5Q4Gs+gFMyqx+viFoFT+l3p61QFCmQ==}
- '@types/ungap__structured-clone@1.2.0':
- resolution: {integrity: sha512-ZoaihZNLeZSxESbk9PUAPZOlSpcKx81I1+4emtULDVmBLkYutTcMlCj2K9VNlf9EWODxdO6gkAqEaLorXwZQVA==}
-
'@types/unist@2.0.11':
resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==}
@@ -2130,9 +2124,6 @@ packages:
mdast-util-to-string@4.0.0:
resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==}
- mdast-util-toc@7.1.0:
- resolution: {integrity: sha512-2TVKotOQzqdY7THOdn2gGzS9d1Sdd66bvxUyw3aNpWfcPXCLYSJCCgfPy30sEtuzkDraJgqF35dzgmz6xlvH/w==}
-
mdn-data@2.12.2:
resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==}
@@ -2631,9 +2622,6 @@ packages:
remark-stringify@11.0.0:
resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==}
- remark-toc@9.0.0:
- resolution: {integrity: sha512-KJ9txbo33GjDAV1baHFze7ij4G8c7SGYoY8Kzsm2gzFpbhL/bSoVpMMzGa3vrNDSWASNd/3ppAqL7cP2zD6JIA==}
-
require-directory@2.1.1:
resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}
engines: {node: '>=0.10.0'}
@@ -3120,46 +3108,6 @@ packages:
yaml:
optional: true
- vite@6.3.5:
- resolution: {integrity: sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==}
- engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
- hasBin: true
- peerDependencies:
- '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0
- jiti: '>=1.21.0'
- less: '*'
- lightningcss: ^1.21.0
- sass: '*'
- sass-embedded: '*'
- stylus: '*'
- sugarss: '*'
- terser: ^5.16.0
- tsx: ^4.8.1
- yaml: ^2.4.2
- peerDependenciesMeta:
- '@types/node':
- optional: true
- jiti:
- optional: true
- less:
- optional: true
- lightningcss:
- optional: true
- sass:
- optional: true
- sass-embedded:
- optional: true
- stylus:
- optional: true
- sugarss:
- optional: true
- terser:
- optional: true
- tsx:
- optional: true
- yaml:
- optional: true
-
vitefu@1.0.6:
resolution: {integrity: sha512-+Rex1GlappUyNN6UfwbVZne/9cYC4+R2XDk9xkNXBKMw6HQagdX9PgZ8V2v1WUSK1wfBLp7qbI1+XSNIlB1xmA==}
peerDependencies:
@@ -3304,14 +3252,14 @@ packages:
snapshots:
- '@astrojs/cloudflare@12.5.4(@types/node@22.15.3)(astro@5.7.10(@azure/identity@4.9.1)(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(yaml@2.7.1))(yaml@2.7.1)':
+ '@astrojs/cloudflare@12.5.2(@types/node@22.15.3)(astro@5.7.10(@azure/identity@4.9.1)(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(yaml@2.7.1))(yaml@2.7.1)':
dependencies:
'@astrojs/internal-helpers': 0.6.1
'@astrojs/underscore-redirects': 0.6.1
'@cloudflare/workers-types': 4.20250510.0
astro: 5.7.10(@azure/identity@4.9.1)(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(yaml@2.7.1)
tinyglobby: 0.2.13
- vite: 6.3.5(@types/node@22.15.3)(yaml@2.7.1)
+ vite: 6.3.4(@types/node@22.15.3)(yaml@2.7.1)
wrangler: 4.14.4(@cloudflare/workers-types@4.20250510.0)
transitivePeerDependencies:
- '@types/node'
@@ -3377,7 +3325,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@astrojs/node@9.2.2(astro@5.7.10(@azure/identity@4.9.1)(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(yaml@2.7.1))':
+ '@astrojs/node@9.2.1(astro@5.7.10(@azure/identity@4.9.1)(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(yaml@2.7.1))':
dependencies:
'@astrojs/internal-helpers': 0.6.1
astro: 5.7.10(@azure/identity@4.9.1)(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(yaml@2.7.1)
@@ -4220,8 +4168,6 @@ snapshots:
'@types/tmp@0.0.33': {}
- '@types/ungap__structured-clone@1.2.0': {}
-
'@types/unist@2.0.11': {}
'@types/unist@3.0.3': {}
@@ -5620,16 +5566,6 @@ snapshots:
dependencies:
'@types/mdast': 4.0.4
- mdast-util-toc@7.1.0:
- dependencies:
- '@types/mdast': 4.0.4
- '@types/ungap__structured-clone': 1.2.0
- '@ungap/structured-clone': 1.3.0
- github-slugger: 2.0.0
- mdast-util-to-string: 4.0.0
- unist-util-is: 6.0.0
- unist-util-visit: 5.0.0
-
mdn-data@2.12.2: {}
merge-stream@2.0.0: {}
@@ -6351,11 +6287,6 @@ snapshots:
mdast-util-to-markdown: 2.1.2
unified: 11.0.5
- remark-toc@9.0.0:
- dependencies:
- '@types/mdast': 4.0.4
- mdast-util-toc: 7.1.0
-
require-directory@2.1.1: {}
requires-port@1.0.0: {}
@@ -6887,19 +6818,6 @@ snapshots:
fsevents: 2.3.3
yaml: 2.7.1
- vite@6.3.5(@types/node@22.15.3)(yaml@2.7.1):
- dependencies:
- esbuild: 0.25.4
- fdir: 6.4.4(picomatch@4.0.2)
- picomatch: 4.0.2
- postcss: 8.5.3
- rollup: 4.40.1
- tinyglobby: 0.2.13
- optionalDependencies:
- '@types/node': 22.15.3
- fsevents: 2.3.3
- yaml: 2.7.1
-
vitefu@1.0.6(vite@6.3.4(@types/node@22.15.3)(yaml@2.7.1)):
optionalDependencies:
vite: 6.3.4(@types/node@22.15.3)(yaml@2.7.1)
diff --git a/src/components/helper/authors/Info.astro b/src/components/helper/authors/Info.astro
index ed37cb0..806a143 100644
--- a/src/components/helper/authors/Info.astro
+++ b/src/components/helper/authors/Info.astro
@@ -3,13 +3,14 @@ import {Image} from "astro:assets";
import {getEntry} from "astro:content";
import {siteConfig} from "../../../config";
-const { data } = Astro.props;
+const { id } = Astro.props;
// Get author data
-const authorAvatar = data?.data.mcplayerid ? `/images/avatars/${data.id}.png` : null;
-const authorName = data ? data.data.name : null;
+const authorData = await getEntry('authors', id || '');
+const authorAvatar = authorData?.data.mcplayerid ? `/images/avatars/${id}.png` : null;
+const authorName = authorData ? authorData.data.name : null;
---
-{(siteConfig.displayAvatar && data) &&
+{(siteConfig.displayAvatar && authorData) &&
<>
{authorAvatar &&
Test
- - -``` - - -## List Types - -### Ordered List - -1. First item -2. Second item -3. Third item - -### Unordered List - -- List item -- Another item -- And another item - -### Nested list - -- Fruit - - Apple - - Orange - - Banana -- Dairy - - Milk - - Cheese - -## Other Elements — abbr, sub, sup, kbd, mark - -GIF is a bitmap image format. - -H2O - -Xn + Yn = Zn - -Press CTRL+ALT+Delete to end the session. - -Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. \ No newline at end of file diff --git a/src/pages/post/[...slug].astro b/src/pages/post/[...slug].astro index da2b02a..886f4b2 100644 --- a/src/pages/post/[...slug].astro +++ b/src/pages/post/[...slug].astro @@ -19,10 +19,10 @@ const { entry } = Astro.props; const { Content } = await entry.render(); const noscript = siteConfig.noClientJavaScript const slug = Astro.params.slug; -const author = entry.data.author || {collection: 'authors', id: siteConfig.defaultAuthor.id}; +const authorId = entry.data.author || siteConfig.defaultAuthor.id; // Get author data -const authorData = await getEntry(author); +const authorData = await getEntry('authors', authorId); const authorInfo = authorData ? authorData.data : siteConfig.defaultAuthor; // get featured image and use it as og:image @@ -46,7 +46,7 @@ const cover = customFeaturedImage || matchedImage_src?.src || firstImageURL || ` author={authorInfo.name} >