Skip to content
forked from uvarc/rc-website

Public website for UVA Research Computing

Notifications You must be signed in to change notification settings

wutcat/rc-website

 
 

Repository files navigation

Build Status

UVA Research Computing Website

Staging URL: https://staging.rc.virginia.edu/

Production URL: https://www.rc.virginia.edu/

Developing

Using Gitpod

Open in Gitpod

This will bring up a ready-to-code environment on the staging branch, and download and start hugo in server mode.


Local Install


Creating New Content

The TL;DR version:

  1. Make your changes to the staging branch and be sure to preview locally before you push back to GitHub.
  2. All website pages are stored within /content/
  3. You can use Markdown or HTML (or a mix of both) within pages.

Content of this website is contained in a series of markdown files within the content/ subdirectory. The site hierarchy consists of 7 subsections:

  • about - Mission statement and staff directory.
  • education - Workshops, links to CADRE Ed platform, etc.
  • form - All user forms for support tickets, consultations, allocation requests, etc.
  • post - General posts like features, announcements.
  • project - The series of recent projects featured in tiles.
  • service - Services offered by our staff.
  • userinfo - Systems and information we support: Rivanna, Ivy, Skyline, etc., and detailed user information.

Two methods for creating content:

  1. Copy an existing page and modify it.
  2. Create a new page using the hugo new command declaring a path to the .md object you want to create:
  • hugo new post/here-is-my-post.md
  • hugo new top-level-page.md

Helpful notes about creating content:

Front matter

Metadata for each web page is contained in TOML format at the top of each markdown page. The only required fields are usually TITLE and DATE. Categories and Tags can be as numerous as you find useful.

+++
categories = [
  "category1",
  "category2",
]
tags = [
  "hpc",
  "cluster",
  "ivy",
]
draft = false
date = "2016-12-20T09:07:38-05:00"
title = "Another Post Title Goes Here"
images = [
  "/2016/10/image-for-previews.jpg",
]
description = "This is where a brief page description could go."
+++

Shortcodes

You can do fancy things within regular markdown pages by using "shortcodes". A few examples:

Lead text (larger at the top of a post):

{{< lead >}}
  This text will be larger and more visible.
{{< /lead >}}

Embed a YouTube video:

{{< youtube w7Ft2ymGmfc >}}

A gist in GitHub:

{{< gist spf13 7896402 >}}

A simple highlight:

{{< highlight >}}
  This text is going to get some fancy highlighting!
{{< /highlight >}}

A specific tweet:

{{< tweet 877500564405444608 >}}

A CADRE Education Track tile:

{{< education-track 279 >}}

Shortcodes using {{< >}} simply render the text or HTML within the shortcode. Shortcodes using {{% %}} will also render any markdown within the shortcode.

Featured Content

To "feature" a post on the home page (which displays 2 most recent feature posts), simply add a CATEGORY with the value feature.

categories = ["another-category","yet-another-category","feature"]

Preview content locally

hugo server will bring up the local hugo server and give you a preview URL http://localhost:1313/. If making many changes, open another terminal to keep the hugo server running as you edit.

Publish content

Simply push staging back to GitHub. TravisCI will handle it from there. Pushing your content to the production website requires a PULL REQUEST.

Remember that after pushing your changes back to the staging branch, the https://staging.rc.virginia.edu/ website will be updated within 1-2 minutes. Hold down the SHIFT key when reloading your browser to refresh your local cache.

Delete content

  • Delete the .md object(s) you no longer want in the site, then commit and push.
  • To temporarily remove content, set the draft status of any .md object to true.
  • Republishing deletes remote files in S3/CloudFront.

Events Data

The "Training" widget and workshops page are both fed from a JSON API connected to the education.cadre.virginia.edu portal. They are updated when the site is published (by hand) or every 24 hours by a Travis-CI cron job.

Automated Builds

Travis-CI is a CI/CD tool that automates builds and deployments of the website code. Take note of the contents of .travis.yml and you will see instructions for how Travis builds the site:

  • Upon a push to staging or master it launches a customized container uvarc/hugo-build:v2.
  • That container runs a script that clones that branch of the repository and runs hugo -v --ignoreCache to build the site.
  • Travis then synchronizes the published HTML, JS, CSS, images and files to Amazon S3.
  • Finally, the build invalidates the CloudFront cache that serves out the actual website.

Build+deployment generally takes 70 seconds and can be monitored using the Travis-CI dashboard for this repository.

Search

Site search is provided by Google CSE. Publishing in hugo generates a /sitemap.xml file that is bound to Google's crawlers. If you would like to omit a page from search, include private = true in the front matter of your page. The crawler generally refreshes every 3-7 days.

Migration

This repository was transferred from the uvasomrc GitHub organization to the uvarc Organization in November 2019. Please update all links accordingly.

About

Public website for UVA Research Computing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 54.3%
  • JavaScript 38.7%
  • CSS 6.5%
  • Shell 0.5%