Documentation

How to edit this site

Setting up

Installs

Enter the self service app which can be found on windows and install:

Environment

The project code is located in GitLab. You will need to request access to this project first.

Once you have access open VSCode, click terminal -> new terminal on the top menu and type the following commands.

service-start ssh-agent
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
git config --global user.email my.name@physics.ox.ac.uk
git config --global user.name My Name
ssh-keygen -t ecdsa

After answering some questions and typing a password (required). This will generate an ssh key you can use to access repositories.

ssh keys come in two parts, both located in .ssh/config/, the .pub file can be sent to people and uploaded to GitLab.

The other part is your private key, never share this. This is effectively your password.

Once this is done we can test git/ssh.

ssh-add .ssh/id_ecdsa # this will request your password
ssh git@gitlab.physics.ox.ac.uk

The second command should respond with your GitLab username.

Checkout

Click the code -> VS Code SSH link in the GitLab project.

If you’ve never setup a project before this will ask you where your projects should be stored, I would recommend creating a H:\projects directory and selecting this.

This will now get the project, when it does click “open in new window”.

Running the site

In the VSCode terminal:

git submodule update --init # to get the theme
hugo serve # to run the site.

From here any change you make to the website should be reflected in your local copy.

Editing

Existing pages

To modify an existing page locate the index.md file in the appropriate folder. Make the changes you require and do the following in the console.

git add <path>
git commit -m 'why I made this change'
git push

The change will be reflected in the site after a few minutes (if it passes validation).