/jplusplus.org

Journalism++ corporate website.

Primary LanguageJavaScript

Journalism++

How to add posts and pages

Pages and posts can be found in the content folder.

About posts

Post will be added to the main page carroussel if the subdomain is included into the posts meta (see #post meta)

Post meta

{
  "title": {
    "en":"Your post title in english",
    "fr":"Votre titre en français",
    // etc...
  },
  "thumbnail": "<the image to display into the carroussel>",
  "tags": ["an", "array", "of", "tags"],
  // will show the post on the given subdomains
  "domains": ["paris", "berlin", "amsterdam"],
  // (optional) if you want to disable the post set this key to true
  "disabled":true 
  // (optional) extra infos, not used
  "author": "@Pirhoo",
  "version": 2.0.1

}

Installation

Software dependencies

To make the project up and running, you need:

  • Node 0.8.19
  • NPM 1.1.32

Step 1: Download the dependencies

The app is build at the top of the pleasant Node Package Manager. To download and set up the whole dependancies three, simply run from the project's root directory :

$ npm install

Step 2: Edit the configuration

Use configuration file

The default configuration is present into config/default.json. Every modifications in this file will be commited. The runtime.json file is an auto-generated file that you shouldn't edit.

  • Development mode: If you want to overide default values, you have to create a file named config/development.json and corresponding to your local configuration. This file will be ignored by git.
  • Production mode: if you want to overide default values, you have to edit the config/production.json file to fit with your production environment. This file will be ignored by git.

Alternative: use environment variables

The following environment variables can be use with the highest priority :

  • PORT defines the port to listen to (ex: 80);
  • NODE_ENV defines the runtime mode that affects the configuration (ex: development, production, etc).

Step 3: Run!

To launch the application enter the following command:

$ coffee app.coffee

Your application is now available from localhost:3000!

GNU General Public License

This software is the property of Journalism++ and licensed under the GNU Genral Public License.