Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Easy Netlify CMS integration with nuxt.js

License

NotificationsYou must be signed in to change notification settings

medfreeman/nuxt-netlify-cms-module

Repository files navigation

npm versionnpmcircleciCodecovGreenkeeper badgeDependenciesdevDependencies

styled with prettier

EasyNetlify CMS integration with nuxt.js

📖Release Notes

Features

Setup

  • Addnuxt-netlify-cms andnetlify-cms devDependencies using yarn or npm to your project

    npm i -D nuxt-netlify-cms netlify-cms ORyarn add -D nuxt-netlify-cms netlify-cms

  • Addnuxt-netlify-cms tomodules section ofnuxt.config.js

{modules:[// Simple usage"nuxt-netlify-cms",// With options["nuxt-netlify-cms",{adminPath:"secure"}],],// You can optionally use global options instead of inline formnetlifyCms:{adminPath:"secure"}}

Usage

Netlify CMS module config folder

This module will look for the Netlify CMS config file and extensions in the following folder:[nuxt.js srcDir]/netlify-cms.

ℹ️ The nuxt.jssrcDir is set to the project root folder by default. If you don't change this value in nuxt config, you'll just have to create the "netlify-cms" directory at your project root folder.

ℹ️ If you don't use any of the following two features, there's no need to create this folder. But sincenetlify-cms needs a configuration specific to your repository, you'll have to specify it throughoptions.

Netlify CMSconfig.yml

You can specify acustom configuration, that will be parsed and merged with the module'snetlify CMS options.

You have to place the file in your Netlify CMS module config folder and name itconfig.yml.

ℹ️ Note that each path in the file (media_folder, collectionsfolder fields and collectionsfile fields) will be rewritten to prepend nuxt.jssrcDir, so please specify each path relative to this folder.

This file can be changed whilenuxt dev is running, and Netlify CMS will be updated automatically.

Netlify CMS customizations

This module will look for Netlify CMS customizations in *.js files contained in Netlify CMS module config folder and subfolders, and include them in the CMS build.

These are of two kinds,Custom Previews andCustom Widgets.

ℹ️ The global variableCMS is available to these javascript files to reference the CMS object.

ℹ️ The contents of this directory and subdirectories can be changed whilenuxt dev is running, and Netlify CMS will be updated automatically.

Options

You can pass options using module options ornetlifyCms section innuxt.config.js.

adminPath

  • Default:"admin"

adminPath defines the path where Netlify CMS will be served.

With nuxt default configuration, it will be served tohttp://localhost:3000/admin/ in development.

adminTitle

  • Default:"Content Manager"

adminTitle defines the html title of the page where Netlify CMS will be served.

cmsConfig

  • Default:{ media_folder: "static/uploads" }

cmsConfig wholly reflectsNetlify CMS config.yml, in js object format.

ℹ️ The order of precedence for the cms configuration isdefaults <netlify-cms.yml <module options

ℹ️ The paths are also rewritten according to nuxt.jssrcDir

CONTRIBUTING

  • ⇄ Pull requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.
  • Pull requests must be accompanied by passing automated tests ($ yarn test).

License

MIT License

Copyright (c) Mehdi Lahloumlahlou@protonmail.ch

About

Easy Netlify CMS integration with nuxt.js

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp