intermine/intermod-site

Name: intermod-site

Owner: InterMine

Description: InterMOD site on Blaš CMS

Created: 2013-02-22 12:51:56.0

Updated: 2014-01-16 09:40:33.0

Pushed: 2014-01-16 09:40:32.0

Homepage: http://intermod-site.labs.intermine.org

Size: 1020

Language: CSS

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

InterMOD site

An InterMOD project site powered by blaš CMS.

http://crossmodel.org/ http://intermod-site.apps.intermine.org/

Features
BasicDocument
A basic document with a title and a Markdown powered body
HomeDocument
Fetches NewsDocuments and displays them based on their modification date. Fetches ModDocuments and displays them in a grid of 3 columns.
ModDocument
Contains an image and a link to a model organism project website. Should be kept private.
NewsDocument
Similar to a BasicDocument just a different type so we can filter on these in a HomeDocument.
ResourcesHolderDocument
Will display ResourceDocuments in a table.
ResourceDocument
Captures a name, description and a link to a resource. Should be kept private.
PublicationsHolderDocument
Will either use a cache or fetch publications from PubMed to display them in a table by their date.
Getting started

The CMS that powers the site is developed in Node.js, download the tarball and install it if not present:

configure
ke
do make install

The CMS uses MongoDB 2 as a backend database; to install and start it up:

do apt-get install mongodb
do mongod

Install the dependencies of this “app” which is blad and then whatever packages you will be using in your site code; use package.json to define those then run:

m install -d

Define the config for your site in config.json:


"mongodb": "mongodb://localhost:27017/documents",
"browserid": {
    "provider": "https://browserid.org/verify",
    "salt":     "Q?RAf!CAkus?ejuCruKu",
    "users": [
        "radek.stepan@gmail.com"
    ]
}

mongodb
A uri to a MongoDB database
browserid.provider
A BrowserID provider, the default is Persona.org by Mozilla
browserid.salt
A salt used to hash credentials so that an API key can be generated and used by the Chaplin admin. Do not leave it to default unless you know what you are doing!
browserid.users
An array of email addresses of people that should have access to the backend admin. If they have not created an account with the BrowserID provider, they will be offered a chance to do so on their first login to the site.

Finally start the service, take note that if you wish to start it on a specific port, pass it in as the process.env.PORT variable:

de start.js

If you need to define your custom page types and styles (you do), follow the guide associated with the blaš CMS project page.

Database backup

Two helpful functions have been exposed to let you export/import pages of your CMS. Call them like so:

de export.js
de import.js

Be aware that the import wipes the database clean first!


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.