# Ghost Integration

Ghost (opens new window) is a free and open source blogging platform written in JavaScript (opens new window) and it powers an incredible range of websites; from individual bloggers who are just getting started, to large teams of writers and editors at some of the largest organisations in the world.

# Setting up a Ghost site

Make sure you have the Ghost CLI installed:

$ npm install ghost-cli@latest -g

Installing Ghost

$ ghost install local

Once the installation is completed, your new Ghost site will be accessible on http://localhost:2368 and Ghost admin will be accessible on http://localhost:2368/ghost

Gatsby will start a hot-reloading development environment that is accessible by default at localhost:8000

# Creating a custom page template

Create a new file at the root of your theme called ghost-form.hbs and paste the following code:

{{!< page}}
{{#contentFor "form-area"}}
  <!-- form here -->
{{/contentFor}}

# Creating a custom page template

Defining a custom template

TIP

Don't forget to change the action attribute to a form endpoint URL with yours in your contact.js file.

# Step 5 - Run your Gatsby site locally to finalize setup

Run the following command to see your Gatsby form in action at localhost:8000/contact/:

gatsby develop

That's it! Your Gatsby site is now running Getform.