All you need to know about this GitHub repository
General rules
As an editor, try to work as much as possible on a different branch than the main branch. This can be on the ELIXIR Europe Training SPLASH repository or your own fork. Open a pull request if you want to merge your changes with the main branch. This way it is possible for other editors to give feedback on your changes. Typos or other small fixes can of course be done immediately on the main branch.
Overview of the file structure in GitHub
The content of the website is built up using markdown files found in the pages directory. These markdown files are divided over subdirectories for sorting reasons only.
Markdown file naming
- Markdown files should be named without capitals and without spaces (replace them with underscores).
- Make sure that the markdown file has a unique name.
- If the markdown file is named example.md, the page will be found at https://https://elixir-europe-training.github.io/ELIXIR-Training-SPLASH/example.
- By default a page will not show up in the sidebar. In order to do so you will have to add the link towards the page to the
.yaml
file in the _data/sidebars directory or link towards it from another page. More info about this can be found on the find your page back section.
GitHub checks
With each
PR
Pull Request
or merge to the master, some checks are done using GitHub actions. One of them checks wether the website builds correctly. The other checks for changes in the tool/resource Excel table. When each of them fails, the
PR
Pull Request
will not be able to be merged. Click on the red dot/failed check to understand better what caused the fail.
Label, discuss and assign issues
- Check open issues regularly or enable notifications by clicking the “WATCH” icon in the top-right side of the GitHub repository.
- Assign labels to issues.
- Discuss who is going to be responsible for each issue with other editors and reviewers (via issue comments or other communication channels).
- Assign at least one editor/reviewer to the issue, who will discuss the possible content with the contributor.
- When a Pull Request (
PR
Pull Request
) or a draft PR Pull Request
related to an issue is created, link the PR Pull Request
to the issue.
More information about these topics can be found in the GitHub documentation:
Review pull requests
If contributors make a pull request to make changes, by default the editors that are responsible for files that will be changed by the
PR
Pull Request
will be assigned and notified. All
PR
Pull Request
should be assigned to one of the editors. Before merging a
PR
Pull Request
, pages’ tags, and tools and resources’ tags should be checked and assigned according to the established tagging system. The editor who provides the last approval to a
PR
Pull Request
should also merge it.
Link a pull request to an issue
- When you make a pull request resolving an issue, it is possible to link this pull request to that specific issue. This can be easily done by writing in the conversation of the
- PR
- Pull Request
- </span>
closes #number_of_issue
, orfixes #number_of_issue
or evenresolves #number_of_issue
. This is definitely applicable when authors first open an issue announcing a change or requesting a new page, followed up by the pull request. For more information about this topic please visit the GitHub documentation page.
Create a new page
Simple way: using the GitHub interface
To generate a new page it is sufficient to simply copy the TEMPLATE file in the subdirectory and rename it. To copy a template you have to:
-
Go to the
TEMPLATE_
file of choice in the GitHub repo, every section has its own TEMPLATE file. For example the TEMPLATE_resource_page.md file. - Click “Raw” on the GitHub page to open the file ‘as is’
-
Select and copy all the content.
- Go back to the main section were you want to make the new page, in our example this will be in /pages/resources. Click on
Add file
on the right followed up byCreate new file
. -
Paste the copied content from the template.
- Name the file by choosing a unique self explaining short name without capitals and without spaces (replace them with underscores).
- Check the frontmatter/metadata of the markdown page:
- delete
search_exclude: true
attribute. - add the author names to the contributors list.
- optional: change the title into an appropriate one.
- delete
- Describe shortly which changes you made in the description of your commit below the page. Commit to a new branch and click
Commit new file
. -
Wait till another editor approves your changes. After approval, the branch can be merged and changes will be applied.
- If the markdown file is named example.md the page will be rendered at https://https://elixir-europe-training.github.io/ELIXIR-Training-SPLASH/example. This link can be provided to the contributor through the issue.
Advanced: working on your own feature branch and pushing local changes
Just like with every change you want to make to this repo, it is possible to do this through Git by working on a local copy. For more information on how to do this, please read our working with Git page.
Find your newly added page back on the website
By default your page will not be linked in the sidebar on the website, or on the landing page, but it will exist as an orphan at https://https://elixir-europe-training.github.io/ELIXIR-Training-SPLASH//markdown_file_name. In order to prevent that people will not find the page back it is better to link towards it in the sidebar or get linked within an existing page.
Linking pages in the sidebar and frontpage
Make sure all pages are accessible from the navigation sidebar. Please, avoid generating sub-pages that are not directly accessible from the navigation sidebar.
This website supports multiple sidebars, the one in the main sections of the website is for example different from the one in the contribute section. Both of them are defined by .yaml
files in the _data/sidebars directory. Changing these yaml file will immediately impact the sidebars and the frontpage of the website. The sidebar supports multiple levels and each level in the hierarchy can contain a
URL
Uniform Resource Locator
to a page within this website or an external
URL
Uniform Resource Locator
.
The attributes that define the structure are:
title
: This is the text that will show up in the sidebar.url
: The URL Uniform Resource Locator
to the internal page you want to link to. This is mostly in the form of: /markdown_file_name.html.external_url
: Use this instead of URL Uniform Resource Locator
if you want to link to an external page.subitems
: to define a sublevel.
- title: Level_1_title
url: level_1_url
subitems:
- title: Level_2_title
url: level_2_url
Link page within existing page
Avoid manual linking to internal pages. If necessary, you can manually link to the pages like this:
If the markdown page is named example_1.md, you can link towards it using:
[Example 1](example_1)
Adding extra info to the contributors
Do you want that the GitHub picture of a contributor is shown next to their name? Or maybe you want that the name is clickable and links towards the GitHub page of that person? To enable this please add the name and the necessary metadata to the CONTRIBUTORS.yaml file in the _data directory like this:
Alexia Cordona:
git: ac812
email: ac812@cam.ac.uk
orcid: 0000-0002-7877-5565
role: editor
affiliation: University of Cambridge
Adding an institution, infrastructure, project or funder
Institutions, projects, funders and infrastructures are listed in the affiliations.yml file. The info in this file is used on the support page in the about section, but also for the affiliations in tool assembly pages. Make sure you make use of the same name in those assembly pages. The yaml file has following syntax:
- name: VIB
image_url: /images/institutions/vib.svg
pid: https://ror.org/03xrhmk39
expose: true
type: institution
url: https://www.vib.be/
name
: nameimage_url
: relative url towards the imagepid
: url including the unique identifier towards the page of the association on RORexpose
: true or false, when true this association will be shown in the about sectiontype
: can be any of these values: institution, funder, infrastructure or projecturl
: url towards the homepage of this association
The logos can be added to the /images/institutions, /images/projects, /images/infrastructures and /images/funders directory.
TODO Work to be done :
related_pages:
your_tasks: [page_id1, page_id2]
your_domain: [page_id1, page_id2]
tool_assembly: [page_id1, page_id2]
Page ID
To find out what the page_id
of an Training SPLASH page is, please check its metadata attribute page_id
at the top of the markdown file or the list of page IDs.