Skip to content

Commit 280a873

Browse files
Adding .lando.yml file and README.md documentation. (pantheon-systems#6318)
* Adding .lando.yml file and README.md documentation. * Update README.md * Update README.md Co-authored-by: Joan Edwards <[email protected]>
1 parent 2213676 commit 280a873

File tree

2 files changed

+55
-13
lines changed

2 files changed

+55
-13
lines changed

.lando.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: pantheon-docs
2+
services:
3+
node:
4+
type: node
5+
command: gatsby develop -H 0.0.0.0
6+
port: 8000
7+
ssl: true
8+
sslExpose: true
9+
globals:
10+
gatsby: latest
11+
build:
12+
- npm ci
13+
proxy:
14+
node:
15+
- pantheon-docs.lndo.site:8000
16+
17+
tooling:
18+
npm:
19+
service: node
20+
cmd: npm
21+
gatsby:
22+
service: node
23+
cmd: gatsby
24+
25+
excludes:
26+
- node_modules

README.md

+29-13
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Build Status: [![Circle CI](https://circleci.com/gh/pantheon-systems/documentati
33

44
Pantheon Documentation
55
======================
6+
67
https://pantheon.io/docs/
78

89
This repository contains the [Pantheon](https://pantheon.io) documentation, as well as the tools to build local test environments.
@@ -20,13 +21,14 @@ Read [our Style Guide](https://pantheon.io/docs/style-guide) for our guidelines
2021
## Local Installation
2122

2223
### Prerequisites
23-
- MacOS or Linux system (untested with Bash on Windows)
24-
- [Node.js](https://nodejs.org/en/)
25-
- Gatsby CLI:
24+
- MacOS or Linux system (untested with Bash on Windows)
25+
- [Node.js](https://nodejs.org/en/)
26+
- Gatsby CLI:
2627

27-
```bash
28-
npm install -g gatsby-cli
29-
```
28+
```bash
29+
npm install -g gatsby-cli
30+
```
31+
- Alternatively, you can use [Lando](https://docs.lando.dev). You can use Lando instead, to avoid installing Node.js and the Gatsby CLI on your local machine.
3032

3133
### Get the Code
3234

@@ -39,16 +41,20 @@ git clone https://github.com/pantheon-systems/documentation.git
3941
Or
4042

4143
```bash
42-
[email protected]:pantheon-systems/documentation.git
44+
git clone [email protected]:pantheon-systems/documentation.git
45+
cd documentation
4346
```
4447

4548
### Install
4649

47-
```
48-
cd documentation/
50+
#### Using the Gatsby CLI directly
51+
52+
```bash
4953
npm ci
5054
```
55+
5156
#### GitHub Token
57+
You can install directly on your host computer or via Lando. Both ways require the docs app to use a `GITHUB_API` token to operate.
5258
We use the [gatsby-remark-embed-snippet](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-embed-snippet) to use files from GitHub in our docs. Before you can build a local development site, you need to provide a GitHub token to the environment:
5359

5460
1. Log in to GitHub and go to <https://github.com/settings/tokens>
@@ -57,16 +63,26 @@ We use the [gatsby-remark-embed-snippet](https://github.com/gatsbyjs/gatsby/tree
5763
1. Copy the token to your clipboard.
5864
1. Create or edit `.env.development`, and add (replacing $TOKENHASH ):
5965

60-
```
61-
GITHUB_API=$TOKENHASH
62-
```
66+
```bash
67+
GITHUB_API=$TOKENHASH
68+
```
6369

6470
### Run
6571

66-
```
72+
```bash
6773
cd documentation/
6874
gatsby develop
6975
```
76+
You can view the local environment at `localhost:8000/`. Updates to docs are automatically refreshed in the browser.
77+
78+
79+
#### Using Lando
80+
81+
Alternatively, you can use [Lando](https://gist.github.com/tormi/a8b8fc39f9481373b24dc94cb8d2ee31). The `lando start` command intiates the the app, installs node dependencies, and starts the `gatsby develop` server for you.
82+
83+
```bash
84+
lando start
85+
```
7086

7187
You can view the local environment at `localhost:8000/`. Updates to docs are automatically refreshed in the browser.
7288

0 commit comments

Comments
 (0)