diff --git a/astro.config.ts b/astro.config.ts new file mode 100644 index 0000000..b0bbfea --- /dev/null +++ b/astro.config.ts @@ -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", +}); diff --git a/source/env.d.ts b/source/env.d.ts new file mode 100644 index 0000000..7eb48df --- /dev/null +++ b/source/env.d.ts @@ -0,0 +1,2 @@ +// eslint-disable-next-line @typescript-eslint/triple-slash-reference +/// diff --git a/source/layouts/base.astro b/source/layouts/base.astro new file mode 100644 index 0000000..59989b5 --- /dev/null +++ b/source/layouts/base.astro @@ -0,0 +1,24 @@ +--- +import "./base.scss"; + +/** Properties for the base layout. */ +export interface Props { + frontmatter: { + pageTitle: string; + }; +} + +const {frontmatter} = Astro.props; +--- + + + + + + + {frontmatter.pageTitle} + + + + + diff --git a/source/layouts/base.scss b/source/layouts/base.scss new file mode 100644 index 0000000..f10c625 --- /dev/null +++ b/source/layouts/base.scss @@ -0,0 +1,18 @@ +h1, +h2, +h3, +li, +ol, +p, +ul { + margin: 0; + padding: 0; +} + +html { + font-size: 62.5%; +} + +body { + font-size: 2rem; +} diff --git a/source/pages/index.astro b/source/pages/index.astro new file mode 100644 index 0000000..230deb4 --- /dev/null +++ b/source/pages/index.astro @@ -0,0 +1,13 @@ +--- +import BaseLayout, {type Props as BaseProps} from "../layouts/base.astro"; + +const props: BaseProps = { + frontmatter: { + pageTitle: "driftingnebula", + }, +}; +--- + + +

driftingnebula

+