This repository has been moved and is no longer maintained at this location.
Landing page for Water Data for the Nation related projects
labs.waterdata.usgs.gov is where the development team that is putting together the new face of waterdata.usgs.gov will be hosting new services and sometimes user interfaces that, while production grade, may not be the final form that we want to support for a long time. These services may change or go away at any time.
The 'landing page' for labs.waterdata.usgs.gov is created with the use of the static website generation tool Hugo. Modification to site contents is accomplished by following standard Hugo procedures.
When adding a post, in general you should add the parameter containerclass and set as follows:
containerclass: grid-container
This will style the page on desktop to be the standard width (recommended by USWDS) for your page's content rather than full width.
A Dockerfile and Docker Compose configuration is provided that is capable of running a Hugo development server and building the static site which may deployed to Amazon Web Services through a task on a Jenkins job runner.
Using docker-compose
, you may run a Hugo development server on http://localhost:1313:
docker-compose build hugo_base
docker-compose up hugo
The default Hugo server instance will include draft articles.
If you only want to build the hugo static files execute the following commands
docker-compose up hugo_base buildDeploy.sh build --buildDrafts
If the need arises, you may run arbitrary commands in the container, such as a bash shell:
docker-compose run hugo bash -l
In order to do this you need to install hugo on your machine (see https://gohugo.io/getting-started/installing/)
You will also need to have the version of node the project is using which is currently 12.x.x. To build the static files required by the application execute the following commands:
% cd themes/wdfn_theme
% rm -rf node_modules
% npm install
% npm run build
You will then need to return to the project root directory and then execute:
% hugo server -D
This software is preliminary or provisional and is subject to revision. It is being provided to meet the need for timely best science. The software has not received final approval by the U.S. Geological Survey (USGS). No warranty, expressed or implied, is made by the USGS or the U.S. Government as to the functionality of the software and related material nor shall the fact of release constitute any such warranty. The software is provided on the condition that neither the USGS nor the U.S. Government shall be held liable for any damages resulting from the authorized or unauthorized use of the software.