Create a basic setup with Astro.
This commit is contained in:
parent
264dcac6f2
commit
1ca72f7034
|
@ -0,0 +1,11 @@
|
|||
import {defineConfig} from "astro/config";
|
||||
|
||||
/** Create an absolute path from a given relative one. */
|
||||
const toPath = (path: string) => new URL(path, import.meta.url).pathname;
|
||||
|
||||
export default defineConfig({
|
||||
outDir: toPath("./out/"),
|
||||
publicDir: toPath("./source/public"),
|
||||
srcDir: toPath("./source"),
|
||||
site: "https://driftingnebula.com",
|
||||
});
|
|
@ -0,0 +1,2 @@
|
|||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||
/// <reference types="astro/client" />
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
import "./base.scss";
|
||||
|
||||
/** Properties for the base layout. */
|
||||
export interface Props {
|
||||
frontmatter: {
|
||||
pageTitle: string;
|
||||
};
|
||||
}
|
||||
|
||||
const {frontmatter} = Astro.props;
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>{frontmatter.pageTitle}</title>
|
||||
</head>
|
||||
<body>
|
||||
<slot />
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
h1,
|
||||
h2,
|
||||
h3,
|
||||
li,
|
||||
ol,
|
||||
p,
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 62.5%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 2rem;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
import BaseLayout, {type Props as BaseProps} from "../layouts/base.astro";
|
||||
|
||||
const props: BaseProps = {
|
||||
frontmatter: {
|
||||
pageTitle: "driftingnebula",
|
||||
},
|
||||
};
|
||||
---
|
||||
|
||||
<BaseLayout {...props}>
|
||||
<h1>driftingnebula</h1>
|
||||
</BaseLayout>
|
Loading…
Reference in New Issue