Skip to content

Commit c83100b

Browse files
committed
feat: Netlify CMS -> Decap CMS
1 parent 0724c07 commit c83100b

File tree

7 files changed

+20
-33
lines changed

7 files changed

+20
-33
lines changed

astro.config.mjs

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import markdoc from "@astrojs/markdoc";
1010
const __filename = fileURLToPath(import.meta.url);
1111
const __dirname = dirname(__filename);
1212
import remarkCodeTitles from 'remark-code-titles'
13+
import decapCmsOauth from "astro-decap-cms-oauth";
1314

1415
// Full Astro Configuration API Documentation:
1516
// https://docs.astro.build/reference/configuration-reference
@@ -37,13 +38,14 @@ export default defineConfig( /** @type {import('astro').AstroUserConfig} */{
3738
tailwind({
3839
applyBaseStyles: false,
3940
}),
40-
sitemap(),
41+
sitemap(),
42+
decapCmsOauth()
4143
],
4244
vite: {
4345
plugins: [],
4446
resolve: {
4547
alias: {
46-
'$': path.resolve(__dirname, './src')
48+
$: path.resolve(__dirname, './src')
4749
}
4850
},
4951
optimizeDeps: {

package-lock.json

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"dependencies": {
4040
"@astrojs/markdoc": "^0.8.0",
4141
"@astrojs/vercel": "^6.0.1",
42+
"astro-decap-cms-oauth": "^0.2.9",
4243
"ioredis": "^5.3.2"
4344
}
4445
}

public/admin/config.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
backend:
2-
name: git-gateway
2+
name: github
33
branch: main
4+
publish_mode: editorial_workflow
5+
repo: one-aalam/astro-ink # change this to your repo
6+
site_domain: astro-ink.vercel.app # change this to your domain
7+
base_url: https://astro-ink.vercel.app # change this to your prod URL
8+
auth_endpoint: oauth
49
commit_messages:
510
create: 'Create {{collection}} “{{slug}}”'
611
update: 'Update {{collection}} “{{slug}}”'

public/admin/index.html

-12
This file was deleted.

src/components/BaseHead.astro

-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ const { title = SITE.title, description, permalink, image } = Astro.props;
5555
{description && <meta property="twitter:description" content={description} />}
5656
{image && <meta property="twitter:image" content={image} />}
5757

58-
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"
59-
></script>
6058
<script is:inline>
6159
const theme = (() => {
6260
if (typeof localStorage !== "undefined" && localStorage.getItem("theme")) {

src/components/NetlifyIdentity.svelte

-16
This file was deleted.

0 commit comments

Comments
 (0)