UPDATE: as of June 20th, 2018 new version of the site has been deployed and this codebase is not updated anymore
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.
To setup the site locally:
Clone this repo to a convenient place like your home directory:
git clone [email protected]:undp/open.undp.org.git
Start jekyll
cd open.undp.org
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 gh-pages
branch of the remote repo in GitHub, GitHub will automatically rebuild the site and publish it.
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.
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.
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.
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
.
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:
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
:
Visit the wiki home page for OSX and Windows OS update processes.