Now we have the new theme almost ready.
We will now see how we can extend the core keystone.js and add another page on our blog, as the previous screenshot shows, we have an ABOUT menu item, so let's create it:
Create a new file called About.js inside models/folder and add the following lines of code:
var keystone = require('keystone'); var Types = keystone.Field.Types; /** * About Model * ========== */ var About = new keystone.List('About', { // Using map to show title instead ObjectID on Admin Interface map: { name: 'title' }, autokey: { path: 'slug', from: 'title', unique: true }, }); About.add({ title: { type: String, initial: true, default: '', required: true }, description: { type: Types.Textarea } }); About.register();
Add the new module to admin navigation, open keystone.js in the root folder, and add the following highlighted...