Updating the website
Overview
This guide will help you update and maintain our lab’s website. Most content edits require Markdown knowledge (using Kramdown). For significant changes, you might want to preview them locally with Jekyll, though it isn’t required.
Here’s what you’ll find in this guide:
- Previewing Changes Locally
- Repository Structure
- Adding Lab Members
- Adding Publications
- Adding News
- Creating a New Page
- Adding New Plugins
Previewing Changes Locally (Optional)
If you’d like to preview your changes before pushing them to GitHub, follow these steps:
- Install Ruby and Jekyll.
- Clone the repository:
git clone https://github.com/hypermatrixlab/hypermatrixlab.github.io.git
- Navigate to the project folder and run:
bundle install
- Build and preview the site locally:
bundle exec jekyll serve
Then open http://localhost:4000 in your browser.
Refreshing the page will show your edits instantly. If you change configuration files (e.g., _config.yml
), you’ll need to restart the server.
Repository Structure
Understanding the repo structure will make it easier to find what you need:
-
_pages/
: Markdown files for pages (e.g., homepage, about). PDFs are in thecontent
subfolder. -
assets/
: Images and other media files. -
_sass/
: CSS styles. Colors are set in_variables.scss
. -
_includes/
,_layouts/
: HTML files that control page structure. -
_config.yml
: Site configuration and metadata. - Other folders (
_bibliography/
,_data/
,_plugins/
): Not currently used, but may be useful in the future.
Adding Lab Members
To add a new member to the website:
- Open the file _pages/about.md.
- Add the following to the relevant section: ```yaml
- name: “The Name” description: “Job title, date” website: “example.com” # Remove this line if not applicable picture: “hyper_matrix.png” # Replace with the actual image file name (e.g., name.jpg) if adding a new photo ```
- If you are adding a new picture, upload it to assets/img.
To add a new section for members, define it in groups
at the top of the file, and create the section as shown below:
newgroup:
title: "New Group"
people:
- name: "First Last"
description: "Job Title"
picture: "name.jpg"
Adding Publications
To add a publication:
- Copy the BibTeX reference of the paper.
- Add it to
_bibliography/papers.bib
.
Make sure the following fields are filled out:
- year
- month
- author
- url
- booktitle(this can be title for any manuscript
Papers are displayed in reverse chronological order.
Adding News
- Open _pages/about.md.
- Edit the
news_items
section: ```yaml news_items:- date: 2024 title: “Accepted Papers 2024” content: “2 papers (NeurIPS), 2 papers (NAACL), 2 papers (EMNLP)” ```
Add new items at the top to keep the news updated.
Creating a New Page
- Create a new markdown file in _pages.
- Include a YAML header:
--- layout: page permalink: /new-page-slug/ title: "New Page Title" description: "Optional description" nav: true # Set to false if not in the navigation bar nav_order: 6 # Lower numbers appear further left ---
- Add the content below the header.
Adding New Plugins
- Add the plugin to
_config.yml
under theplugins
list. - Add it to the Gemfile.
- Install the plugin:
gem install gem-name-here bundle install