Running the Galaxy Training material website locally
- How to setup the infrastructure to build training webpages?
- Installing packages needed for rendering the webpage
- Running the GTN material website locally
- Tracking changes to the content live in the webbrowser
time Time estimation: 15 minutesSupporting Materials
If you want to run the entire GTN material website locally or test your new training material you can do this!
Currently, the website is generated from the metadata and the tutorials using Jekyll, a simple static site builder. We can use Jekyll to run a server to check if the tutorial is correctly added and rendered.
In this tutorial, you will learn how to run a local instance of the GTN website:
Installation of the requirements
The first step is to install the needed tools inside a conda environment. A conda environment is a directory that contains a specific collection of packages. For example here to run the website, we need ruby, pandas, requests, etc. By creating a conda environment and installing the needed tools there, we do not affect your main installation.
This step has to be done once.
hands_on Hands-on: Install the requirements
- Open a Terminal
- (If not done yet) Clone the training material GitHub repository:
git clone https://github.com/galaxyproject/training-material.git
- Navigate to the
Set up the conda environment
It will install some needed tools (ruby, nodejs, etc) in a protected environment, without interfering with the existing tools or versions.
- Install conda (if not already installed):
- Create the
- Install Jekyll and related modules into the conda environment:
If you encounter an error about libxml2 on Linux, please try to install
sudo apt install libxml2-dev) if on Debian/Ubuntu or
sudo yum install libxml2-devel) if on Fedora/RedHat/CentOS, and re-run
Checking the website generation
Once Jekyll and its modules are installed in our conda environment, we can check the generation of the website locally:
hands_on Hands-on: Checking the website generation locally
- Run a local Jekyll server with
- Visualize at http://localhost:4000/training-material/
- Edit one of the tutorials:
- For example, open
topics/introduction/tutorials/galaxy-intro-peaks2genes/tutorial.mdin a text editor of your choice.
- Make some changes to the Introduction paragraph, and save the file.
- Refresh the tutorial page in your browser until you can see the changes you made.
- this may take a little bit of time; in the terminal you can monitor when the regeneration is complete
make serve, a local Jekyll server will run in background. It will check the changes and regenerate the website accordingly. You may need to reload the page to see the changes (and sometimes to wait 1-2 minutes).
Stopping the server
Once you are done, you can stop the server and cleaning your repository.
hands_on Hands-on: Stoping the server
- Stop the server with CTRL-C
- Clean the repository:
keypoints Key points
- Checking the generated website can be done locally
congratulations Congratulations on successfully completing this tutorial!
Developing GTN training materialThis tutorial is part of a series to develop GTN training material, feel free to also look at:
- Overview of the Galaxy Training Material
- Contributing with GitHub via command-line
- Contributing with GitHub via its interface
- Creating a new tutorial
- Creating a new tutorial - Creating Interactive Galaxy Tours
- Creating a new tutorial - Defining the technical infrastructure
- Creating a new tutorial - Slides
- Creating a new tutorial - Writing content in Markdown
- Generating PDF artefacts of the website
- Including a new topic
- Running the Galaxy Training material website locally
feedback Give us even more feedback on this content!
To give us more detailed feedback about these materials, please take a moment to fill in the extended Feedback Form.