• This repository has been archived on 24/Nov/2021
  • Stars
    star
    334
  • Rank 121,521 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 10 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚠️ Archived - Legacy KeystoneJS project generator for Yeoman

⚠️ Archived

This repository is archived and is no longer maintained.

For the latest Keystone release please visit the Keystone website.



Keystone Generator

⚠️ NOTE This generator is for keystone classic, not the new version of keystone. To use the new version of keystone, use create-keystone-app

A Yeoman generator for KeystoneJS, the model-driven CMS for Node.js built on Express, Mongoose, and MongoDB.

yo keystone will scaffold a new KeystoneJS project for you, and offer to set up blog, gallery, and enquiry (contact form) models + views.

Getting Started

First up, you'll need Node.js >= 6.0 and MongoDB >= 3.2 installed. If you don't have them, follow the Dependencies instructions below.

Create an empty directory for your new KeystoneJS Project, then run the generator:

$ mkdir myproject
$ cd myproject
$ npx -p yo -p generator-keystone yo keystone

NOTE: If you see errors, check the problems section below.

The generator will ask you a few questions about which features to include, then prompt you for Cloudinary and Mailgun account details.

These accounts are optional, but Cloudinary is used to host the images for the blog and gallery templates. You can get a free account for each at:

  • Cloudinary - Image serving and management in the cloud
  • Mailgun - Easy email integration

I want the default Keystone start project

To generate a starter project with all default options selected, run:

yo keystone auto

This is good for experimenting with Keystone, but will require adjustment to use as an ongoing project.

Most importantly:

  • Replace default Cloudinary credentials with your own Cloudinary credentials
  • Set up email

Keystone Beta vs. Stable

The generator will install the latest Keystone v4 release.

What next?

When you've got your new project, check out the Keystone 4 Documentation to learn more about how to get started with KeystoneJS.

Problems?

ERR! Please try running this command again as root/Administrator.

When running npm install -g generator-keystone, you may get an EACCES error asking you to run the command again as root/Administrator. This indicates that there is a permissions issue.

On your development system you can change directory ownership to the current $USER so you do not have to run sudo while installing untrusted code:

sudo chown -R $USER /usr/local

# Other directories may be required depending on your O/S
sudo chown -R $USER /usr/lib/node_modules/

For a production/shared environment you may wish to re-run the npm command with the sudo prefix:

sudo npm install -g generator-keystone

For more information, see the "What, no sudo?" of the Intro to npm by Isaac Schlueter.

What do you mean it couldn't find my Database?

By default, KeystoneJS will look for a MongoDB server running on localhost on the default port, and connect to it. If you're getting errors related to the MongoDB connection, make sure your MongoDB server is running.

If you haven't installed MongoDB yet, follow the instructions below.

To connect to a server other than localhost, add a MONGO_URI setting to the .env file in your Keystone project directory:

MONGO_URI=mongodb://your-server/database-name

What do you mean 'yo: command not found'?

When running 'yo keystone', you'll run into this problem if you don't have Yeoman installed. Yeoman is a generator ecosystem.

One Line Install
npm install -g yo

For more information, see the Yeoman Getting Started Page.

Dependencies

Install Node.js

Download and install the Node.js binaries for your platform from the Node.js download page.

Install MongoDB

If you're on a Mac, the easiest way to install MongoDB is to use the homebrew package manager for OS X. To install brew, run this in your terminal:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

With Homebrew installed, run this in your terminal to download and install MongoDB:

brew install mongodb

This may generate a warning message

'Warning: You have not agreed to the Xcode license. Builds will fail! Agree to the license by opening Xcode.app or running: xcodebuild -license.' If you see this message, run:

sudo xcodebuild -license

Hit 'enter' if prompted to view and agree to the licenses, navigate to the bottom using the 'space' key, then type 'agree' before attempting the install command again.

For other platforms, see the MongoDB installation guides.

License

MIT License. Copyright (c) 2018 Jed Watson.

More Repositories

1

keystone-classic

Node.js CMS and web app framework
JavaScript
14,658
star
2

keystone

The most powerful headless CMS for Node.js — built with GraphQL and React
TypeScript
8,710
star
3

keystone-demo

Less
933
star
4

generator-keystone-react

⚠️ Archived - Legacy Yeoman generator for a KeystoneJS / React.js boilerplate project
JavaScript
88
star
5

keystone-5

JavaScript
64
star
6

storage

Storage.js is a Javascript library that gives you an easy and standardised access to any provider of your choice.
JavaScript
60
star
7

keystone-utils

⚠️ Archived - Legacy Node.js utility library used by KeystoneJS and you!
JavaScript
56
star
8

prisma-day-2021-workshop

Resources for Jed's Prisma Day 2021 Workshop
TypeScript
46
star
9

keystone-jamstack-plus

⚠️ Archived - Legacy Project
JavaScript
45
star
10

grappling-hook

Hooks for pre/post events used by KeystoneJS
JavaScript
43
star
11

create-keystone-app

CLI app that makes it easy to get started with Keystone
TypeScript
37
star
12

universal-keystone-boilerplate

⚠️ Archived - Legacy Keystone.JS boilerplate for Universal JavaScript projects using React.
JavaScript
34
star
13

keystone-graphql

⚠️ Archived - Legacy GraphQL Helpers for use with KeystoneJS
JavaScript
33
star
14

keystonejs-site

⚠️ Archived - Legacy keystonejs.com site and docs
Pug
31
star
15

keystone-starter

⚠️ Archived - Legacy Starter Project for Heroku (or any other) deployment
JavaScript
30
star
16

keystone-email

⚠️ Archived - Legacy email helper for KeystoneJS Apps
JavaScript
29
star
17

keystone-test-project

⚠️ Archived - Legacy KeystoneJS Project with various configurations for development and testing purposes
JavaScript
25
star
18

keystone-nightwatch-e2e

⚠️ Archived - Legacy end-to-end test framework for KeystoneJS applications.
JavaScript
17
star
19

keystone-storage-adapter-s3

⚠️ Archived - Legacy S3 Storage Adapter for KeystoneJS
JavaScript
17
star
20

keystone-6-heroku-example

A simple example project of showing how you might deploy Keystone 6 to Heroku
TypeScript
16
star
21

keystone-6-railway-example

A simple example project showing how you might deploy Keystone 6 to Railway
TypeScript
15
star
22

eslint-config-keystone

⚠️ Archived - Legacy Shareable ESLint Config for Keystone's Coding Standards
JavaScript
15
star
23

keystone-healthchecks

⚠️ Archived - Legacy Keystone Healthchecks Framework
JavaScript
9
star
24

keystone-react-todo-demo

TypeScript
7
star
25

keystone-storage-namefunctions

⚠️ Archived - Legacy utility functions for generating file names.
JavaScript
6
star
26

keystone-storage-adapter-azure

⚠️ Archived - Legacy Azure Storage Adapter for KeystoneJS
JavaScript
6
star
27

eslint-config-keystone-react

⚠️ Archived - Legacy Shareable ESLint Config for Keystone's Coding Standards with React Extensions
JavaScript
3
star
28

keystone-frontend-example

An example project of a keystone 6 app with a next frontend for use in lessons
TypeScript
3
star
29

keystone-metrics

⚠️ Archived - Legacy Keystone Metrics Tracking Package
JavaScript
2
star
30

fields-test-harness

⚠️ Archived - Legacy Project
JavaScript
1
star