我是keystone的新手,我正在尝试部署一个简单的网站模板来熟悉这项技术,我已经下载了所有的necassary模块,并创建了一个包含所有依赖项的keystone.js文件和package.json文件.但是,当我尝试在终端中运行keystone.js时,我得到以下内容:
Error: Invalid Configuration
CloudinaryImage fields (Gallery.heroImage) require the "cloudinary config" option to be set.
See http://keystonejs.com/docs/configuration/#cloudinary for more information.
Run Code Online (Sandbox Code Playgroud)
我已经使用cloudinary建立了一个帐户并使用了npm install来确保它安装在系统中,但显然无法找到配置.我假设有一个简单的解决方案,我只需要将我的configuartion字段放在代码的正确位置,但我似乎无法找到有关在何处插入我的帐户详细信息的任何说明.任何帮助将不胜感激,如果我省略了任何重要的代码,请告诉我.
keystone.js:
require('dotenv').load();
// Require keystone
var keystone = require('keystone'),
handlebars = require('express3-handlebars');
// Initialise Keystone with your project's configuration.
// See http://keystonejs.com/guide/config for available options
// and documentation.
keystone.init({
'name': 'Tech Website',
'brand': 'Tech Website',
'less': 'public',
'static': 'public',
'favicon': 'public/favicon.ico',
'views': 'templates/views',
'view engine': 'hbs',
'custom engine': handlebars.create({
layoutsDir: 'templates/views/layouts',
partialsDir: 'templates/views/partials',
defaultLayout: 'default',
helpers: new require('./templates/views/helpers')(), …Run Code Online (Sandbox Code Playgroud)