Skip to content

Instantly share code, notes, and snippets.

@weakish
Created August 15, 2022 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weakish/a84a394d78b9b6268e2152cbcce1f153 to your computer and use it in GitHub Desktop.
Save weakish/a84a394d78b9b6268e2152cbcce1f153 to your computer and use it in GitHub Desktop.
astro page layout, no css, no javascript, pure html
---
const { title, lang, links } = Astro.props.frontmatter ?? Astro.props
const raw = Astro.props.rawContent()
---
<html lang={lang ?? 'en'}>
<head>
<link rel="icon" href="data:,">
<title>{title ?? 'Astro 1kB'}</title>
</head>
<body>
<pre style="font:unset">
{raw ?? <slot />}
</pre>
<footer>
<h2 style="font-size:unset">Links</h2>
{links.map((link) => (
<>[{link.text}]: <a href={link.url}>{link.url}</a><br /></>
))}
</footer>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment