Guides / Website Configuration (1.0)

Description

This guide provides instructions for how to configure the HIU Website.

Bugs

If you find bugs in this guide, please get in contact with us at HIU_DEV@state.gov.

Configuration

Most configuration for the site is managed by editing the _config.yml file.

General

The general section includes frequently used text and links, such as those used by the header, footer, etc.

# General
code: "https://github.com/state-hiu/hiu.state.gov"
disclaimer: "This site is produced and maintained by the U.S. Department of State, Humanitarian Information Unit.  For more information see the [About Us](/hiu.state.gov/about) page."
privacy: "http://www.state.gov/misc/415.htm"
copyright: "http://www.state.gov/misc/87529.htm"

Search Engine Optimization and Social Media Integration

For Twitter Card support, set the twittercard.site variable to your twitter handle. Turn on/off with twittercard.enabled.

Open Graph is used primarily by Facebook, but is also used by some other sites. Turn on/off with opengraph.enabled. Unlike Twitter cards, you don’t specify your handle to receive analytics.

Slack’s robot will check for Twitter Card and Open Graph meta tags.

# Twitter
twittercard:
  enabled: true
  site: "@StateHIU"

# Open Graph
opengraph:
  enabled: true

Web Analytics

To enable Google Analytics and DAP, add the relevant information in the _config.yml. DAP powers analytics.usa.gov.

For Google Analytics (or GA), paste in your specific “Tracking Code” or “Tracking ID”. The code should be in format UA-XXXXXXXX-X.

For DAP, make sure you choose a standard agency and subagency code that is used for your projects, so DAP can aggregate analytics across projects.

# Analytics
ga:
  enabled: false
  code: "UA-XXXXXX-1"

dap:
  enabled: false
  agency: DOS
  subagency: HIU

Debugging & Testing

To toggle the minifed and non-minified versions of javascript files, change the values between true and false in the following section. If debug is true for a library, then the non-minifed version will be loaded.

# Debugging & Testing
debug:
  polyfill: false
  main: true
  angular: false
  bootstrap: false
  jquery: false
  leaflet: true

Document & Media Storage

This is the section where you point to the repository for your products, thumbnails, and other media. The storage container can be AWS S3, a Geonode, CKAN, NGINX Server, SharePoint, etc. This site will simply append the individual file to the root storage url.

# Document & Media Storage
storage:
  thumbnails_products: "https://s3.amazonaws.com/hiu-thumbnails/products"
  thumbnails_regions: "https://s3.amazonaws.com/hiu-thumbnails/regions"
  thumbnails_guides: "https://s3.amazonaws.com/hiu-thumbnails/guides"
  products: "https://s3.amazonaws.com/hiu-products"

GeoNodes

To enable integration with GeoNode set the following variables. The first GeoNode configured will be the primary and used on the main page. For example:

# GeoNode
# The first GeoNode is the primary one that is loaded on the homepage.
geonodes:
  - id: "state"
    name: "State GeoNode"
    layers: "http://geonode.state.gov/layers"
    csw:
      xml: "http://geonode.state.gov/catalogue/csw?request=GetRecords&service=CSW&version=2.0.2&resultType=results&maxRecords=1000&elementsetname=full&typenames=csw:Record&outputschema=http://www.isotc211.org/2005/gmd"
      json: "http://geonode.state.gov/catalogue/csw?request=GetRecords&service=CSW&version=2.0.2&resultType=results&maxRecords=1000&elementsetname=full&typenames=csw:Record&outputschema=http://www.isotc211.org/2005/gmd&outputFormat=application/json"
    wms: "http://geonode.state.gov/cors/geoserver/wms?SERVICE=WMS&REQUEST=GetCapabilities"
    tiles: "http://geonode.state.gov/geoserver/gwc/service/tms/1.0.0/geonode%3A{id}@EPSG%3A900913@png/{z}/{x}/{y}.png"

MapBox

For MapBox integration, the only site-specific configuration needed should be the access_token. See MapBox help page Create a new access token.

# MapBox
mapbox:
  access_token: "ACCESS_TOKEN"
  url_tiles: "https://api.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token="
  url_utfgrid: "http://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.grid.json?callback={cb}&access_token="