[ci] format
This commit is contained in:
parent
823d55fe46
commit
bababd8461
3 changed files with 4 additions and 6 deletions
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
title: "Markdown + Tailwind"
|
||||
title: 'Markdown + Tailwind'
|
||||
setup: |
|
||||
import Button from '../components/Button.astro';
|
||||
import Button from '../components/Button.astro';
|
||||
---
|
||||
|
||||
<div class="grid place-items-center h-screen content-center">
|
||||
<Button>Tailwind Button in Markdown!</Button>
|
||||
<a href="/" class="p-4 underline">Go home...</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,6 @@ import { getOutFile, getOutFolder, getOutRoot } from './common.js';
|
|||
import type { PageBuildData, StaticBuildOptions } from './types';
|
||||
import { getTimeStat } from './util.js';
|
||||
|
||||
|
||||
// Render is usually compute, which Node.js can't parallelize well.
|
||||
// In real world testing, dropping from 10->1 showed a notiable perf
|
||||
// improvement. In the future, we can revisit a smarter parallel
|
||||
|
|
|
@ -46,7 +46,7 @@ export default function markdown({ config }: AstroPluginOptions): Plugin {
|
|||
const filename = normalizeFilename(id);
|
||||
const fileUrl = new URL(`file://${filename}`);
|
||||
const isPage = fileUrl.pathname.startsWith(config.pages.pathname);
|
||||
const hasInjectedScript = (isPage && config._ctx.scripts.some((s) => s.stage === 'page-ssr'));
|
||||
const hasInjectedScript = isPage && config._ctx.scripts.some((s) => s.stage === 'page-ssr');
|
||||
|
||||
// Extract special frontmatter keys
|
||||
const { layout = '', components = '', setup = '', ...content } = frontmatter;
|
||||
|
@ -68,7 +68,6 @@ ${setup}`.trim();
|
|||
astroResult = `${prelude}\n${astroResult}`;
|
||||
}
|
||||
|
||||
|
||||
// Transform from `.astro` to valid `.ts`
|
||||
let { code: tsResult } = await transform(astroResult, {
|
||||
pathname: fileUrl.pathname.substr(config.projectRoot.pathname.length - 1),
|
||||
|
|
Loading…
Reference in a new issue