Stop including hugo theme in our repo and use hugo modules instead

Review Request #1390 — Created April 24, 2022 and submitted

Information

pidgin/nest
default

Reviewers

To make our site more maintainable this RR attempts to switch from having a complete copy of a theme in our repository and instead use go modules to pull it from it's respective repository.

We have made a few modifications to the original hugo learn theme, some of
which are not easy to split into separate files so for now I'm just including
the files of the learn theme that have our customizations, that way they'll override
the original ones from the theme.

Adding golang to the Dockerfile since that's needed to be able to use go modules.

An important note: This RR was supposed to also include the deletion of the entire hugo/themes/learn directory as the idea behind this is that instead of having a full copy of it in our repos, we just pull a specific tag from the upstream repository. Sadly, whenever I try to delete this directory and commit it, I get an error with rbtools when it's trying to validate the commits. I believe this may be due to the amount of files being deleted but I also wasn't able to split the deletion across multiple commits since after 2 different commits rbtools stopped recognizing the 2 oldest ones and just the single newest commit. This is something that we'll need to figure out before merging this, I guess a possibility is always to just agree to have someone do the hg rm command manually and push it.

Ran dev-server.sh and also built the Container image and verified that the site looks the same as it currently does.

Summary ID
Stop including hugo theme in our repo and use hugo modules instead
We have made a few modifications to the original hugo learn theme, some of which are not easy to split into separate files so for now I'm just including the files of the learn theme that have our customizations so that they override the original ones from the theme.
6931c10e5f9e4bd27bb54f68061d360ce442fac4
Remove trailing whitespace
28deab2fe7ce3a3b58f44fedc3f36a9cfe7b335c
Remove hugo_build.lock file
7d80a4cce2ac6ea3bb2c883ee96ae7804f977ea5
Description From Last Updated

Should hugo/.hugo_build.lock be in the repo? Seems like it shouldn't be...

grimgrim

Just to double check, what version of rbt are you using? There was a version a while ago that failed …

grimgrim

I assume this was just a move, but there's a bunch of trailing whitespace in this file.

grimgrim

bunch of trailing whitespace again.

grimgrim

trailing whitespace

grimgrim

looks like mixed whitespace in this file?

grimgrim

Trailing whitespace

grimgrim
grim
  1. 
      
  2. Show all issues

    Should hugo/.hugo_build.lock be in the repo? Seems like it shouldn't be...

    1. My bad, I removed it in the latest rev

  3. Show all issues

    Just to double check, what version of rbt are you using? There was a version a while ago that failed to land patches that had deleted binary files and this sounds like it might be similar.

    1. I tried with the latest 3.0.0 as well as the prior stable version 2.0.1. Originally I was using python 3.10 so I tried in a python 3.9 venv as well but the same problem arised.

      A simple way to reproduce is to just try to create a new RR where the only thing that you do is hg rm hugo/themes/learn , commit those changes and try to post the review with rbt post. I think the other problem I mentioned of rbtools having issues with identifying multiple commmits with mercurial is accepted in an open issue in reviewboard's site and according to them the real solution will be when they implement their own diffx format.

  4. hugo/layouts/404.html (Diff revision 1)
     
     
    Show all issues

    I assume this was just a move, but there's a bunch of trailing whitespace in this file.

    1. Yes, I had noticed the trailing whitepsace but since it was a move I didn't know if I should leave it or not. I'm fine with taking this oppportunity and removing useless trailing whitespace.

  5. hugo/layouts/index.html (Diff revision 1)
     
     
    Show all issues

    bunch of trailing whitespace again.

  6. hugo/layouts/partials/menu.html (Diff revision 1)
     
     
    Show all issues

    trailing whitespace

  7. hugo/layouts/shortcodes/expand.html (Diff revision 1)
     
     
    Show all issues

    looks like mixed whitespace in this file?

  8. hugo/static/js/learn.js (Diff revision 1)
     
     
    Show all issues

    Trailing whitespace

  9. 
      
sorvival
sorvival
grim
  1. Ship It!
  2. Awesome work, thanks for getting this done!!

  3. 
      
grim
Review request changed
Status:
Completed
QuLogic
  1. 
      
  2. I definitely wanted to do this since we started, but couldn't since you can't do git submodules in hg. Definitely good to have hugo modules do it.

    It would be great if we could drop our overrides too, but I guess that's more trouble.

  3.