portage-CEG / portage-ceg.github.io

https://portage-ceg.github.io/
0 stars 3 forks source link

Portage CEG Data Curation Survival Guide

This is the repository for the Portage Curation Expert Group Data Curation Survival Guide Data Curation Tools & Resources list.

How to add resources and update this site:

Submissions to the list are made through a Google Form, which populates a Google Sheet. Members of the Portage Curation Expert Group are responsible for reviewing, editing, and approving entries. Once an item is approved, it appears on the Data Curation Tools & Resources list.

Submitting a resource

If you'd like to contribute a resource or tool, perform the following steps:

Reviewing submissions (CEG Admins)

When a new submission arrives, review the submitted information. Once you're ready to publish the entry to the Survival Guide, set the value in the Ready to Publish? field (Column I) to YES. This will make it appear in the To Publish tab. Entries can be unpublished by setting the value in the Ready to Publish? field (Column I) to NO

Some cleanup has been carried out automatically in the sheet:

Some considerations for cleanup:

Updating the survival guide pages (Site Admins)

The Python3 script csv_to_jekyll_portageceg.py updates the posts/pages by doing the following:

The full process to update the pages are as follows:

As of 28-Feb-2020, this script is run automatically every 60 minutes. This is currently taking place on Jay's local machine on a test basis. More information on the setup for automatic updating is found at the bottom of this document, and a generic form of the bash script used is included in this repo as auto_update-example.sh.

This process can be run manually on any machine of a user with appropriate push rights.

Credit: The csv_to_jekyll_portageceg.py script expands upon the code created by Evan Lovely and described here.

How this site works

This site is rendered by Jekyll. Alex Gil has written a descriptive tutorial on Jekyll, but in a nutshell, Jekyll is a 'static site generator' that relies on templates, metadata, and simplified code.

Markdown

GitHub pages are primarily written in Markdown--a simplified markup language that turns plain text into html. There are a number of different 'flavours' of Markdown; this site is written in Kramdown. Here's a Kramdown Cheat Sheet. Markdown files can be created right in GitHub, or written in your favourite text editor. They must be saved with the extension .md. (fun fact: this README is written in GitHub flavoured Markdown, which doesn't have as many options as Kramdown...especially when it comes to the table of contents. Make sure you specify Kramdown if you are searching outside tutorials!)

Front matter

Each page needs to start with YAML front matter. Basically, this is metadata that provides information to Jekyll on how to render the page. It looks like this:

---
layout: post
title:  Hello World!
date:   2018-10-04
categories: tutorial
tags: website
      jekyll
      library
      portage
permalink: /hello-world/
---

There are more options available for metadata at the link above, but I'll break down what's here.

Liquid Tags

This is probably the most complex part of Jekyll, but luckily, for a simple static site like this, most of the liquid tags have already been placed out-of-site in the templates. If you want to know more, here is some basic Jekyll documentation on liquid tags. (fun fact: the Liquid language was created by Shopify!)

One way of using liquid tags is to call information from the Front Matter. A tag like {page.title} in Markdown will display the title of the page. A tag like {page.date}will display the date listed in the Front Matter. Liquid tags can also be used for more complex coding operations, like 'for-if' loops.

General Formatting

Markdown is really easy. Rather than listing everything here, you can check out the Kramdown Cheat Sheet OR you can look at the raw output of this readme file to see how this page has been rendered. To access that, view the file here, and click on 'Raw' in the top right corner. You can inspect any page in this repository by looking a the raw contents. This can be especially useful when creating new pages, simply copy and paste from the raw output that you want to emulate, and then fill it in with your own text.

Process to create auto-updating pages:

What JB did to autoschedule updates: