Lesson 1: Goals and Prerequisites

Goals

  • Hands-on experience building a website.

  • Create a website that helps promote your work or tells a story you’re working on.

  • Fundamental tools:
    • Markup (HTML)
    • Styling (CSS)
    • Versioning (Git)
    • Responsive design (Bootstrap)
    • Data management, templating, and publishing (Tarbell)

Background

Here are some resources to get you started with the basic skills you’ll need to build a website:

If you are already

Prerequisites

  1. A laptop with OS X 10.7+ or Linux
  2. A command-line interface to interact with your computer
  3. A text editor to work with plain text files
  4. Version 2.7 of the Python programming language
  5. The pip package manager
  6. Git version control software
  7. An account at GitHub.com
  8. A Google account and client_secrets.json file.
  9. Tarbell publishing software

Note

Depending on your experience and operating system, you might already be ready to go with everything above. If so, move on to the next chapter. If not, don’t worry. And don’t give up! It will be a bit of a slog but the instructions below will point you in the right direction.

Bring your own laptop

This will be no fun for anybody if you don’t have an OS X or Linux-based laptop to bring to the workshops.

Command-line interface

A command line interface, also known as a terminal, is a program that lets you type in commands that control your computer.

Note

Very little command line skills will be required for this tutorial. You’ll need to run some commands to install the necessary software, and will use the command line to publish your project.

Text editor

You’ll be editing simple “plain text” files.

Just like you need a word processor for writing human language, you need a text editor for working with plain text such as HTML markup, CSS, and Javascript.

We recommend Sublime Text <http://www.sublimetext.com/3> for all participants. It’s fast, simple, and sensible.

Python

To make sure your system has Python 2.7 installed, type the follow into your command line:

python -V

You should see a reply like:

Python 2.7.5

pip package manager

The pip package manager is needed to install Tarbell, our publishing tool.

You’ll probably need to install pip on your system.

On Mac OS X, run this command on your command line:

sudo easy_install pip

To verify that you have pip installed, run:

pip -V

Git and Github

Git is a version control program for logging the changes you make to files over time. This is useful when you’re working on your own, but quickly becomes essential when working with others.

You will use Git

GitHub is a website that hosts git code repositories, both public and private. It comes with many helpful tools for reviewing code and managing projects. It also has some extra tricks that make it easy to publish web pages, which we will use later.

GitHub offers helpful guides for installing Git in Mac OS X and Linux. You can verify it’s installed from your command line like so:

# You don't have to type the "$" It's just a generic symbol
# geeks use to show they're working on the command line.
$ git --version

Once that’s done, you should create an account at GitHub, if you don’t already have one. It shouldn’t cost you anything. The free plan is all that’s required to complete this lesson.

Google account and client secrets file

You’ll need a Google account to manage the data and content on your site with Google spreadsheets. If you have a gmail address, you already have a Google account.

You’ll need to follow this guide to downloading a client_secrets.json file to your computer. This file acts like a password that allows Tarbell to communicate with Google spreadsheets.

Install Tarbell

Time to install Tarbell!

sudo pip install tarbell==0.9b4

Time to configure Tarbell:

tarbell configure

Follow the default prompts. You’ll need to provide the location of your client secrets file and visit a website to validate your access. It’s a pain, but you only have to do it once.

For now, you should specify “no” / “n” when prompted to configure Amazon S3.