Compare commits
No commits in common. "29b1fa4afbdfb3ee6df294b8160af78c344b70c3" and "e72c80197bbcb279a43f4eef81d5ed5a7c13d853" have entirely different histories.
29b1fa4afb
...
e72c80197b
9 changed files with 26 additions and 318 deletions
|
@ -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()],
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
|
104
pnpm-lock.yaml
generated
104
pnpm-lock.yaml
generated
|
@ -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)
|
||||
|
|
|
@ -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 && <Image src={authorAvatar} alt={`avatar of ${authorName}`} width=16 height=16 />}
|
||||
<span>{authorName} @ </span>
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
---
|
||||
const { icon, type = 'info'} = Astro.props;
|
||||
---
|
||||
<div class={`callout callout-${type}`}>
|
||||
{icon && <span class="callout-icon">{icon}</span>}
|
||||
<div class="callout-content">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.callout {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 1rem;
|
||||
margin: 1rem auto;
|
||||
background-color: var(--callout-bg, #f0f0f0);
|
||||
color: var(--callout-text);
|
||||
}
|
||||
|
||||
.callout-icon {
|
||||
margin-right: 0.5rem;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.callout-content {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.callout-info {
|
||||
--callout-bg: var(--terminal-green);
|
||||
--callout-text: #2e3440;
|
||||
}
|
||||
|
||||
.callout-warning {
|
||||
--callout-bg: var(--terminal-yellow);
|
||||
--callout-text: #2e3440;
|
||||
}
|
||||
|
||||
.callout-danger {
|
||||
--callout-bg: var(--terminal-red);
|
||||
--callout-text: #111;
|
||||
}
|
||||
</style>
|
|
@ -1,4 +1,4 @@
|
|||
import { z, reference } from 'astro:content';
|
||||
import { z } from 'astro:content';
|
||||
|
||||
export const posts = ({ image }) => z.object({
|
||||
title: z.string(),
|
||||
|
@ -8,5 +8,5 @@ export const posts = ({ image }) => z.object({
|
|||
categories: z.array(z.string()).default(['uncategorized']),
|
||||
tags: z.array(z.string()).optional(),
|
||||
cover: image().optional(),
|
||||
author: reference('authors').optional(),
|
||||
author: z.string().optional(),
|
||||
});
|
|
@ -1,153 +0,0 @@
|
|||
---
|
||||
title: "Markdown Syntax Example"
|
||||
pubDate: '2023-07-15T12:00:00Z'
|
||||
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
tags: ["markdown", "css", "html", "sample"]
|
||||
---
|
||||
import Callout from '/src/components/shortcodes/Callout.astro';
|
||||
|
||||
This article offers a sample of basic and extended Markdown formatting that can be used, also it shows how some basic HTML elements are decorated.
|
||||
|
||||
## Theme Specifics
|
||||
This theme came with a set of shortcodes that can be used to enhance the Markdown experience. These shortcodes are located in the `/src/components/shortcodes` directory and can be used to add custom functionality or styling to your Markdown content.
|
||||
|
||||
To use these shortcodes, you should first rename the file to a MDX (.mdx) file. Once renamed, you can use the shortcodes in your content like this:
|
||||
|
||||
```mdx
|
||||
import ExampleShortcode from '/src/components/shortcodes/ExampleShortcode.astro';
|
||||
|
||||
your content here...
|
||||
</ExampleShortcode>
|
||||
```
|
||||
|
||||
### Callouts
|
||||
You can use callouts to highlight important information or warnings in your content. Callouts are styled boxes that draw attention to specific parts of the text.
|
||||
<Callout icon='💁' type="info">
|
||||
This is an informational callout. It can be used to provide additional context or tips.
|
||||
</Callout>
|
||||
<Callout type="warning">
|
||||
This is a warning callout. Use it to alert users about potential issues or important notes.
|
||||
</Callout>
|
||||
<Callout type="danger">
|
||||
This is an error callout. It should be used to indicate critical issues that need immediate attention.
|
||||
</Callout>
|
||||
|
||||
```mdx
|
||||
<Callout icon='💁' type="info">
|
||||
This is an informational callout. It can be used to provide additional context or tips.
|
||||
</Callout>
|
||||
<Callout type="warning">
|
||||
This is a warning callout. Use it to alert users about potential issues or important notes.
|
||||
</Callout>
|
||||
<Callout type="danger">
|
||||
This is an error callout. It should be used to indicate critical issues that need immediate attention.
|
||||
</Callout>
|
||||
```
|
||||
|
||||
|
||||
## Headings
|
||||
|
||||
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
|
||||
|
||||
# H1
|
||||
|
||||
## H2
|
||||
|
||||
### H3
|
||||
|
||||
#### H4
|
||||
|
||||
##### H5
|
||||
|
||||
###### H6
|
||||
|
||||
## Paragraph
|
||||
|
||||
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
|
||||
|
||||
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
|
||||
|
||||
## Blockquotes
|
||||
|
||||
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
|
||||
|
||||
### Blockquote without attribution
|
||||
|
||||
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
|
||||
> **Note** that you can use _Markdown syntax_ within a blockquote.
|
||||
|
||||
### Blockquote with attribution
|
||||
|
||||
> Don't communicate by sharing memory, share memory by communicating.<br/>
|
||||
> — <cite>Rob Pike[^1]</cite>
|
||||
|
||||
[^1]: The above quote is excerpted from Rob Pike's [talk `about` nothing](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
||||
|
||||
## Tables
|
||||
|
||||
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
|
||||
|
||||
| Name | Age |
|
||||
| ----- | --- |
|
||||
| Bob | 27 |
|
||||
| Alice | 23 |
|
||||
|
||||
### Inline Markdown within tables
|
||||
|
||||
| Italics | Bold | Code |
|
||||
| --------- | -------- | ------ |
|
||||
| _italics_ | **bold** | `code` |
|
||||
|
||||
## Code Blocks
|
||||
|
||||
### Code block with backticks
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
|
||||
|
||||
H<sub>2</sub>O
|
||||
|
||||
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||
|
||||
Press <kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd> to end the session.
|
||||
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
|
@ -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}
|
||||
>
|
||||
<h1 class="title">{entry.data.title}</h1>
|
||||
<AuthorInfo data={authorData} />
|
||||
<AuthorInfo id={authorId} />
|
||||
<span class="date">{new Date(entry.data.pubDate).toISOString().split('T')[0]}</span>
|
||||
<div class="content">
|
||||
<Content />
|
||||
|
@ -60,4 +60,3 @@ const cover = customFeaturedImage || matchedImage_src?.src || firstImageURL || `
|
|||
</div>
|
||||
|
||||
</Layout>
|
||||
|
||||
|
|
|
@ -52,16 +52,7 @@ export async function GET(context) {
|
|||
},
|
||||
sanitize({ dropElements: ["script", "style"] }),
|
||||
]);
|
||||
|
||||
// Make sure each feed item has required properties with proper formatting
|
||||
feedItems.push({
|
||||
title: post.data.title,
|
||||
description: post.data.description || '',
|
||||
pubDate: post.data.pubDate,
|
||||
link: `${baseUrl}/post/${post.slug}`,
|
||||
content,
|
||||
});
|
||||
|
||||
feedItems.push({ ...post.data, link: `/post/${post.slug}/`, content });
|
||||
}
|
||||
|
||||
// Return our RSS feed XML response.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue