Read and download a site's source

Harriet keeps the code behind every site, with its full history. If you own a site or edit it, you can read that code in Harriet and take a copy to your own computer.

Read the source

Find the site under Sites, press Manage and open the Source tab. The Source view lists the site's files: select one to read it. Changes shows what the latest change did, and Commits lists every change with who made it and when. Select a commit to see what it changed. To look at an older or newer version of the code, choose another branch or tag from the list above the files.

On the Versions tab, select a version's commit to read exactly the code that version was published from.

Only the site's owner and its editors see the Source tab. Admins who manage sites can change who can use a site but can't read its files, unless they add themselves as an editor. That change is logged.

Download it as a file

Press Download source (.tar.gz) to get the code you are looking at as one file. Everything in it sits in a single folder named after the site, so unpacking it won't scatter files. On a Mac or Linux computer, double-click it, or run tar -xzf on the file. Recent versions of Windows can open it as well.

Download it with Git

If you use Git, press Get Git credentials. Harriet shows a git clone command, a username and a password.

  1. Run the command in a terminal.
  2. When Git asks for your credentials, enter the username and the password. Use Copy password if you can't type it. Show password reveals it.

The credentials only read the code, so you can't send changes back with them. To change the site, ask Harriet. They stop working after an hour, and the window tells you when. They work for this site only, and only while you are still its owner or an editor. If you need more time, or want to pull a later change, get new ones.

💡

Anyone who has the credentials can read the site's code until they stop working, so keep them to yourself and don't paste them into a chat or a ticket.

What isn't in the source

A site's figures are published separately from its code. A copy of the source has the page but not its data. To preview it on your own computer with the real figures, ask Harriet to download the site's data for you.

Who sees what you took

Account owners, super admins and people with the Manage sites permission see two entries in the Audit log: Git credentials issued when you get credentials and Downloaded when you download the source. They show who did it and when, in UTC.