astro-env test

This commit is contained in:
2024-05-24 16:43:47 -05:00
parent e1850d5279
commit af29f08937
4 changed files with 3485 additions and 3228 deletions

View File

@@ -8,6 +8,8 @@ import mdx from "@astrojs/mdx";
/** @type {import('rehype-pretty-code').Options} */
import react from "@astrojs/react";
import env from "astro-env";
const prettyOptions = {
theme: "github-dark",
keepBackground: false,
@@ -32,7 +34,13 @@ const prettyOptions = {
export default defineConfig({
site: "https://undefined.behavio.rs",
prefetch: true,
integrations: [tailwind(), sitemap(), robotsTxt(), mdx(), react()],
integrations: [tailwind(), sitemap(), robotsTxt(), mdx(), react(), env({
schema: z.object({
PUBLIC_VERCEL_GIT_REPO_OWNER: z.string(),
PUBLIC_VERCEL_GIT_REPO_SLUG: z.string(),
PUBLIC_VERCEL_GIT_COMMIT_SHA: z.string(),
}),
})],
markdown: {
syntaxHighlight: false,
rehypePlugins: [[rehypePrettyCode, prettyOptions]]

View File

@@ -19,6 +19,7 @@
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"astro": "^3.6.3",
"astro-env": "^0.0.5",
"astro-robots-txt": "^1.0.0",
"astro-seo": "^0.8.0",
"date-fns": "^2.30.0",

6700
pnpm-lock.yaml generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@ import type { Props as SEOProps } from "astro-seo";
const repository_url = `https://github.com/${
import.meta.env.PUBLIC_VERCEL_GIT_REPO_OWNER
}/${import.meta.env.PUBLIC_VERCEL_GIT_REPO_SLUG}`;
const build_revision = import.meta.env.PUBLIC_VERCEL_GIT_COMMIT_SHA ?? "unknown";
const build_revision = import.meta.env.PUBLIC_VERCEL_GIT_COMMIT_SHA;
interface Props {
title?: string;