Giter Club home page Giter Club logo

keystonejs-site's Introduction

⚠️ Archived

This repository is archived and is no longer maintained.

For the latest Keystone release please visit the Keystone website.



NOTE: The Keystone Website has been merged in to the main keystone repo here

If you are looking to contribute to the keystone documentation, or other parts of the website, please make your requests there. This code base is no longer the source of the keystone website.

keystonejs-site

keystonejs.com site and docs.

Running locally

% npm install
% npm start

keystonejs-site's People

Contributors

alexsasharegan avatar andrewlinfoot avatar aurelioderosa avatar bladey avatar creynders avatar divyabiyani avatar emaddoma avatar ericelliott avatar gmmeyer avatar hycner avatar jacargentina avatar jaydson avatar jedwatson avatar jeffreypriebe avatar jneumann avatar jossmac avatar jschmieta avatar lennyboyatzis avatar mattphoto avatar morenoh149 avatar mxstbr avatar n-devr avatar noviny avatar prayagverma avatar snowkeeper avatar sonali0901 avatar stephanie-gredell avatar stfnsr avatar tylerreinhart avatar victorkurauchi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keystonejs-site's Issues

Unique fields aren't unique after List.model.collection.drop()

Porting this over from keystonejs/keystone#560, submitted by @ignlg

Should be added to a "tips / gotachas" page


This isn't a KeystoneJS' issue, it's just something about Mongoose (or maybe MongoDB) that you should be aware of.

After a List.model.collection.drop() all data and indexes are gone and, for a short period of time, you can insert duplicated unique: true fields without any errors or warnings.

I've discovered this running mocha tests. I dropped and redid the collections after every test and then uniqueness tests (trying to register/update users with an existing email, username) failed, but only when they were in the middle of other tests. Running alone they were fine.

I was able to query a find with an unique field and I've receive two and three results. After some mad research I've found that the issue came from the drop. Now I have replaced List.model.collection.drop() with List.model.remove(). More inefficient but safe in terms of model integrity.

I haven't got the time to go really deep into it yet but I hope it helps someone.

Document hooks

I commented on some issue regarding hooks that documentation was not available for this and offered to write it.

But I am not sure where this should go in the documentation sections. It does not sound like something to Get Started, nor does it have to do with Database, it is probably Configuration-related somehow ? Not totally but I see some stuff there that are not completely configuration-related (as in "configuration options") so... Is it time for a new section ? Something like "features" ? Or should hooks go down there below "Disabling the Admin UI" ?

I was thinking about finding everytime callHook is present in keystone's master branch to give a full reference of available hooks with their parameters. Is it a good idea ? Should I use another branch ?

Getting Started vs. Getting Started Guide

I noticed that there are two "Getting started" pages - Getting Started and Getting Started Guide, with the latter one containing more detailed manual instructions.
Maybe renaming the second one to "Getting Started (Detailed)" or "Getting Started (Manual Instructions)" could help make the difference clearer?

Also, the detailed guide refers to the generator-keystone repository for instructions about using the generator - we could instead link to Getting Started, which presents the same information in a more beginner friendly format :)

Better explain schema creation for newcomers (no mongo expertise)

On my first try to create a model, i've noted that i'm missed the "name" mapping, and it seems mongo/keystone relies on a name field, OR a mapping to some field to show it on the Admin UI.

Also, its not very clear to me where that name is related to the object key to uniquely identify the object instance?

May be i can do a PR on this if i can understand this first.

"cookie signin" option not documented

I've searched for the feature of having the "cookie signin" option set, and how it works. Maybe i'm not looking for the right place? But i think it should be just below the "cookie secret" option right?

I'm looking for a way of "remember me". Its about that?

Document - "mongo options" option

Update this section of the docs to include the new option mongo options. You can find most of the Mongoose options and examples here.

Something along the lines of...

This option allows you to provide additional connection options to Mongoose allowing more control over your MongoDB server, replica set, or cluster.

