Template & guide for repotting sites as static copies with some optional Ruby testing tools.
Inspired by Repotting Old Digital Humanities Projects: Two Test Cases by Matt Miller.
- Wget
 - (Optional) Ruby via asdf
 
(for Mac; skip anything you already have)
- Install homebrew using the curl command or by downloading the 
.pkgfile listed on their website - Install wget, asdf, and git
brew install wget asdf git
 - Add asdf to your path by running the command listed here for your chosen shell & os
 - Install ruby via asdf
asdf plugin add ruby
 
- Create a new repo from this template. The new repo name should be "<projectname>-repotted"
 - Clone the repo to your local machine and cd into it.
 - (Optional) Install specific Ruby version and Ruby gems
asdf install bundle install
 
- Copy the site using the following httrack command. Make sure to replace  with thew publically accesible URL you want to copy:
wget -mpEk --no-parent <url>
 
- Rename the folder created by the last command (should be the site's url) to 
docs. (Note, this will let you test/host it with GitHub Pages) 
- Open the 
index.htmlfile indocsdirectly in your browser and poke around. (you can do this with$ open docs/index.html) How does it look? 
- Run 
bundle exec ruby lib/check-links.rb docs. This will flag any broken links within the site (not externally). Totally up to you what to do with this information / whether or not to fix it! 
- Run 
bundle exec ruby lib/check-html.rb docs. This will flag any HTML errors within the copied site. If there are no major errors, feel free to skip to Step 7. 
- Run 
bundle exec ruby lib/tidy-html.rb docs. This will attempt to automatically "tidy" some HTML errors. You can check the HTML again using$ ruby lib/check-html.rb docsto see if tidying worked. Again, totally up to you what to do with this information / whether or not to fix it! 
- When you're done copying and tidying, rename this 
README.mdfile toinstructions.md - Next, fill out the 
README-template.mdand rename it toREADME.md - Add, commit, and push your changes (including the site in 
docs) - Test the site using github pages by going to 
settings>github pagesand setting the source tomain>docs. - After a minute, go to the live github pages site to test it.
 - If everything is good, copy the contents of 
docsinto your "new pot" host, e.g., an NYU web hosting account.