nerdanel / missingmaps.github.io

Missing Maps Website

Home Page:http://www.missingmaps.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding events

Events are stored in the app/_data folder. To add an event, edit the events.csv.

When updating the csv of events:

  • Use yyyy-mm-dd format for date. The year must be 4 digits (may need to adjust display settings in Microsoft Excel). Otherwise, 15 may be interpreted as 1915 instead of 2015.
new Date("9/15/15")
Date 1915-09-15T04:00:00.000Z
new Date("9/15/2015")
Date 2015-09-15T04:00:00.000Z
  • Fields can be left blank if data does not exist or is TBD

  • Include the two letter country code to include the correct flag

Adding Language support

The site is configured to support 2-letter core language codes. So english is 'en' not 'en-US' and/or 'en-GB'. Using a longer code will not function.

There are four main steps in incorporating a language:

  1. tell app config the language exists
  2. add 2-letter language code to authorized_locales array in _config.yml
  3. include locale file (to support date/time localization)
  4. several already in place (in _locales dir), otherwise get from here
  5. include _data/2-letter code.yml to support site content translations
  6. copy _data/en.yml, then update text values
  7. note that the url for the nav items can be updates for your language. this needs to align with the permalink in the page frontmatter (see item 4.2 below)
  8. create folder of page templates
  9. copy 'en' dir, rename copy as your 2-letter language code
  10. in frontmatter for all templates there within, you need to add the language code and pagename to the permalink (i.e. /about/ becomes /fr/apropos/ for the french translation)
  11. (OPTIONAL) Add translations of pdf assets
  12. add documents to assets/downloads
  13. update _data/2-letter code.yml host.materials_list.asset(s) with the filename you created

Development

Environment

To set up the development environment for this website, you'll need to install the following on your system:

After these basic requirements are met, run the following commands in the website's folder:

$ npm install

Will also run bundle install

Getting started

$ gulp serve

Compiles the compass files, javascripts, and launches the server making the site available at http://localhost:3000/ The system will watch files and execute tasks whenever one of them changes. The site will automatically refresh since it is bundled with livereload.

The _config-dev.yml file will be loaded alongside _config.yml.

Other commands

Clean the compiled site. I.e. the _site folder

$ gulp clean

Compile the compass files, javascripts, and builds the jekyll site using _config-dev.yml. Use this instead of gulp serve if you don't want to watch.

$ gulp

Compiles the site loading the _config-stage.yml alongside _config.yml. The javascript files will be minified.

$ gulp stage

Compiles the site loading the _config-prod.yml alongside _config.yml. The javascript files will be minified.

$ gulp prod

About

Missing Maps Website

http://www.missingmaps.org

License:Other


Languages

Language:JavaScript 62.4%Language:CSS 30.5%Language:HTML 6.5%Language:Ruby 0.5%Language:Shell 0.1%