Example:
keystone.set('mongo options', {
    user: 'username',
    password: 'password',
    db: { safe: true },
    server: {
        auto_reconnect: true,
        socketOptions: {
            keepAlive: 1,
            connectTimeoutMS: 30000,
            socketTimeoutMS: 30000
        }
    },
    replset: {
        rs_name: 'myReplSet',
        readPreference: 'primary'
        socketOptions: {
            keepAlive: 1,
            connectTimeoutMS: 30000
        }
    }
})

Use Transifex to translate the site

Transifex is free for OSS projects. With just a few minor changes, which we probably can do programmatically, we can prepare the KeystoneJS site to use Transifex.

We could easily use something like jsxgettext to extract the translatable strings, use the Transifex API to upload them any new strings/download the already translated strings, and a custom function to acts perform the string replacement.

This new workflow would eliminate the need the keep multiple copies of the site in multiple languages. In addition to the fact that we could use collaboration to translate the site in mores languages.
If you guys like the idea I will submit a PR with the required changes.

Finish implementing the build process

Currently, the build process is a WIP that makes it more work than it could be to update keystonejs.com with changes to this repo.

Specifically; there's no static asset build pipeline; changes to LESS / images / client-side javascript has to be manually moved across from the public folder into Keystone's gh-pages branch, and the built .html files need to be moved manually as well.

The current version number should be retrieved dynamically from npm, but for now could be an environment variable specified during build.

We should also add browserify / webpack into the build process to allow for Babel + npm package usage in the site and move away from the ancient javascript that's currently in use.

This actually might be in the sweet spot for webpack, since it has a jade loader; maybe it can handle the entire build process for us - replacing the current express and fs based solution(s), and adding nice things like live reloading (and react hot reloading)

@snowkeeper is this something you'd be interesting in looking into?

My ideal final state for the process is to have an npm script that is given a path to the local keystone clone, checks out gh-pages, builds the site, copies the changes across and commits them, finally switching back to the branch that was previously checked out.

Looks like we could use the gh-pages package to implement that without much work.

Email Helper documentation?

Hey, I'd love to put together some basic documentation for utilizing the Email helper in Keystone, but I'm not sure what top level category would be appropriate?

It could possibly go in the "Configuration"->Services->Mandrill section, but I'm not sure that's totally appropriate. Thoughts @JedWatson ?

Add documentation about adding custom fields

See keystonejs/keystone#2472

According to @snowkeeper, it works something like this:

var keystone = require('keystone');
var util = require('util');
/*
    Custom FieldType Constructor
    @extends Field
    @api public
*/
function custom(list, path, options) {
    // add your options to this
    // call super_  
    custom.super_.call(this, list, path, options);  
}
/* inherit Field */
util.inherits(custom, keystone.Field);    
/* override or add methods */
custom.prototype.addToSchema = function() {
    // override schema instructions
}
/* Export Field Type */ exports = module.exports = custom;
var keystone = require('keystone');
Object.defineProperty(keystone.Field.Types, 'myField', { get: function() {
    return require(./customType.js');
} });

Type of List Option "schema"

The docs show that the option schema should be a String but from my tests it's an object. I believe it's just a documentation mistake.

0.4: better sortable/sortContext/defaultSort documentation

There are currently some sorting features in the Admin UI that I cannot seem to figure out if they work or not, or if I'm using them wrong. We need to better clarify the relationships, if any, between all three of the following as well as give better examples on usage for each:

sortable
sortContext
defaultSort

Documentation recommends "latest"

From http://keystonejs.com/docs/getting-started/:

package.json
This file describes our project for npm, including the fact that it depends on keystone.

{
  "dependencies": {
    "keystone": "latest",
    "underscore": "latest"
  },

You shouldn't depend on latest - if people do that when keystone breaks compatibility for 4.0 it'll break their app when they npm install again.

Either recommend "keystone": "^0.3" or tell people to npm install --save keystone if you don't want to have to update the documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.