diff --git a/astro.config.mjs b/astro.config.mjs index bce04b2..4609d14 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,18 +1,18 @@ -import { defineConfig } from "astro/config"; -import mdx from "@astrojs/mdx"; -import sitemap from "@astrojs/sitemap"; -import tailwind from "@astrojs/tailwind"; -import react from "@astrojs/react"; -import auth from "auth-astro"; +import { defineConfig } from "astro/config" +import mdx from "@astrojs/mdx" +import sitemap from "@astrojs/sitemap" +import tailwind from "@astrojs/tailwind" +import react from "@astrojs/react" +import auth from "auth-astro" -import node from "@astrojs/node"; +import node from "@astrojs/node" // https://astro.build/config export default defineConfig({ site: "https://example.com", - output: "hybrid", + output: "server", integrations: [mdx(), sitemap(), tailwind(), react(), auth()], adapter: node({ - mode: "standalone" - }) -}); \ No newline at end of file + mode: "standalone", + }), +}) \ No newline at end of file diff --git a/public/admin/config.js b/public/admin/config.js index afd8a03..d4579a9 100644 --- a/public/admin/config.js +++ b/public/admin/config.js @@ -1,6 +1,17 @@ +import { signIn } from "../../node_modules/auth-astro/client.ts" import { PeoplePreview } from "./previews/PeoplePreview.js" import { NewsPreview } from "./previews/NewsPreview.js" +console.log("HI WE ARE HERE DOING THINGS") + +if (document.body.contains(document.querySelector(".CMS_Login_button"))) { + console.log("IT IS HERE") +} +document.getElementsByTagName("button").onclick = () => { + signIn("github") + console.log("overriding") +} +window.CMS.registerBackend("astro-auth") window.CMS.init() window.CMS.registerPreviewStyle("../src/styles/global.css") diff --git a/public/admin/index.html b/public/admin/index.html index c0f08e0..84a684d 100644 --- a/public/admin/index.html +++ b/public/admin/index.html @@ -9,11 +9,17 @@