This plugin generates the code to run Netlify CMS and update the site content in a faster and easier way in both local and remote environments. By default the CMS is accesible at the
/admin/ path, but you can change it in the
Import this plugin in your
_config.ts file to use it:
import lume from "lume/mod.ts"; import netlifyCMS from "lume/plugins/netlify_cms.ts"; const site = lume(); site.use(netlifyCMS()); export default site;
Create the data file
/_data/netlify_cms.yml in the root of your project. See the configuration options in the Netlify CMS site.
backend: name: git-gateway branch: master media_folder: statics collections: - label: Posts name: posts description: List of posts folder: posts extension: md create: true fields: - label: Title name: title widget: string - label: Content name: body widget: markdown
This creates the
/admin/config.yml to run the CMS.
If the site location hostname is
localhost the local mode is enabled by default. This means that after running
lume --serve, you can go to
http://localhost:3000/admin/ to access the CMS and make changes to the content of your site.
Keep in mind that local mode needs Node installed on your computer because it's needed to run
npx netlify-cms-proxy-server to start the local proxy server for the CMS. If you want to disable the local mode, set
local: false in the plugin configuration.