diff --git a/.changeset/metal-bugs-drive.md b/.changeset/metal-bugs-drive.md
new file mode 100644
index 000000000..16b4f6b19
--- /dev/null
+++ b/.changeset/metal-bugs-drive.md
@@ -0,0 +1,17 @@
+---
+'@astrojs/markdoc': minor
+'astro': patch
+---
+
+Remove the auto-generated `$entry` variable for Markdoc entries. To access frontmatter as a variable, you can pass `entry.data` as a prop where you render your content:
+
+```astro
+---
+import { getEntry } from 'astro:content';
+
+const entry = await getEntry('docs', 'why-markdoc');
+const { Content } = await entry.render();
+---
+
+
+```
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts
index c494cf127..c3372ec25 100644
--- a/packages/astro/src/@types/astro.ts
+++ b/packages/astro/src/@types/astro.ts
@@ -1270,8 +1270,9 @@ export interface ContentEntryType {
getRenderModule?(
this: rollup.PluginContext,
params: {
+ contents: string;
+ fileUrl: URL;
viteId: string;
- entry: ContentEntryModule;
}
): rollup.LoadResult | Promise;
contentModuleTypes?: string;
diff --git a/packages/astro/src/content/types-generator.ts b/packages/astro/src/content/types-generator.ts
index ee4c99077..538b267ff 100644
--- a/packages/astro/src/content/types-generator.ts
+++ b/packages/astro/src/content/types-generator.ts
@@ -11,7 +11,7 @@ import { info, warn, type LogOptions } from '../core/logger/core.js';
import { isRelativePath } from '../core/path.js';
import { CONTENT_TYPES_FILE, VIRTUAL_MODULE_ID } from './consts.js';
import {
- getContentEntryConfigByExtMap,
+ getEntryConfigByExtMap,
getContentEntryIdAndSlug,
getContentPaths,
getDataEntryExts,
@@ -74,7 +74,7 @@ export async function createContentTypesGenerator({
}: CreateContentGeneratorParams) {
const collectionEntryMap: CollectionEntryMap = {};
const contentPaths = getContentPaths(settings.config, fs);
- const contentEntryConfigByExt = getContentEntryConfigByExtMap(settings);
+ const contentEntryConfigByExt = getEntryConfigByExtMap(settings.contentEntryTypes);
const contentEntryExts = [...contentEntryConfigByExt.keys()];
const dataEntryExts = getDataEntryExts(settings);
diff --git a/packages/astro/src/content/utils.ts b/packages/astro/src/content/utils.ts
index 686176096..40b2ab9e7 100644
--- a/packages/astro/src/content/utils.ts
+++ b/packages/astro/src/content/utils.ts
@@ -10,6 +10,7 @@ import type {
AstroConfig,
AstroSettings,
ContentEntryType,
+ DataEntryType,
ImageInputFormat,
} from '../@types/astro.js';
import { VALID_INPUT_FORMATS } from '../assets/consts.js';
@@ -172,9 +173,11 @@ export function getDataEntryExts(settings: Pick
return settings.dataEntryTypes.map((t) => t.extensions).flat();
}
-export function getContentEntryConfigByExtMap(settings: Pick) {
- const map: Map = new Map();
- for (const entryType of settings.contentEntryTypes) {
+export function getEntryConfigByExtMap(
+ entryTypes: TEntryType[]
+): Map {
+ const map: Map = new Map();
+ for (const entryType of entryTypes) {
for (const ext of entryType.extensions) {
map.set(ext, entryType);
}
diff --git a/packages/astro/src/content/vite-plugin-content-imports.ts b/packages/astro/src/content/vite-plugin-content-imports.ts
index c0d0571e3..899ce02cd 100644
--- a/packages/astro/src/content/vite-plugin-content-imports.ts
+++ b/packages/astro/src/content/vite-plugin-content-imports.ts
@@ -5,6 +5,7 @@ import type { PluginContext } from 'rollup';
import { pathToFileURL } from 'url';
import type { Plugin } from 'vite';
import type {
+ AstroConfig,
AstroSettings,
ContentEntryModule,
ContentEntryType,
@@ -16,7 +17,7 @@ import { AstroError } from '../core/errors/errors.js';
import { escapeViteEnvReferences, getFileInfo } from '../vite-plugin-utils/index.js';
import { CONTENT_FLAG, DATA_FLAG } from './consts.js';
import {
- getContentEntryConfigByExtMap,
+ getEntryConfigByExtMap,
getContentEntryExts,
getContentEntryIdAndSlug,
getContentPaths,
@@ -30,7 +31,6 @@ import {
parseEntrySlug,
reloadContentConfigObserver,
type ContentConfig,
- type ContentPaths,
} from './utils.js';
function getContentRendererByViteId(
@@ -70,14 +70,9 @@ export function astroContentImportPlugin({
const contentEntryExts = getContentEntryExts(settings);
const dataEntryExts = getDataEntryExts(settings);
- const contentEntryConfigByExt = getContentEntryConfigByExtMap(settings);
-
- const dataEntryExtToParser: Map = new Map();
- for (const entryType of settings.dataEntryTypes) {
- for (const ext of entryType.extensions) {
- dataEntryExtToParser.set(ext, entryType.getEntryInfo);
- }
- }
+ const contentEntryConfigByExt = getEntryConfigByExtMap(settings.contentEntryTypes);
+ const dataEntryConfigByExt = getEntryConfigByExtMap(settings.dataEntryTypes);
+ const { contentDir } = contentPaths;
const plugins: Plugin[] = [
{
@@ -89,9 +84,9 @@ export function astroContentImportPlugin({
// This cache only exists for the `render()` function specific to content.
const { id, data, collection, _internal } = await getDataEntryModule({
fileId,
- dataEntryExtToParser,
- contentPaths,
- settings,
+ entryConfigByExt: dataEntryConfigByExt,
+ contentDir,
+ config: settings.config,
fs,
pluginContext: this,
});
@@ -109,8 +104,12 @@ export const _internal = {
return code;
} else if (hasContentFlag(viteId, CONTENT_FLAG)) {
const fileId = viteId.split('?')[0];
- const { id, slug, collection, body, data, _internal } = await setContentEntryModuleCache({
+ const { id, slug, collection, body, data, _internal } = await getContentEntryModule({
fileId,
+ entryConfigByExt: contentEntryConfigByExt,
+ contentDir,
+ config: settings.config,
+ fs,
pluginContext: this,
});
@@ -170,152 +169,153 @@ export const _internal = {
if (settings.contentEntryTypes.some((t) => t.getRenderModule)) {
plugins.push({
name: 'astro:content-render-imports',
- async transform(_, viteId) {
+ async transform(contents, viteId) {
const contentRenderer = getContentRendererByViteId(viteId, settings);
if (!contentRenderer) return;
- const { fileId } = getFileInfo(viteId, settings.config);
- const entry = await getContentEntryModuleFromCache(fileId);
- if (!entry) {
- // Cached entry must exist (or be in-flight) when importing the module via content collections.
- // This is ensured by the `astro:content-imports` plugin.
- throw new AstroError({
- ...AstroErrorData.UnknownContentCollectionError,
- message: `Unable to render ${JSON.stringify(
- fileId
- )}. Did you import this module directly without using a content collection query?`,
- });
- }
-
- return contentRenderer.bind(this)({ entry, viteId });
+ const fileId = viteId.split('?')[0];
+ return contentRenderer.bind(this)({ viteId, contents, fileUrl: pathToFileURL(fileId) });
},
});
}
- /**
- * There are two content collection plugins that depend on the same entry data:
- * - `astro:content-imports` - creates module containing the `getCollection()` result.
- * - `astro:content-render-imports` - creates module containing the `collectionEntry.render()` result.
- *
- * We could run the same transforms to generate the slug and parsed data in each plugin,
- * though this would run the user's collection schema _twice_ for each entry.
- *
- * Instead, we've implemented a cache for all content entry data. To avoid race conditions,
- * this may store either the module itself or a queue of promises awaiting this module.
- * See the implementations of `getContentEntryModuleFromCache` and `setContentEntryModuleCache`.
- */
- const contentEntryModuleByIdCache = new Map<
- string,
- ContentEntryModule | AwaitingCacheResultQueue
- >();
- type AwaitingCacheResultQueue = {
- awaitingQueue: ((val: ContentEntryModule) => void)[];
- };
- function isAwaitingQueue(
- cacheEntry: ReturnType
- ): cacheEntry is AwaitingCacheResultQueue {
- return typeof cacheEntry === 'object' && cacheEntry != null && 'awaitingQueue' in cacheEntry;
- }
-
- function getContentEntryModuleFromCache(id: string): Promise {
- const cacheEntry = contentEntryModuleByIdCache.get(id);
- // It's possible to request an entry while `setContentEntryModuleCache` is still
- // setting that entry. In this case, queue a promise for `setContentEntryModuleCache`
- // to resolve once it is complete.
- if (isAwaitingQueue(cacheEntry)) {
- return new Promise((resolve, reject) => {
- cacheEntry.awaitingQueue.push(resolve);
- });
- } else if (cacheEntry) {
- return Promise.resolve(cacheEntry);
- }
- return Promise.resolve(undefined);
- }
-
- async function setContentEntryModuleCache({
- fileId,
- pluginContext,
- }: {
- fileId: string;
- pluginContext: PluginContext;
- }): Promise {
- // Create a queue so, if `getContentEntryModuleFromCache` is called
- // while this function is running, we can resolve all requests
- // in the `awaitingQueue` with the result.
- contentEntryModuleByIdCache.set(fileId, { awaitingQueue: [] });
-
- const contentConfig = await getContentConfigFromGlobal();
- const rawContents = await fs.promises.readFile(fileId, 'utf-8');
- const fileExt = extname(fileId);
- if (!contentEntryConfigByExt.has(fileExt)) {
- throw new AstroError({
- ...AstroErrorData.UnknownContentCollectionError,
- message: `No parser found for content entry ${JSON.stringify(
- fileId
- )}. Did you apply an integration for this file type?`,
- });
- }
- const contentEntryConfig = contentEntryConfigByExt.get(fileExt)!;
- const {
- rawData,
- body,
- slug: frontmatterSlug,
- data: unvalidatedData,
- } = await contentEntryConfig.getEntryInfo({
- fileUrl: pathToFileURL(fileId),
- contents: rawContents,
- });
- const entry = pathToFileURL(fileId);
- const { contentDir } = contentPaths;
- const collection = getEntryCollectionName({ entry, contentDir });
- if (collection === undefined)
- throw new AstroError(AstroErrorData.UnknownContentCollectionError);
-
- const { id, slug: generatedSlug } = getContentEntryIdAndSlug({ entry, contentDir, collection });
-
- const _internal = { filePath: fileId, rawData: rawData };
- // TODO: move slug calculation to the start of the build
- // to generate a performant lookup map for `getEntryBySlug`
- const slug = parseEntrySlug({
- id,
- collection,
- generatedSlug,
- frontmatterSlug,
- });
-
- const collectionConfig = contentConfig?.collections[collection];
- let data = collectionConfig
- ? await getEntryData(
- { id, collection, _internal, unvalidatedData },
- collectionConfig,
- pluginContext,
- settings.config
- )
- : unvalidatedData;
-
- const contentEntryModule: ContentEntryModule = {
- id,
- slug,
- collection,
- data,
- body,
- _internal,
- };
-
- const cacheEntry = contentEntryModuleByIdCache.get(fileId);
- // Pass the entry to all promises awaiting this result
- if (isAwaitingQueue(cacheEntry)) {
- for (const resolve of cacheEntry.awaitingQueue) {
- resolve(contentEntryModule);
- }
- }
- contentEntryModuleByIdCache.set(fileId, contentEntryModule);
- return contentEntryModule;
- }
-
return plugins;
}
+type GetEntryModuleParams = {
+ fs: typeof fsMod;
+ fileId: string;
+ contentDir: URL;
+ pluginContext: PluginContext;
+ entryConfigByExt: Map;
+ config: AstroConfig;
+};
+
+async function getContentEntryModule(
+ params: GetEntryModuleParams
+): Promise {
+ const { fileId, contentDir, pluginContext, config } = params;
+ const { collectionConfig, entryConfig, entry, rawContents, collection } =
+ await getEntryModuleBaseInfo(params);
+
+ const {
+ rawData,
+ data: unvalidatedData,
+ body,
+ slug: frontmatterSlug,
+ } = await entryConfig.getEntryInfo({
+ fileUrl: pathToFileURL(fileId),
+ contents: rawContents,
+ });
+ const _internal = { filePath: fileId, rawData };
+ const { id, slug: generatedSlug } = getContentEntryIdAndSlug({ entry, contentDir, collection });
+
+ const slug = parseEntrySlug({
+ id,
+ collection,
+ generatedSlug,
+ frontmatterSlug,
+ });
+
+ const data = collectionConfig
+ ? await getEntryData(
+ { id, collection, _internal, unvalidatedData },
+ collectionConfig,
+ pluginContext,
+ config
+ )
+ : unvalidatedData;
+
+ const contentEntryModule: ContentEntryModule = {
+ id,
+ slug,
+ collection,
+ data,
+ body,
+ _internal,
+ };
+
+ return contentEntryModule;
+}
+
+async function getDataEntryModule(
+ params: GetEntryModuleParams
+): Promise {
+ const { fileId, contentDir, pluginContext, config } = params;
+ const { collectionConfig, entryConfig, entry, rawContents, collection } =
+ await getEntryModuleBaseInfo(params);
+
+ const { rawData = '', data: unvalidatedData } = await entryConfig.getEntryInfo({
+ fileUrl: pathToFileURL(fileId),
+ contents: rawContents,
+ });
+ const _internal = { filePath: fileId, rawData };
+ const id = getDataEntryId({ entry, contentDir, collection });
+
+ const data = collectionConfig
+ ? await getEntryData(
+ { id, collection, _internal, unvalidatedData },
+ collectionConfig,
+ pluginContext,
+ config
+ )
+ : unvalidatedData;
+
+ const dataEntryModule: DataEntryModule = {
+ id,
+ collection,
+ data,
+ _internal,
+ };
+
+ return dataEntryModule;
+}
+
+// Shared logic for `getContentEntryModule` and `getDataEntryModule`
+// Extracting to a helper was easier that conditionals and generics :)
+async function getEntryModuleBaseInfo({
+ fileId,
+ entryConfigByExt,
+ contentDir,
+ fs,
+}: GetEntryModuleParams) {
+ const contentConfig = await getContentConfigFromGlobal();
+ let rawContents;
+ try {
+ rawContents = await fs.promises.readFile(fileId, 'utf-8');
+ } catch (e) {
+ throw new AstroError({
+ ...AstroErrorData.UnknownContentCollectionError,
+ message: `Unexpected error reading entry ${JSON.stringify(fileId)}.`,
+ stack: e instanceof Error ? e.stack : undefined,
+ });
+ }
+ const fileExt = extname(fileId);
+ const entryConfig = entryConfigByExt.get(fileExt);
+
+ if (!entryConfig) {
+ throw new AstroError({
+ ...AstroErrorData.UnknownContentCollectionError,
+ message: `No parser found for data entry ${JSON.stringify(
+ fileId
+ )}. Did you apply an integration for this file type?`,
+ });
+ }
+ const entry = pathToFileURL(fileId);
+ const collection = getEntryCollectionName({ entry, contentDir });
+ if (collection === undefined) throw new AstroError(AstroErrorData.UnknownContentCollectionError);
+
+ const collectionConfig = contentConfig?.collections[collection];
+
+ return {
+ collectionConfig,
+ entry,
+ entryConfig,
+ collection,
+ rawContents,
+ };
+}
+
async function getContentConfigFromGlobal() {
const observable = globalContentConfigObserver.get();
@@ -352,68 +352,3 @@ async function getContentConfigFromGlobal() {
return contentConfig;
}
-
-type GetDataEntryModuleParams = {
- fs: typeof fsMod;
- fileId: string;
- contentPaths: Pick;
- pluginContext: PluginContext;
- dataEntryExtToParser: Map;
- settings: Pick;
-};
-
-async function getDataEntryModule({
- fileId,
- dataEntryExtToParser,
- contentPaths,
- fs,
- pluginContext,
- settings,
-}: GetDataEntryModuleParams): Promise {
- const contentConfig = await getContentConfigFromGlobal();
- let rawContents;
- try {
- rawContents = await fs.promises.readFile(fileId, 'utf-8');
- } catch (e) {
- throw new AstroError({
- ...AstroErrorData.UnknownContentCollectionError,
- message: `Unexpected error reading entry ${JSON.stringify(fileId)}.`,
- stack: e instanceof Error ? e.stack : undefined,
- });
- }
- const fileExt = extname(fileId);
- const dataEntryParser = dataEntryExtToParser.get(fileExt);
-
- if (!dataEntryParser) {
- throw new AstroError({
- ...AstroErrorData.UnknownContentCollectionError,
- message: `No parser found for data entry ${JSON.stringify(
- fileId
- )}. Did you apply an integration for this file type?`,
- });
- }
- const { data: unvalidatedData, rawData = '' } = await dataEntryParser({
- fileUrl: pathToFileURL(fileId),
- contents: rawContents,
- });
- const entry = pathToFileURL(fileId);
- const { contentDir } = contentPaths;
- const collection = getEntryCollectionName({ entry, contentDir });
- if (collection === undefined) throw new AstroError(AstroErrorData.UnknownContentCollectionError);
-
- const id = getDataEntryId({ entry, contentDir, collection });
-
- const _internal = { filePath: fileId, rawData };
-
- const collectionConfig = contentConfig?.collections[collection];
- const data = collectionConfig
- ? await getEntryData(
- { id, collection, _internal, unvalidatedData },
- collectionConfig,
- pluginContext,
- settings.config
- )
- : unvalidatedData;
-
- return { id, collection, data, _internal };
-}
diff --git a/packages/astro/src/content/vite-plugin-content-virtual-mod.ts b/packages/astro/src/content/vite-plugin-content-virtual-mod.ts
index 71d41751e..9b0a1becc 100644
--- a/packages/astro/src/content/vite-plugin-content-virtual-mod.ts
+++ b/packages/astro/src/content/vite-plugin-content-virtual-mod.ts
@@ -4,12 +4,12 @@ import { extname } from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
import pLimit from 'p-limit';
import type { Plugin } from 'vite';
-import type { AstroSettings } from '../@types/astro.js';
+import type { AstroSettings, ContentEntryType } from '../@types/astro.js';
import { AstroError, AstroErrorData } from '../core/errors/index.js';
import { rootRelativePath } from '../core/util.js';
import { VIRTUAL_MODULE_ID } from './consts.js';
import {
- getContentEntryConfigByExtMap,
+ getEntryConfigByExtMap,
getContentEntryIdAndSlug,
getContentPaths,
getDataEntryExts,
@@ -32,7 +32,7 @@ export function astroContentVirtualModPlugin({
const contentPaths = getContentPaths(settings.config);
const relContentDir = rootRelativePath(settings.config.root, contentPaths.contentDir);
- const contentEntryConfigByExt = getContentEntryConfigByExtMap(settings);
+ const contentEntryConfigByExt = getEntryConfigByExtMap(settings.contentEntryTypes);
const contentEntryExts = [...contentEntryConfigByExt.keys()];
const dataEntryExts = getDataEntryExts(settings);
@@ -92,7 +92,7 @@ export async function getStringifiedLookupMap({
root,
fs,
}: {
- contentEntryConfigByExt: ReturnType;
+ contentEntryConfigByExt: Map;
dataEntryExts: string[];
contentPaths: Pick;
root: URL;
diff --git a/packages/integrations/markdoc/README.md b/packages/integrations/markdoc/README.md
index 011f042ee..da5aeb46a 100644
--- a/packages/integrations/markdoc/README.md
+++ b/packages/integrations/markdoc/README.md
@@ -290,20 +290,6 @@ export default defineMarkdocConfig({
})
```
-### Access frontmatter and content collection information from your templates
-
-You can access content collection information from your Markdoc templates using the `$entry` variable. This includes the entry `slug`, `collection` name, and frontmatter `data` parsed by your content collection schema (if any). This example renders the `title` frontmatter property as a heading:
-
-```md
----
-title: Welcome to Markdoc 👋
----
-
-# {% $entry.data.title %}
-```
-
-The `$entry` object matches [the `CollectionEntry` type](https://docs.astro.build/en/reference/api-reference/#collection-entry-type), excluding the `.render()` property.
-
### Markdoc config
The `markdoc.config.mjs|ts` file accepts [all Markdoc configuration options](https://markdoc.dev/docs/config), including [tags](https://markdoc.dev/docs/tags) and [functions](https://markdoc.dev/docs/functions).
@@ -379,6 +365,23 @@ export default defineMarkdocConfig({
})
```
+### Access frontmatter from your Markdoc content
+
+To access frontmatter, you can pass the entry `data` property [as a variable](#pass-markdoc-variables) where you render your content:
+
+```astro
+---
+import { getEntry } from 'astro:content';
+
+const entry = await getEntry('docs', 'why-markdoc');
+const { Content } = await entry.render();
+---
+
+
+```
+
+This can now be accessed as `$frontmatter` in your Markdoc.
+
## Examples
* The [Astro Markdoc starter template](https://github.com/withastro/astro/tree/latest/examples/with-markdoc) shows how to use Markdoc files in your Astro project.
diff --git a/packages/integrations/markdoc/src/index.ts b/packages/integrations/markdoc/src/index.ts
index 0486a44b5..ef50768fe 100644
--- a/packages/integrations/markdoc/src/index.ts
+++ b/packages/integrations/markdoc/src/index.ts
@@ -11,6 +11,7 @@ import { bold, red, yellow } from 'kleur/colors';
import type * as rollup from 'rollup';
import { loadMarkdocConfig, type MarkdocConfigResult } from './load-config.js';
import { setupConfig } from './runtime.js';
+import path from 'node:path';
type SetupHookParams = HookParameters<'astro:config:setup'> & {
// `contentEntryType` is not a public API
@@ -61,10 +62,13 @@ export default function markdocIntegration(legacyConfig?: any): AstroIntegration
addContentEntryType({
extensions: ['.mdoc'],
getEntryInfo,
- async getRenderModule({ entry, viteId }) {
+ async getRenderModule({ contents, fileUrl, viteId }) {
+ const entry = getEntryInfo({ contents, fileUrl });
const ast = Markdoc.parse(entry.body);
const pluginContext = this;
- const markdocConfig = await setupConfig(userMarkdocConfig, entry);
+ const markdocConfig = await setupConfig(userMarkdocConfig);
+
+ const filePath = fileURLToPath(fileUrl);
const validationErrors = Markdoc.validate(ast, markdocConfig).filter((e) => {
return (
@@ -77,10 +81,11 @@ export default function markdocIntegration(legacyConfig?: any): AstroIntegration
});
if (validationErrors.length) {
// Heuristic: take number of newlines for `rawData` and add 2 for the `---` fences
- const frontmatterBlockOffset = entry._internal.rawData.split('\n').length + 2;
+ const frontmatterBlockOffset = entry.rawData.split('\n').length + 2;
+ const rootRelativePath = path.relative(fileURLToPath(astroConfig.root), filePath);
throw new MarkdocError({
message: [
- `**${String(entry.collection)} → ${String(entry.id)}** contains invalid content:`,
+ `**${String(rootRelativePath)}** contains invalid content:`,
...validationErrors.map((e) => `- ${e.error.message}`),
].join('\n'),
location: {
@@ -96,7 +101,7 @@ export default function markdocIntegration(legacyConfig?: any): AstroIntegration
await emitOptimizedImages(ast.children, {
astroConfig,
pluginContext,
- filePath: entry._internal.filePath,
+ filePath,
});
}
diff --git a/packages/integrations/markdoc/src/runtime.ts b/packages/integrations/markdoc/src/runtime.ts
index 5bf7e4412..a1861c68c 100644
--- a/packages/integrations/markdoc/src/runtime.ts
+++ b/packages/integrations/markdoc/src/runtime.ts
@@ -13,13 +13,9 @@ export { default as Markdoc } from '@markdoc/markdoc';
* TODO: virtual module to merge configs per-build instead of per-file?
*/
export async function setupConfig(
- userConfig: AstroMarkdocConfig,
- entry: ContentEntryModule
+ userConfig: AstroMarkdocConfig
): Promise> {
- let defaultConfig: AstroMarkdocConfig = {
- ...setupHeadingConfig(),
- variables: { entry },
- };
+ let defaultConfig: AstroMarkdocConfig = setupHeadingConfig();
if (userConfig.extends) {
for (let extension of userConfig.extends) {
diff --git a/packages/integrations/markdoc/test/fixtures/entry-prop/astro.config.mjs b/packages/integrations/markdoc/test/fixtures/variables/astro.config.mjs
similarity index 100%
rename from packages/integrations/markdoc/test/fixtures/entry-prop/astro.config.mjs
rename to packages/integrations/markdoc/test/fixtures/variables/astro.config.mjs
diff --git a/packages/integrations/markdoc/test/fixtures/entry-prop/package.json b/packages/integrations/markdoc/test/fixtures/variables/package.json
similarity index 78%
rename from packages/integrations/markdoc/test/fixtures/entry-prop/package.json
rename to packages/integrations/markdoc/test/fixtures/variables/package.json
index 149f6c35a..0ac7a3c82 100644
--- a/packages/integrations/markdoc/test/fixtures/entry-prop/package.json
+++ b/packages/integrations/markdoc/test/fixtures/variables/package.json
@@ -1,5 +1,5 @@
{
- "name": "@test/markdoc-entry-prop",
+ "name": "@test/markdoc-variables",
"version": "0.0.0",
"private": true,
"dependencies": {
diff --git a/packages/integrations/markdoc/test/fixtures/entry-prop/src/content/blog/entry.mdoc b/packages/integrations/markdoc/test/fixtures/variables/src/content/blog/entry.mdoc
similarity index 100%
rename from packages/integrations/markdoc/test/fixtures/entry-prop/src/content/blog/entry.mdoc
rename to packages/integrations/markdoc/test/fixtures/variables/src/content/blog/entry.mdoc
diff --git a/packages/integrations/markdoc/test/fixtures/entry-prop/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/variables/src/content/config.ts
similarity index 100%
rename from packages/integrations/markdoc/test/fixtures/entry-prop/src/content/config.ts
rename to packages/integrations/markdoc/test/fixtures/variables/src/content/config.ts
diff --git a/packages/integrations/markdoc/test/fixtures/entry-prop/src/pages/index.astro b/packages/integrations/markdoc/test/fixtures/variables/src/pages/index.astro
similarity index 95%
rename from packages/integrations/markdoc/test/fixtures/entry-prop/src/pages/index.astro
rename to packages/integrations/markdoc/test/fixtures/variables/src/pages/index.astro
index d14187651..a2766faf0 100644
--- a/packages/integrations/markdoc/test/fixtures/entry-prop/src/pages/index.astro
+++ b/packages/integrations/markdoc/test/fixtures/variables/src/pages/index.astro
@@ -14,6 +14,6 @@ const { Content } = await entry.render();
Astro
-
+