The website source code for greenelab.com
To make a change to the site, make a pull request from a branch or your own fork. Once you make the PR, Netlify should automatically make a preview where you can see and test your changes before merging them.
See the "Overview of contents" section below to find where and how to edit certain parts of the site. Anything you change should update in the preview no problem, with one exception:
If you're updating publications on the "Research" page, a script needs to be run to generate citations.
To run the script, either manually run ./build.sh
locally, or make your PR as a branch (this upstream bug prevents forks from working for now) to have it run automatically.
If you are modifying .html
files, .css
files, .js
files, liquid syntax, icons, config files, bash scripts, or python scripts, request a review from @vincerubinetti or someone else very knowledgeable in HTML/CSS/JavaScript/Jekyll.
If you are modifying .md
files or /images
files, request a review from @cgreene.
When in doubt, request a review from both.
If you want to test your changes locally, before making a pull request, you'll need to install a few things:
Then, run ./start.sh
.
Here are some important directories and files you'll want to know about.
Directories
/.github
- GitHub Actions config info/_data
- Intended to contain large, order-preserved sets of data to be formatted and displayed on a page/_includes
- Small, reusable snippets of HTML content that can take parameters/_layouts
- Templates that all pages will be built upon/_members
- Collection of team members, non-order-preserved. Each file will generate its own page, per_config.yml
./_posts
- Collection of blog posts. Each file will generate its own page per Jekyll default behavior./_site
- The built/processed output of the entire Jekyll site. This is what GitHub will read to make the GitHub Pages site./css
- Site-wide CSS files, and CSS files for_includes
/js
- Site-wide JavaScript files/icons
- Favicons, share thumbnails, and related metadata icons/blog
,/contact
, or any other directory - A sub-directory to make in the resulting site. Anindex.md
will be the default page when user navigates to the sub-directory. I.e.https://greenelab.com/join
will redirect tohttps://greenelab.com/join/index.html
(generated fromindex.md
). Any.css
or.js
files in the directory will be automatically included for that sub-directory only.
Files
/_data/research-input.yml
- A list of just identifiers (and some sparse metadata) for publications to put on the "Research" page. Gets automatically processed into the corresponding output file with full citations./_data/research-output.yml
- The generated, actual list of publications that ends up getting displayed on the "Research" page, with full citation data/_data/resources.yml
- The list of resources on the "Resources" page_config.yml
- Jekyll configuration404.md
- Default 404 page for when user navigates to page on the domain that isn't definedbuild.sh
- Convenient bash script to rebuild the research pagestart.sh
- Convenient bash script to run a local preview of the siteGemfile
andGemfile.lock
- Files that specify the package dependencies of the project. Similar topackage.json
andpackage-lock.json
innpm
.index.md
,index.css
, etc. - Home page (i.e.greenelab.com/
) files. Works in the same manner as sub-directories, except applied to the root directory.
For color, logos, etc., follow the Greene Lab style guidelines.
For making thumbnail images for publications, resources, etc., follow the Manubot thumbnail guidelines.
In general, if you have a question about a particular part of the site, check the corresponding file for comments. If something is not clear, create an issue to update the documentation.