Giter VIP home page Giter VIP logo

jflab's Introduction

JF Lab Website Maintenance

CI Update Lab Members

Visit at www.jflab.ca

Requirements

Options:

  • To build locally, please follow all the steps below.
  • To only work from Github/Netlify, start at Step 3.
  1. macOS, GNU/Linux, Unix (doesn't work as well on Windows, but might work depending on your set-up)
  2. Jekyll Static Pages Generator
    • please follow the instructions carefully to download prerequisites (Ruby, RubyGems, GCC/Make)
    • once you have these working:
      gem install jekyll
  3. A Github Account (it's free!)
  4. Access to the Github repo and Netlify.com
    • see previous administrator to add you
  5. Python 3.6+ (if using 3.4/3.5, you need to remove any f-strings)

Usage

Adding Publications Manually

  • See the examples in _data/papers.yml and fill in papers with the appropriate information.
  • all fields except link (for pdfs) or alt_link (for online version link) are required
  • order from most recent to oldest
  • to link a PDF, place the pdf in the _site/pdfs/ folder and link to it in the link: field using the format pdfs/name-of-pdf.pdf

Adding Publications Automatically via Pubmed Search

  • Make sure you have Python 3, then run the following in command line: > pip install biopython
  • Edit the author and user_email variables in the main() function of update_papers.py to match your NCBI author search.
  • When running the first time, please check to make sure that _data/recent_pubmed_ids.txt is empty (just delete whatever is currently there, as this data belongs to a previous websites template and won't apply to your website).
  • Run the following in command line:
> cd website/folder/
> python update_papers.py
> git add _data/*
> git commit -m 'updated publications'
> git push origin master

The main.yml GA Workflow file also automatically checks for new publications and adds them to the website on push to master.

Changing Members

  1. Edit the lab member info google spreadsheet. There is a shared google spreadsheet for lab members to update their own information. Please ask the current site administrator for acess. The website will update the repo data on push to master via GitHub Actions.
  2. Add the member's image file to img/ folder The image filename must match img_id for the member in the spreadsheet (e.g. img_id: paul.png). Images should also be square in dimensions to prevent warping. Common image file types accepted (.jpeg, .png).

Making a new page

Copy the template.md under pages/ to make your new page.
If you use permalink: /title/ tag, the link will be site.com/title/

Making a new post

Copy the template.md under _posts/ to make your new post. Fill in the correct info and you're done, files must be named according to YYYY-MM-DD-title.md

This site was modified from https://github.com/y7kim/agency-jekyll-theme

jflab's People

Contributors

linamnt avatar ridaansari avatar actions-user avatar ccmckenzie17 avatar

Watchers

James Cloos avatar

jflab's Issues

Upgrade Undergraduate Section

I added the undergraduate section sometime last year but haven't yet integrated all the yaml parsing of the other sections. This fix involves:

  • editing members.html to parse the same yaml metadata as presumably the grad student section
  • edit the default template structure for a member block in _data/undergrad.yml to include the same tags as grad student section
  • update the names (some students listed aren't working with us anymore, and some new students are missing)
    • since no volunteers are working right now, we can wait until after the opening to reconfirm the names, but for now, can update the ones already there

Add google sheets integration for member data + include workflow in GitHub Actions

Suggestion

Read data from a Google Sheet using Python to format the yml files.

This will allow any lab member to update their own information in the google sheet at any time, and will automate the process of updating the website via a workflow in GitHub Actions which can be triggered manually, on a schedule (e.g. every few months) and/or after any pushes to the repo.

TODO

  • generate collaborative Google Sheet and populate with existing data, created credentials
  • find best way to use credentials.json with GitHub while maintaining security (i.e. without uploading the private keys on public repo...make them environment variables?, via github secrets tokens? cannot use a full json in github secrets)
  • share access with lab members to update as necessary
  • python script using Google Sheets API (some instructions here) to access sheet and update the YAML files in _data/
  • create a workflow in GitHub Actions

Rearrange member listing alphabetically

It's just better. I think we had it by date of joining the lab on the old website because either wordpress would just log by date added or it was maybe easier to just append to the end. I originally scraped all the info from franklandlab.com, but we definitely don't need to keep this order on the new website as it's as easy as moving the yaml data around on the new website.

@ridaansari I will get to this at some point, so I just wanted to leave it here as a reminder, but if you wanted to, feel free, but definitely no problem if not, I will aim to do this in the next week or so.

TODO

These are the files we need to update:

Alumni seems to make sense to keep reverse chronological, but open to discussion. The PI list I think is tied to the twitter previews at the bottom, we can keep that the same for now too.

We just need to move each data block in the alphabetical order you want them displayed in each file, making sure to keep at least one blank line between each block.

I don't know if people prefer alphabetical by first or last name. It could be kind of funny to display how many people with names that start with "A" we have.

Alternative Solution:

Sort by field in Jekyll rather than order written in YAML file, see this SO answer. Main reason why this would be better is to reduce the chance for typos and breaking errors in the syntax (too much too little white space/tabbing) when having to insert of move items around, rather than appending to the end.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.