Skip to content

Commit

Permalink
docs: adjust include content plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nartc committed Aug 4, 2024
1 parent e4809e7 commit 46ab671
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/astro-docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ function includeContentPlugin() {
name: 'pre-include-content',
enforce: 'pre',
transform(code, id) {
if (!id.includes('?includeContent')) return;
if (!id.includes('?includeContent') || id.includes('astro-entry')) return;

const [filePath] = id.split('?');
const fileContent = readFileSync(filePath, 'utf-8');

Expand Down

0 comments on commit 46ab671

Please sign in to comment.