Try deploy
Some checks failed
Build and Deploy DAVE | DMGs Site / deploy (push) Failing after 3m22s

This commit is contained in:
2026-03-05 11:39:28 +01:00
parent ea0f471fd3
commit 3dec403492
40 changed files with 1093 additions and 117 deletions

View File

@@ -1,4 +1,9 @@
import { defineMarkdocConfig, component, nodes } from '@astrojs/markdoc/config';
import {
defineMarkdocConfig,
component,
nodes,
Markdoc,
} from '@astrojs/markdoc/config';
export default defineMarkdocConfig({
nodes: {
@@ -16,5 +21,70 @@ export default defineMarkdocConfig({
color: { type: String },
},
},
Callout: {
render: component('./src/components/content/Callout.astro'),
attributes: {
type: {
type: String,
default: 'default',
},
title: { type: String },
},
},
Figure: {
render: component('./src/components/content/Figure.astro'),
selfClosing: true,
attributes: {
src: {
type: String,
required: true,
},
alt: {
type: String,
required: true,
},
caption: { type: String },
credit: { type: String },
},
},
Sidenote: {
selfClosing: true,
attributes: {
id: {
type: String,
required: true,
},
title: {
type: String,
},
marker: {
type: String,
default: '⋄',
},
content: {
type: String,
required: true,
},
type: {
type: String,
default: 'default',
},
},
transform(node, config) {
const attrs = node.transformAttributes(config);
return new Markdoc.Tag('sup', {}, [
new Markdoc.Tag(
'a',
{
href: `#${attrs.id}`,
id: `ref-${attrs.id}`,
class: 'sidenote-ref',
style: `anchor-name: --note-${attrs.id}`,
},
[`[${attrs.marker}]`],
),
]);
},
},
},
});