improve documentation
This commit is contained in:
parent
b2f4279387
commit
af686535e7
18
README.md
18
README.md
|
@ -16,6 +16,7 @@ git submodule update
|
|||
```bash
|
||||
cd mobiledoc-wp-renderer
|
||||
yarn install
|
||||
yarn build
|
||||
cd ..
|
||||
```
|
||||
|
||||
|
@ -26,22 +27,21 @@ Install all the dependencies
|
|||
## `yarn fetch`
|
||||
|
||||
Fetches all content from Wings and saves it to `content.json`,
|
||||
requires the following environment variables.
|
||||
requires setting environment variables, for example:
|
||||
|
||||
```
|
||||
WINGS_ENDPOINT (for example https://api.wings.dev)
|
||||
WINGS_PROJECT
|
||||
WINGS_APP_KEY
|
||||
export WINGS_ENDPOINT=https://api.wings.dev
|
||||
export WINGS_PROJECT=amsterdam.bij1.org
|
||||
export WINGS_APP_KEY=<APP_KEY>
|
||||
```
|
||||
|
||||
## `yarn migrate`
|
||||
|
||||
Converts all articles and pages that do not exist in WordPress yet and
|
||||
publishes them along with their media, requires the following
|
||||
environment variables.
|
||||
publishes them along with their media, requires setting environment variables, for example:
|
||||
|
||||
```
|
||||
WP_ENDPOINT (for example http://localhost:8000/wp-json)
|
||||
WP_USER
|
||||
WP_PASSWORD
|
||||
export WP_ENDPOINT=http://localhost:8000/wp-json
|
||||
export WP_USER=<user>
|
||||
export WP_PASSWORD=<pw>
|
||||
```
|
||||
|
|
|
@ -3,6 +3,7 @@ import fs from "fs";
|
|||
|
||||
import query from "./query";
|
||||
|
||||
console.log(query);
|
||||
got.post(process.env.WINGS_ENDPOINT || 'https://api.wings.dev', {
|
||||
headers: {
|
||||
"Authorization": "Bearer " + process.env.WINGS_APP_KEY,
|
||||
|
@ -13,6 +14,3 @@ got.post(process.env.WINGS_ENDPOINT || 'https://api.wings.dev', {
|
|||
fs.writeFileSync("content.json", JSON.stringify(data, null, 2));
|
||||
console.log("fetched content");
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue