Skip to content
/ repotting-template Public template

template / guide for repotting live, static-ish sites with httrack and ruby tools for mac 🌱🍯

Notifications You must be signed in to change notification settings

nyu-dh/repotting-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

repotting-template 🌱🍯

Template & guide for repotting sites as static copies with Httrack and some Ruby tools on Mac.
Inspired by Repotting Old Digital Humanities Projects: Two Test Cases by Matt Miller.

illustration borrowed from matt miller's post of three servers including one buried halfway into a plant pot.

Prerequisites

Instructions

1. Setup

2. Copy

  • Copy the site using httrack. the command is $ httrack --verbose --clean <url> -O docs, where <url> is the full, publicly accessible URL to the website you want to copy. ./docs is where the copied site will go. (Note: do not add trailing slash in URL)

3. Clean up

  • Httrack unfortunately adds extra files and unnecessary hierarchies. To clean it up, open the newly generated docs directory and delete hts-cache, blackblue.gif, fade.gif, and index.html.
  • Depending on the structure of your "old pot" URL, you'll have a series of hierarchical folders mirroring the structure of the URL. (e.g., www, nyu.edu, projects, etc.) Find the lowermost folder with all the site files and copy them directly into ./src. Then delete the empty directories left over.

4. Check links

  • Run $ ruby lib/check-links.rb src. 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!

5. Check html

  • Run $ ruby lib/check-html.rb src. This will flag any HTML errors within the copied site. If there are no major errors, feel free to skip to Step 7.

6. Tidy html

  • Run $ ruby lib/tidy-html.rb src. This will attempt to automatically "tidy" some HTML errors. You can check the HTML again using $ ruby lib/check-html.rb src to see if tidying worked. Again, totally up to you what to do with this information / whether or not to fix it!

7. Finish

  • When you're done copying and tidying, rename this README.md file to instructions.md
  • Next, fill out the README-template.md and rename it to README.md
  • Add, commit, and push your changes (including the site in docs)
  • Test the site using github pages by going to settings > github pages and setting the source to main > docs.
  • After a minute, go to the live github pages site to test it.
  • If everything is good, copy the contents of docs into your "new pot" host, e.g., an NYU web hosting account.
  • Et voilà!

About

template / guide for repotting live, static-ish sites with httrack and ruby tools for mac 🌱🍯

Topics

Resources

Stars

Watchers

Forks

Languages