tutorials:5
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| tutorials:5 [2023/04/03 13:22] – created tcmal | tutorials:5 [2023/07/29 11:10] (current) – removed tcmal | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== 5. Making a custom homepage ====== | ||
| - | As part of your Tardis account, you get your own subdomain at ''< | ||
| - | |||
| - | For now, let's start by making a static homepage (one that doesn' | ||
| - | |||
| - | We're going to assume a little bit of familiarity with Git, but not much with GitLab. Check the links [[tutorials: | ||
| - | |||
| - | ===== Logging into GitLab and making a repository ===== | ||
| - | |||
| - | Head over to https:// | ||
| - | |||
| - | We'll start with a blank project so we can learn - make sure your project name is ''< | ||
| - | |||
| - | ===== Setting up an SSH key ===== | ||
| - | |||
| - | Now we have our repository, we want to clone it locally. To do this, we need to authenticate to Gitlab in a way it understands - we'll use SSH keys because they' | ||
| - | |||
| - | In a terminal, run '' | ||
| - | |||
| - | Now run '' | ||
| - | |||
| - | Now we can use our SSH key to authenticate to Gitlab. Behind the scenes, this is using public-key cryptography. | ||
| - | |||
| - | ===== Cloning the repository ===== | ||
| - | |||
| - | Go back to the project you've just created and click the blue ' | ||
| - | |||
| - | Go to your command line and type '' | ||
| - | |||
| - | ===== Making a homepage ===== | ||
| - | |||
| - | For now, we're just going to make a simple homepage using HTML. Create a folder named '' | ||
| - | |||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | You should come back and edit this later, adding whatever content you want. | ||
| - | |||
| - | ===== Telling GitLab it's a homepage ===== | ||
| - | |||
| - | Now we have our ' | ||
| - | |||
| - | Create a new file called '' | ||
| - | |||
| - | < | ||
| - | image: alpine: | ||
| - | pages: | ||
| - | stage: deploy | ||
| - | script: | ||
| - | - echo ' | ||
| - | artifacts: | ||
| - | paths: | ||
| - | - public | ||
| - | only: | ||
| - | - main | ||
| - | </ | ||
| - | |||
| - | If you're not familiar, this file is used to specify CI steps, which can be used for automatically testing or deploying code when it's pushed to Gitlab. | ||
| - | |||
| - | Here, we're only defining one thing to do: ' | ||
| - | |||
| - | ' | ||
| - | |||
| - | ===== More ===== | ||
| - | |||
| - | We've just used plain HTML - if this is new to you then consider learning HTML, CSS, and JS - they' | ||
| - | |||
| - | If you don't want to keep writing HTML, consider using some kind of static site generator: | ||
| - | |||
| - | * [[https:// | ||
| - | * [[https:// | ||
| - | * [[https:// | ||
| - | |||
| - | [[https:// | ||
| - | |||
| - | As we've mentioned, Gitlab CI can be configured to run any command, so you could even make your own custom scripts to do this - [[https:// | ||
| - | |||
| - | Also note that you can have multiple repositories - If you do this with a repo called '' | ||
tutorials/5.1680528174.txt.gz · Last modified: 2023/04/03 13:22 by tcmal
