↑ Setting up Kirby to use on your local computer

Notes

This is a world of abbreviations, jargon, and assumptions that you know what they all mean. Try not to be intimidated and know that this is a long walk; that your understanding of your surroundings will become more familiar as you work through and learn more about the command line.

This tutorial below is useful if you'd like to continue developing your site (make changes to the underlying templates, change the theme, etc.). Having a local copy makes it easier quickly view your changes. However, it does add a layer of complication as you have to sync your changes to your server.

The Command Line

The command-line is a text based interface that is a shortcut into the underlying systems of your computer. This is in relation to a graphical user interface, in which, the primary way we access our computers is by seeing, pointing, and clicking on icons. Often these icons are symbolic representations of things that exist in the real world: the ‘folder’, the ‘desktop’, the ‘trash’.

In the command-line, these symbols are replaced with language – commands that we type out and ask our computer to do. The command-line, and the visual interface in which we use our computers live in parallel, they support each other.

1. Get Your Bearings

Open Terminal.app

This is your interface to the command line.
Type: say I just typed in my first terminal command
You have just completed your first terminal command.

say is the command. It asks your computer to say the following text:
Everything after say is what is processed by your computer

Commands generally follow this order: action specifier

See it:
First command.mp4

To get your bearings and understand where you are, complete the following commands:

  1. ls
    (short for list) shows you the list of files and folders of where you are. You should see something similar to this (**show example image)

To do this using the Finder you would open a new finder window and click on the Home Icon

  1. cd Documents
    (short for change directory) is used to move around within the folders of your computer. You used it relative to where you currently are within your computer. The command above moves you into your Documents folder.

  2. ls
    You should see a list of files and folders in your Documents folder

  3. cd ..
    .. when used with cd, .. means go one directory level up
    You should be back in your home folder now

See it:
Get your bearings.mp4

(sidenotes, addendum, more...)
Using the Command Line

2. Install Homebrew

Homebrew is an application that helps you install and manage command-line based applications. We will be using it to install some applications we need to use Kirby.

Navigate to their homepage: https://brew.sh, go to Install Homebrew and copy and and paste the command into the Terminal.

Context
What/Why/Who is homebrew?

3. Install PHP

PHP is the programming language that Kirby is built on and uses to run. We will install the newest version of PHP that is compatible with Kirby.

Use the command:
brew install php@7.4

Once installed run the command so that PHP is always running in the background:
brew services start php@7.4

4. Install Kirby / Garden Box

TO COME

References:
getkirby.com/docs/guide/quickstart
How to set up local development for Kirby and Tailwind