keystone-classic README

The project's README from github.com/keystonejs/keystone-classic. As one markdown file: README.md.

:warning: Archived :warning:

Keystone classic is not receiving any new updates.

We recommend using Keystone 6 for new projects.



KeystoneJS

Build Status

About Keystone

KeystoneJS is a powerful Node.js content management system and web app framework built on the Express web framework and Mongoose ODM. Keystone makes it easy to create sophisticated web sites and apps, and comes with a beautiful auto-generated Admin UI.

Check out our demo site to see it in action.

Documentation

For Keystone v4 documentation and guides, see keystonejs.com.

For Keystone v0.3 documentation, see v3.keystonejs.com.

Getting Started

This section provides a short intro to Keystone. Check out the Getting Started Guide in the Keystone documentation for a more comprehensive introduction.

Installation

The easiest way to get started with Keystone is to use the Yeoman generator:

$ npm install -g generator-keystone
$ yo keystone

Answer the questions, and the generator will create a new project based on the options you select, and install the required packages from npm.

Alternatively, to include Keystone in an existing project or start from scratch (without Yeoman), specify keystone: "4.0.0" in the dependencies array of your package.json file, and run npm install from your terminal.

Then read through the Documentation and the Example Projects to understand how to use it.

Configuration

Config variables can be passed in an object to the keystone.init method, or can be set any time before keystone.start is called using keystone.set(key, value). This allows for a more flexible order of execution. For example, if you refer to Lists in your routes you can set the routes after configuring your Lists.

See the KeystoneJS configuration documentation for details and examples of the available options.

Database field types

Keystone builds on the basic data types provided by MongoDB and allows you to easily add rich, functional fields to your application's models.

You get helper methods on your models for dealing with each field type easily (such as formatting a date or number, resizing an image, getting an array of the available options for a select field, or using Google's Places API to improve addresses) as well as a beautiful, responsive admin UI to edit your data with.

See the KeystoneJS database documentation for details and examples of the various field types, as well as how to set up and use database models in your application.

Running KeystoneJS in Production

When you deploy your KeystoneJS app to production, be sure to set your ENV environment variable to production.

You can do this by setting NODE_ENV=production in your .env file, which gets handled by dotenv.

Setting your environment enables certain features (including template caching, simpler error reporting, and HTML minification) that are important in production but annoying in development.

Community

We have a friendly, growing community and welcome everyone to get involved:

We love to hear feedback about Keystone and the projects you're using it for. Ping us at @KeystoneJS on Twitter.

Contributing

If you can, please contribute by reporting issues, discussing ideas, helping answer questions from other developers, or submitting pull requests with patches and new features. We do our best to respond to all issues and pull requests, and make patch releases to npm regularly.

If you're going to contribute code, please follow our coding standards and read our Contributing Guide.

If you are using KeystoneJS in any projects we encourage you to add to our Related Projects Page. This is also the place to find generators and other projects that bundle KeystoneJS.

Thanks

KeystoneJS is a free and open source community-driven project. Thanks to our many contributors and users for making it great.

Keystone's development has been led by key contributors including Jed Watson, Joss Mackison, and Max Stoiber and is proudly supported by Thinkmill in Sydney, Australia.

License

(The MIT License)

Copyright (c) 2016-2019 Jed Watson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

keystone-classic (keystonejs/keystone-classic)

Searching Database…

14.5K ·GitHub
archived
这是什么东西?Keystone(经典版)是一个基于 Express 和 Mongoose ODM 构建的 Node.js 内容管理系统和 Web 应用框架,自带自动生成的管理后台界面。
它是一个部署就能用的现成 CMS,还是需要我写代码来使用的框架?它是代码优先的框架:你用 JavaScript 编写应用,模型定义好之后它就表现得像一个 CMS,并自带一个现成的管理后台用于编辑内容。
我怎么用它创建一个项目?最简单的方式:用 Yeoman 生成器搭建项目骨架,它会自动创建项目并安装所需的 npm 包。或者在 package.json 的依赖中添加 keystone: '4.0.0',然后运行 npm install。
我还需要运行其他东西吗,比如数据库?需要——数据通过 Mongoose ODM 存在 MongoDB 里,而且它是一个从 npm 安装的 Node.js 应用,所以 Node 和一个 MongoDB 实例是最基本的要求。
这个项目还在维护吗——我新项目还适合用它吗?不适合。这个仓库已经归档,不再有任何更新;README 本身就建议新项目改用 Keystone 6。
可以免费使用吗?可以——采用 MIT 许可证,并且被描述为一个免费、开源、由社区驱动的项目。
我的内容模型能存储哪些内容?凡是 MongoDB 能存的都可以,另外还有带辅助方法的功能字段——支持格式化的日期和数字、可以调整尺寸的图片、下拉选择,以及通过 Google 的 Places API 增强的地址字段。
在生产环境运行它有什么特别要注意的吗?把 ENV 设置为生产模式,比如在 .env 文件里写 NODE_ENV=production(由 dotenv 处理)。这样可以启用模板缓存、更简洁的错误报告以及 HTML 压缩。
应用搭建好之后,我该怎么配置它?给 keystone.init() 传入一个选项对象,或者在 keystone.start() 之前的任何时刻调用 keystone.set(key, value)——在配置好各个 List 之后设置路由时特别方便。
安装之前有没有可以试用的演示?有——README 里链接了一个演示站点,你可以在正式决定之前先看看 Keystone 的实际效果。
What are similar projects?payload, mean, gin-vue-admin, express, koa, node-elm, october, core
Creator
keystonejs
Size
148.4 MB
Stars
14.5K
Age
13y
Commits · 90 Days