Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
/ waterdata_labs Public archive

Landing page for experimental labs.waterdata.usgs.gov

License

Notifications You must be signed in to change notification settings

usgs/waterdata_labs

Repository files navigation

WARNING ⚠️

This repository has been moved and is no longer maintained at this location.

Water Data Labs

Landing page for Water Data for the Nation related projects

Welcome to the experimental space of waterdata.usgs.gov!

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.

Create with Hugo

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.

Specifying page layout for a post

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.

Build and develop with Docker

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.

Local development

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.

Build static site

If you only want to build the hugo static files execute the following commands

docker-compose up hugo_base buildDeploy.sh build --buildDrafts 

Debugging the container

If the need arises, you may run arbitrary commands in the container, such as a bash shell:

docker-compose run hugo bash -l

Build and develop on your local machine

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

Disclaimer

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.