diff --git a/MIGRATION.md b/MIGRATION.md index 534866b1..fb6e93c5 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -58,6 +58,7 @@ ## `netlify_cms` Plugin - Renamed to `decap_cms`. +- Changed `netlifyIdentity` option to `identity: "netlify"` ## `windi_css` Plugin diff --git a/plugins/decap_cms.ts b/plugins/decap_cms.ts index 7b901ed1..eef38981 100644 --- a/plugins/decap_cms.ts +++ b/plugins/decap_cms.ts @@ -18,8 +18,8 @@ export interface Options { /** Data key of the configuration */ configKey: string; - /** Whether use Netlify Identity */ - netlifyIdentity: boolean; + /** Whether use a identity method */ + identity?: "netlify"; /** Custom HTML code to append in the index.html page */ extraHTML: string; @@ -32,13 +32,12 @@ export const defaults: Options = { local: undefined, path: "/admin/", configKey: "decap_cms", - netlifyIdentity: false, extraHTML: "", proxyCommand: - "deno run --allow-read --allow-net=0.0.0.0 --allow-write --allow-env npm:netlify-cms-proxy-server", + "deno run --allow-read --allow-net=0.0.0.0 --allow-write --allow-env npm:decap-server", }; -/** A plugin to use Netlify CMS in Lume easily */ +/** A plugin to use Decap CMS in Lume easily */ export default function (userOptions?: Partial) { const options = merge(defaults, userOptions); @@ -86,10 +85,10 @@ export default function (userOptions?: Partial) { }" type="text/yaml" rel="cms-config-url">`, ); code.push( - ``, + ``, ); - if (options.netlifyIdentity) { + if (options.identity === "netlify") { code.push( ``, ); diff --git a/tests/__snapshots__/decap_cms.test.ts.snap b/tests/__snapshots__/decap_cms.test.ts.snap index 07f5d0b5..af690452 100644 --- a/tests/__snapshots__/decap_cms.test.ts.snap +++ b/tests/__snapshots__/decap_cms.test.ts.snap @@ -145,7 +145,7 @@ local_backend: false Admin - + ', @@ -159,7 +159,7 @@ local_backend: false Admin - + ',