Documentation

Deploying the Collection

So … Where are the files???!!!

One of the strange things about developing in this way is that while Jekyll is creating html files like its 1999, knowing where those files are and how to put them somewhere else is difficult to figure out. Let’s lift the veil:

Jekyll builds the website in a directory called “_site.”

While generating the files for development–so when you are looking at the site after entering jekyll s in the commandline, the links it creates are based on that development server. But you’ll also need one more command to build the site for production. Typically, that comand is “jekyll build,” but we’ve added a few extra tasks to include analytics in a separate command called rake deploy.

  1. Building the Site
  2. Moving the _site Files to Your Web Server

1. Building the Site (“rake deploy”)

When you are all finished, go to the terminal in VS Code and click ‘CTRL C’ to stop your development server. Then, write ‘rake deploy’ and push enter. This does two things:

  1. It builds the site with the appropriate (full) links
    • (so www.lib.uidaho.edu/digital/boxing/browse.html rather than http://127.0.0.1:4000/digital/boxing/browse.hml)
  2. It adds Google Analytics code based on the variable you added in the _config.yml file.
    • This prevents false hits on your analytics account.

If you didn’t add analytics, that’s fine too. It will build your site just the same as jekyll build does.


2. Moving the _site Files to Your Web Server

One you’ve completed the build process, the web files you need will all be in your “_site” directory.

  1. Open that directory using your file explorer or finder.
  2. Copy everything you’d like to move into a production site.
  3. Paste those files and folders into the directory on your web server you’d like to serve this site from.

Note: If you’d like to serve this up from a GitHub Pages enabled repository, that also could be doable. Talk to us.