Skip to content

abdulriza/undp.github.com

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open.undp.org Documentation

Open.undp.org is a CMS-free Jekyll site designed by Development Seed. Its purpose is to visualize UNDP's global project data through an updatable, static data API.

Building the site

To setup the site locally:

Install Jekyll.

Clone this repo to a convenient place like your home directory:

git clone [email protected]:undp/undp.github.com.git

Start jekyll

cd undp.github.com
jekyll

The site should be accessible at http://0.0.0.0:4000 after it has been generated for the first time.

When you push new changes to the master branch of the remote repo in GitHub, GitHub will automatically rebuild the site and publish it.

Files

The site is structured around the Backbone.js framework. Template and include files contain relevant comments to help you understand what they do.

Here's the general directory layout:

_includes/     All backbone.js structured content. Router, Models, Views, and Templates.
_posts/        Text content. Includes the About pages and any other significant copy such as the intro
               and popup windows.
_site/         The static site generated by Jekyll. This does not need to be committed
               to Github, because GitHub will automatically generate it on push.
img/           Images.

ext/           Required JS libraries.
js/            Aggregated site JS and global functions.
css/           CSS files.

api/           Data files.
download/      Raw data available for users to download.
bin/           Raw data and processing scripts for generating the API.

index.html     Top site container where `<head>` and `<body>` are.
embed.html     Embed-specific index.html, used only when site is displayed through the embed url.
_config.yml    Jekyll configuration file. Includes default metadata.
README.md      This file.

Managing content

Content may be managed by checking out and editing the repository locally, editing directly on GitHub, or through Prose, a web-based editor for GitHub.

Editing Copy

Site copy is contained in posts. Each post is a file in the _posts directory, and relates to a specific section on the site.

For instance, to edit the main site introduction, locate the file _posts/0001-01-01-intro.md, make the proper edits to the text, and save the changes to the repository in one of the manners mentioned above.

Creating posts in Prose

Custom donor posts can be created for any donor countries with the the country id, and stored under _posts/donors/. For example, a post for the donor country Norway will be _posts/donors/0001-01-01-NOR.md.

Editing donor posts in Prose

Photos can be edited by using the markdown ![](). The caption of the photo will be in the [] and the url will be in the (). The url can point to any source on the web (eg. ![This is an 640px image from flickr.](http://farm3.staticflickr.com/2521/4080560617_f220de276d_z.jpg)) or to the local folder, named media (eg. ![This is an image from the media folder](/media/example.jpg)).

Images can be added by drag-and-drop into the text field in prose. If prose upload does not work, add the images in the media folder manually, and edit the post accordingly.

Photos are implemented as a photo slide, so there is no limit of the photos associated with a post. However, to ensure that the slides work, the markup for images should look like the following, with no space or other characters in between each image:

Publish/unpublish in Prose

Posts can be published/unpublished with one click in prose. An unpublished post will not show up on the website even if it is complete.

An unpublished post:

To publish, click the unpublish and the icon will change to publish:

Updating the Data

Visit the wiki home page for OSX and Windows OS update processes.

Further reading

About

UNDP Project Portal

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 73.4%
  • Python 15.9%
  • CSS 10.6%
  • Shell 0.1%