Marcell Kiss | Budacode
@kmarci88
Central interface for:
content
For developers?
Plugin based?
WEB: 40% using CMS
Reactioncommerce
Apostrophe
Tiddlywiki
Nodize
Plugin based!
Offers:
tutorials
partnership
community
etc...
Requirements:
Node.js (Express)
MongoDB
$: pbctrl install testFolder
PencilBlue: Site Name: (My PencilBlue Site) Test
PencilBlue: Site Root: (http://localhost:8080)
PencilBlue: Address to bind to: (0.0.0.0)
PencilBlue: Site Port: (8080)
PencilBlue: MongoDB URL: (mongodb://127.0.0.1:27017/)
PencilBlue: Database Name: (pencilblue) test
PencilBlue: Do you want to install Bower components?: (y/N) y
Not too logical...
Many bugs...
Needs contribution...
Not a WordPress (yet)...
Database-driven
Websites & APIs
For developers
Auto-generated Admin UI
Built on
Express and MongoDB
$ npm install -g yo
$ npm install -g generator-keystone
$ mkdir myproject
$ cd myproject
$ yo keystone
? What is the name of your project? keystone
? Would you like to use Jade, Swig, Nunjucks or Handlebars for templates?
[jade | swig | nunjucks | hbs] jade
? Would you like to use LESS or SASS for stylesheets? [less | sass] less
? Would you like to include a Blog? Yes
? Would you like to include an Image Gallery? Yes
? Would you like to include a Contact Form? Yes
? What would you like to call the User model? User
? Enter an email address for the first Admin user: info@budacode.com
? Enter a password for the first Admin user: 123456
? Would you like to include gulp or grunt? [gulp | grunt] grunt
? Would you like to create a new directory for your project? No
? ------------------------------------------------
KeystoneJS integrates with Mandrill (from Mailchimp) for email sending.
Mandrill accounts are free for up to 12k emails per month.
Would you like to include Email configuration in your project? Yes
? ------------------------------------------------
localhost:8080/keystone
Add new models under models/
Add routes in routes/index.js
Add views under templates/
var Post = new keystone.List('Post', {
map: { name: 'title' },
autokey: { path: 'slug', from: 'title', unique: true }
});
Post.add({
title: { type: String, required: true },
state: { type: Types.Select, options: 'draft, published, archived',
default: 'draft', index: true },
author: { type: Types.Relationship, ref: 'User', index: true },
publishedDate: { type: Types.Date, index: true, dependsOn: { state: 'published' } },
image: { type: Types.CloudinaryImage },
content: {
brief: { type: Types.Html, wysiwyg: true, height: 150 },
extended: { type: Types.Html, wysiwyg: true, height: 400 }
},
categories: { type: Types.Relationship, ref: 'PostCategory', many: true }
});
Post.schema.virtual('content.full').get(function() {
return this.content.extended || this.content.brief;
});
Post.defaultColumns = 'title, state|20%, author|20%, publishedDate|20%';
Post.register();
Really matured!
Less work
Automatic API and admin generation
http://en.wikipedia.org/wiki/List_of_content_management_systems
http://w3techs.com/technologies/overview/content_management
http://womeninbusiness.about.com/od/websitedevelopment/a/An-Overview-Of-Types-Of-Content-Management-Systems.htm