This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Playing around with decap and Auth.js
- Loading branch information
1 parent
7db15dc
commit c24f252
Showing
9 changed files
with
610 additions
and
572 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
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 { 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 node from "@astrojs/node" | ||
import auth from "auth-astro" | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
site: "https://example.com", | ||
output: "hybrid", | ||
integrations: [mdx(), sitemap(), tailwind(), react(), auth()], | ||
adapter: node({ | ||
mode: "standalone" | ||
}) | ||
}); | ||
mode: "standalone", | ||
}), | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" href="https://unpkg.com/@staticcms/app@^4.0.0/dist/main.css" /> | ||
<link href="/admin/config.yml" type="text/yaml" rel="cms-config-url" /> | ||
|
||
<title>Content Manager</title> | ||
</head> | ||
<body> | ||
<!-- Include the script that builds the page and powers Static CMS --> | ||
<script src="https://unpkg.com/@staticcms/app@^4.0.0/dist/static-cms-app.js"> | ||
const { signIn } = await import("auth-astro/client") | ||
document.querySelector(".CMS_Login_button").onclick = () => signIn("github") | ||
</script> | ||
<script type="module" src="/admin/config.js"></script> | ||
</body> | ||
</html> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta name="robots" content="noindex" /> | ||
<link href="/admin/config.yml" type="text/yaml" rel="cms-config-url" /> | ||
<title>Content Manager</title> | ||
</head> | ||
<body> | ||
<script src="https://unpkg.com/decap-cms@^3.1.2/dist/decap-cms.js"></script> | ||
<script type="module" src="/admin/config.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { AstroAuth } from "auth-astro/server" | ||
|
||
export const prerender = false | ||
|
||
export const { GET, POST } = AstroAuth() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
{ | ||
"extends": "astro/tsconfigs/strict", | ||
"compilerOptions": { | ||
"strictNullChecks": true, | ||
"jsx": "react-jsx", | ||
"jsxImportSource": "react" | ||
} | ||
} | ||
"extends": "astro/tsconfigs/strict" | ||
} |