Setting up access for lab website editing
Overview
Obviously, there are multiple levels of safety controls on the content that appears on our public website.
- Our website is STATIC – whatever interactivity it offers is entirely client-side. This means there is very little attack surface for hackers.
- This static content is generated using the broadly used al-folio template for Jekyll, a well-tested open-source static website generator. Additional public code repositories are merged into this static website, and then it is
rsynccopied into the live server. - Nobody except Prof. Revzen has access to the staging server.
- The source of the website in the staging server is under git version control in the tir:BIRDS-website repository, making it easy to roll back changes and merge changes from multiple sources.
- Unless you are intended to be a website maintainer, that repository should be invisible to you.
Preparing to Edit the Website
If you are planned to be a website maintainer, you should do the following (instructions for UBUNTU 24.04 only):
- Make sure you have the ruby-full package installed sudo apt install ruby-full
- Installed the ruby
bundlergem (“gem-s” are ruby packages). gem install –user-install bundler - Make sure the bundler code is available to be executed in your execution PATH ln -s $HOME/.local/share/gem/ruby/3.0.0/bin bin echo ‘export PATH=$PATH:~/bin’ » ~/.bashrc source ~/.bashrc
- Get the website source (NOTE: you will need about 2GB free for this). I assume you already have access to tir via instructions in tir:BIRDS-website. git clone tir:BIRDS-website
- Install all the needed parts of jekyll cd BIRDS-website bundle install
- Test (you need to be in the BIRDS-website folder) ./do_site local
- Assuming you got a message like “Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/)”, you should now be able to see your local version of the site at localhost:8000.
Editing
If everything was set up correctly when you were given access, you should have branch names which you are allowed to work on. Typically this will be uniqname/something where uniqname is your UMich Uniqname, and /something is specific to what you are working on. You can check out that branch with
git checkout uniqname/something
If this is your first time working on this branch, it should tell you something about tracking origin/uniqname/something. You are now ready to work. You can see what it looks like with ./do_site local .
Every few hours, and at the end of a day’s work, remember to commit and push your changes!