 Welcome everybody. My name is Saskia and I'm one of the co-leads of the GTN. And in this video, I will show you how you can contribute to the GTN using Gitpon. Now, if you want to make changes to the GTN either add your own tutorial or just make changes to an existing tutorial, you often want to make these changes and already get a preview of what the resulting website would look like. Now you can do this several ways. So you can do this locally on your computer. You would need to install some components. But you can also do it completely online using Gitpon and that's what I'll show you today. We have training materials for this. I will show you now how to get there. So from the homepage, you see here on the right at the bottom we have a section for contributing to the Galaxy training materials. Here we have multiple tutorials and here you see the one we will do today running the GTN website online using Gitpon. Now, before we can do this, we are going to set up Gitpon. I'll familiarize you a little bit with the Gitpon workspace. I'll show you how you can build the GTN website inside Gitpon and view any changes you make. And then I'll show you how you can save all your work back to GitHub so that you can maybe make a pull request to add this to the GTN. Okay, so let's set up Gitpon. First thing you'll need to do is have a fork of the GTN GitHub repository. If you haven't done this yet, you can do this by going to the GTN GitHub repository here. And then at the top you will see here these buttons and one of them will say fork. And if you click on that button, so I already have a fork so it shows me I've already got one, but it'll make one for you if you don't have one yet. And then you will see something like this. So you'll see your own username, training material, and here you see an exact copy of the GTN repository. Now, so what we're going to do, we're going to copy already this link the URL to your fork. So it'll be something like github.com slash username slash training material, because we need to tell a Gitpod that. Okay, so once you have your fork, we can open Gitpod. Now one more thing if you already had a fork previously. There's a box here showing you how you can make sure that this fork you have is completely up to date with GTN. And that's always a good idea to do before you start. So let's say you made a fork last month. And you changes that happened in the last month to the GTN you will will not automatically be part of your fork where you'll have to refresh it. Yeah, there are pretty easy ways you can do this. So if you already had a fork, please look at this box and follow those steps. Okay, if you have your fork and solve to date, let's go to Gitpod. So open Gitpod.io in your browser. And this is a homepage and we'll go log in at the top right. And this is super easy you can log in just with your GitHub account. Press this button. And if you're already in this browser session logged into GitHub, it'll automatically bring you here and log you in. If you're not it'll ask you for your GitHub username and password. And then you're brought to your workspaces overview. So you see that I don't have anything active right now. And already tells you how you can start something and it's super easy. You just do Gitpod.io slash hash, and then the URL of your GitHub repository. So in this case the fork of the GTN. It says we'll go Gitpod.io hashtag and then we paste the URL of our GTN fork. And now it will configure our environment so it'll copy all the files from the fork. It'll install some things that it needs to run the website. So this can take a couple minutes. So now would be a great time to get a cup of coffee or tea or whatnot. A couple minutes here is not strange. It has started up and then you will see this workspace. At the bottom here you have a terminal. And you see that it went straight into installing some dependencies here. But after it's done, okay so it's done for me now. It took another minute or so. But then you can, this is just a command line that you can type commands into. Okay then on the left you see all, it's a file browser. You see all the files from the GTN repository. So this is your own copy. And then in the middle you can edit files and get a preview. So on the left here, so let's say we want to see what's in the contributors.eml file. We can click on that and then it opens in a text editor in the middle and we can type things here and so forth. Okay so whenever you want to make a change to the GTN you want to see, you see the effect of that change and how it looks on the website. So let's start a preview of the website and then make a change so that we can see how this looks. So to do that, it's a simple command here in the terminal portion of the workspace. You say make serve dash get pod. And hit enter. And then you see it starts building the website. And this should take 30 seconds or so. And it should automatically open a preview window in here. You see on the right here a little preview of the file you currently have open in here. You can browse the structure of the GTN so all our tutorials are under this topics folder, then grouped by topic, and so forth. So you see now here in the terminal that the building is done. You can see that the server is running. Now get pod doesn't automatically know where home page and so you might see something like this and then just say try again. And then you'll get this GTN error page again it doesn't. It's not very smart browser. But if we click on here we see preview of the GTN webpage. So let's say you spotted an error in one of the tutorials you want to make a change. I want to preview that change. So we're going to pretend that we want to take one of these tutorials for instance an introductory tutorial. The short introduction to galaxy so click here on the hands on tutorial for that. Okay let's say I want to change this title, I think we can make a better title. So what I would do is I would go to the tutorial file for this tutorial. Like I said this is kept in topics. And this one is in the introduction topic. I go there under the tutorials folder. And then it's galaxy intro short. Short. And then the tutorial and this opens now here. And we can just say I want this title not to be a short introduction to galaxy but a short and cool introduction to galaxy because it's a great tutorial. I type that you see immediately that there's some activity in the terminal at the bottom. It has detected your change and it's rebuilding website. So you should take a second or 10. Okay, so now it's done. And not to see this preview. You have to reload this frame to ignore this by right clicking this differs per browser in Firefox you go to this frame and reload frame in Chrome it's right there in the first menu. You can see that. Okay, the change we just made, you see how it looks in the preview. Now, if you don't like this way of reloading the frame, you can also click on the spot button at the top right to open this preview in its own tab browser tab, as we may have to allow some pop ups. And then you can create to the correct case again but then here you can just reload the quote unquote normal way. So, I can continue this. So it can make another change short and super cool introduction to galaxy again, the terminal will, or then it will detect the change and reload, then either refresh this frame, when it's done. So go to the other tab that you have open, and then you can just do refresh or you can do a five or control R and they see super cool tutorial there. So this is a nice easy way without installing anything on your computer that you can serve the GTN website make changes for you those changes. So, of course, then the last step in this process is also saving these changes back because right now this all these changes only live here and get pod, but you want to contribute them back to to the GTN. So you can then save them back to your, your own fork. So you can either stop this preview or here start a new terminal. This is already installed. So if you know a little bit of get on the command line. You can do it this way so you can create a new branch, you can commit the changes and then push those changes. And so I'll show you that way and then also show you because you don't have to do it by the terminal you can also there's buttons within get bought to this. So we'll check out a new branch. Let's call it update title. So here on the bottom left, you see the branch you're currently on. So it was the default branch main and as soon as I did that, it was update title. So if you don't want to give this command you can also click on this here, and then at the top, you can say create a new branch that you can type here name like a title, and then add it that way. So there are multiple ways to do. So I'm going to ask you for the branch name, and then give me your name. There are always two ways to do this. I won't because I already made a new title. And then we want to commit this change. I can always get status to see what has changed. So you can see here that I have one file modified. This is exactly the tutorial that I changed the title of. So okay, I'm happy with this. I want to put this and then make a pull request. I'm going to say, and get commit. And dash M for message. I'm going to say what I did. I'm going to say this file. So you type the name I can use tab to automatically complete this. So you just have to type the beginning every time introduction tutorials tab. And then you can push it. You're going to push it to your own fork. So you're going to say gets get push origin always points to your fork. And then you say again the branch name. And here you see it has pushed already gives you a very useful link to say, make the pull request for me. So you can control click or follow the link or click on this box. And then it will open the pull request menu for you and you can make her pull request woman. We'll give a good title. You can say of see short introduction. And then a little bit you get some information about why you did this, anything that people might need to know to review it. And then you can hit this button for to make the pull request. Now if you don't want to type these commands in the terminal, you could have done all of this also. If I am get by itself via user interface graph interface. So, okay, I'll have to make another change I can show you. Update the title yet again. Okay, nice see here on the left that this icon now has a one some of these. This keeps track of all the changes we've made. So you can text all the changes. So you can click this plus button to stage changes. Another way you can do this. So if you have made changes to multiple files you can say commit, and then commit all or only those that you've staged before. And then you can do the commit like I did in the terminal. And then once you've committed everything for the changes, then you can say you want to push this to your remote to your fork. Yeah, and then you can make a pull request as well. Yeah, so this is a very quick and easy way to get a preview of the GTN website, make some changes, and all of this without installing anything locally on your computer. Oh, and actually one last thing I wanted to tell you is that get pod. Everybody gets 50 hours for free. So when you are done using get pod is always a good idea to shut down your environment again. So you can do this. In the top left menu here with the three lines. You click on that. You can say get pod stop workspace. And to stop it in the other way is if you go to something is running and goes to get pod.io. It'll show you the workspace and so if it's still running. You can open it and it'll be a lot quicker than the first time it was and here you can also say stop. So it's, it's, yeah, good idea to stop this when you're not working on it so you check you save some of those 50 hours you can use. And that shuts down pretty quickly and then you see you have no more work spaces and you can easily start that again. So the first time I showed you had to copy the URL out there. After you've done that once you can hit this new workspace button I'll show you all of the, the ones you've used before and that you've access to, and then I can just click on this again to start it. And one thing you didn't see here is the very first time you do this for a new repository, you might have to set some permissions get but it's very convenient with this so it will. It will pop up asking you to set those permissions. There's also, it's also described here in a box. Let me see where that is in the training materials under saving your changes back to GitHub. The first time it might pop up with a message like this and say you need to give this extra permission so permissions for get bought to push your changes to GitHub. But they just click that button, and then make sure to select this checkbox under public repo as well, and then update permissions. That's only necessary once. Okay. That's it. Thank you all for listening and have fun.