3. Set up your local dev environmentDockerNative CLI
These are the instructions for users that installed Airship CLI. If you are using Docker, see the Docker instructions instead.
Create a local directory for your project.
Create a new empty directory for your project.
- In this guide we are creating a new empty project in the home directory. You can use any subdirectory you want.
- If you use a source code management tool like Git, you can initialize this directory as a versioned project. Commit all files, including the hidden
Navigate to your local project directory:
Take note of your site subdomain.
Take note of your subdomain. If you aren't sure what it is, it is listed in bold text on your generated site webpage (and it is also the identifier before ".airshipcms.io" in your browser url bar:
airship login to access your project content.
Inside your project directory, run the following command. Be sure to replace
[subdomain] with your actual subdomain:
airship login [subdomain]
When you are prompted to set the current directory as the root of your Airship CMS site, verify that the path is correct. Ensure that you are actually in your project directory. Enter
y to confirm.
A browser window will pop up prompting you to login.
Once you log in successfully, you can close the browser window. Your terminal should show
airship land to retrieve files.
Inside of your project directory, run the following command to pull the project files that were generated during site creation.
y to the prompt.
airship land will generate a
compartments directory containing very basic Airship files that are necessary for building out your project templates.
Open your local files in a text editor.
Open your entire directory in a text editor. You will later be editing the site files.
airship serve to run your site locally.
Start a local development server by using the following command.
Leave this terminal open to keep the local server running during development.
View your local site in a browser.
In a browser, navigate to
localhost:9001. You will see actual site content, but it is now rendered with your local layouts, templates, and assets. For now, the webpage looks exactly the same as the live site:
If you ever encounter problems with the CLI, it is usually because your project has been initiated in the incorrect directory. Refer to the CLI Troubleshooting Docs if you run into any issues.
Next: Edit Content in Airship Admin