Skip to content

The Lab Website

Teemu Rönkkö edited this page Nov 14, 2022 · 21 revisions

The lab website is built with the research group theme of HUGO. It can be edited either through the admin page or via GitHub. The GitHub repository for the website is here: https://github.com/neurogenomics/neurogenomics-lab-website.

Editing the website (common tasks)

You can either clone the git repository to your own local machine or make changes to the git project on GitHub. If you choose to clone the git repository on your own machine, here's how to do it:

  1. Open terminal and clone the website to edit with the following command:

git clone [email protected]:neurogenomics/neurogenomics-lab-website.git

  1. Set working directory to this project directory with cd and edit/add files as necessary.

  2. Push the changes you have made with the following commands:

git add . --all git commit -m "Write your commit message here (e.g. Added new profile for <new lab member>". git push

  1. Your edits have now been pushed to the website and in a couple of minutes, you can see the changes on the website.

Creating and editing your profile on the lab website

Please create a profile for yourself on the lab website. The website is managed through github. An individual's profile is created through pushing a config page into a person's folder, e.g. Roxy's folder. No matter how long you'll be in the lab would be great if you could create a profile. Easiest way is to send me a profile photo, with a short bit of descriptive text, details on your degrees and links to github/twitter/linkedin pages.

If you want to add your own profile yourself on GitHub, there's also a profile template in content/home/profile_template.md. You can copy this, rename it to _index.md and create a personal folder for your profile (folder name not including spaces) under content/authors/. Add a profile picture in this folder as well and name it as avatar.jpg or change the avatar_filename variable in the newly created _index.md file to match the file name of your profile picture. If there are social links you want to delete, simply remove these lines (e.g. twitter) if you don't want them to be included in your profile. You can make further edits to your profile by editing the _index.md file, e.g. if you want to update your bio or change your profile picture.

NOTE: The user_groups variable has to be set to the correct group the lab member belongs to. These groups are listed under "user_groups" in https://github.com/neurogenomics/neurogenomics-lab-website/edit/master/content/home/people.md (e.g. Alumni).

Change the categories of people (e.g. add bioinformatics)

Edit in this doc: https://github.com/neurogenomics/neurogenomics-lab-website/edit/master/content/home/people.md

If you want to move a profile to another "user group", change the user_groups variable to the correct group, for example "Masters Student" to "Alumni".

Change the text or background image in 'whats new'/top section of the web page.

Edit /content/home/welcome.md if you want to make changes to the "header" section of the webpage. The background image for this section is stored in assets/media/header.png. You can change the header by replacing the header.png file with another image or alternatively editing the image variable in content/home/welcome.md.

Importing publications from bibtex

Use the academic-tool: https://github.com/wowchemy/hugo-academic-cli. Make sure you install the version included in the command below – otherwise the publications won't be parsed correctly. Install academic tools with pip3:

  1. pip3 install academic==0.5.1

  2. Add the BibTeX reference for the new publications you wish to add in a file called works.bib in the root folder of your project directory. You can also export the works.bib file from your own Orcid profile.

  3. Clone the GitHub repository to your computer with the instructions above. In your terminal cd to the project directory and git pull to get the most recent version of the website (if you already had the repository cloned on your machine). Then use the following command to create index.md files and folders under content/publication/: academic import --bibtex data/works.bib --normalize

  4. Once you have added the publications, you can remove the works.bib file.

  5. To make sure that the publication you added is linked to your account on the lab's website, you have to edit the authors field in the index.md file you have just created. Therefore, in the list of authors, make sure that the initials of your middle names are not included and the name appears exactly like it does on your profile on the website. For example, if in the authors field Nathan's name is written as "Nathan G Skene", it won't appear in his profile – the name has to be exactly "Nathan Skene".

  6. If you wish to include a link to the pdf of the publication you have just added, add a field url_pdf: and insert the link to the article website.

  7. Once you have made sure the author names of the lab members are inputted correctly and the link to the article pdf is set, commit and push your changes to the GitHub repository (from the project directory): git add . --all git commit -m "Added new publications" git push

Adding a news post

Create a new file/folder equivilent to: neurogenomics-lab-website/content/post/welcome-di-hu-to-the-lab/index.md

Or just use the content management system

If you want to add images to your post, place the image in the folder you created for the post and display it in the post by inserting the following line to your post text: ![write your caption here](filename.jpg)

If you want to make yourself as the author of the post, simply write your name (as it appears on the webpage) in the authors field in the following way: authors: ["Firstname Lastname"]

If you want to include multiple authors, separate author names with commas: authors: ["Firstname Lastname", "Second Author"]

Edit the homepage text

Edit the contents of /neurogenomics-lab-website/content/authors/admin/_index.md. You can also change the "profile picture" by changing the avatar image stored in the folder. Make sure that the avatar_filename field points to the right image stored in the admin folder.

Editing major structural elements

Add new types of sections / widgets

The widgets/sections that are available are described here.

In short, go here: https://github.com/neurogenomics-lab-website/tree/master/content/home and create an .md file for the widget/section you want to include. You can activate it by setting active: true and vice versa. Remember to also update the file which controls the navigation bar on top: config/_default/menus.yaml. You can reorder the items in the navigation bar by changing the value of weight.

Managing the site / DNS

For instance, if you want to control who can login to the content management system then go to https://app.netlify.com/teams/nathanskene/sites

Invite / remove users who can access the content management system

Nathan manages the people who can access the content management system with https://app.netlify.com/sites/modest-wing-c6e306/identity. If you want to have these rights added, contact Nathan.

Web page not updating

If the webpage doesn't seem to be updating, there is probably an error occurring. You can see the deploy summary on https://app.netlify.com/sites/modest-wing-c6e306/deploys by choosing the most recent deploy. Scroll down and look for the error – usually errors are caused by small syntax errors.

Clone this wiki locally