Skip to content

Commit 498902f

Browse files
Merge pull request #343 from Financial-Times/matth/move-x-docs
Move documentation website into separate folder
2 parents dd432bc + 60e3c42 commit 498902f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+45
-49
lines changed

.circleci/config.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ references:
2626

2727
cache_keys_docs: &cache_keys_docs
2828
keys:
29-
- cache-docs-v1-{{ .Branch }}-{{ checksum "./tools/x-docs/package.json" }}
29+
- cache-docs-v1-{{ .Branch }}-{{ checksum "./web/package.json" }}
3030

3131
#
3232
# Cache creation
@@ -39,9 +39,9 @@ references:
3939

4040
create_cache_docs: &create_cache_docs
4141
save_cache:
42-
key: cache-docs-v1-{{ .Branch }}-{{ checksum "./tools/x-docs/package.json" }}
42+
key: cache-docs-v1-{{ .Branch }}-{{ checksum "./web/package.json" }}
4343
paths:
44-
- ./tools/x-docs/node_modules/
44+
- ./web/node_modules/
4545

4646
#
4747
# Cache restoration
@@ -93,15 +93,13 @@ jobs:
9393
name: Checkout next-ci-shared-helpers
9494
command: git clone --depth 1 [email protected]:Financial-Times/next-ci-shared-helpers.git .circleci/shared-helpers
9595
- *restore_cache_root
96-
- *restore_cache_docs
9796
- run:
9897
name: Install project dependencies
9998
command: make install
10099
- run:
101100
name: Run the project build task
102101
command: make build
103102
- *create_cache_root
104-
- *create_cache_docs
105103
- persist_to_workspace:
106104
root: *workspace_root
107105
paths:
@@ -162,6 +160,14 @@ jobs:
162160
- add_ssh_keys:
163161
fingerprints:
164162
- "2b:98:17:21:34:bf:5d:3b:15:a5:82:77:90:11:03:e9"
163+
- *restore_cache_docs
164+
- run:
165+
name: Install documentation website dependencies
166+
command: npm run install-docs
167+
- *create_cache_docs
168+
- run:
169+
name: Build documentation website
170+
command: npm run build-docs
165171
- run:
166172
name: Publish GitHub Pages
167173
command: ./private/scripts/gh-pages

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
**/public/**
77
**/public-prod/**
88
**/blueprints/**
9-
tools/x-docs/static/**
9+
web/static/**

docs/get-started/working-with-x-dash.md

Lines changed: 3 additions & 2 deletions

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"blueprint": "node private/scripts/blueprint.js",
1212
"start-storybook": "start-storybook -p ${STORYBOOK_PORT:-9001} -s .storybook/static -h local.ft.com",
1313
"build-storybook": "build-storybook -o dist/storybook -s .storybook/static",
14-
"start-docs": "(cd tools/x-docs && npm start)",
14+
"install-docs": "(cd web && npm install)",
15+
"start-docs": "(cd web && npm start)",
16+
"build-docs": "(cd web && npm build)",
1517
"heroku-postbuild": "make install && npm run build",
1618
"prepare": "npx snyk protect || npx snyk protect -d || true"
1719
},

private/scripts/gh-pages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
TARGET_DIR=tools/x-docs/public/*
3+
TARGET_DIR=web/public/*
44
TARGET_BRANCH=gh-pages
55
TEMP_DIR=tmp
66

tools/x-docs/static/storybook

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

web/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ module.exports = {
1919
resolve: 'gatsby-source-filesystem',
2020
options: {
2121
name: 'docs',
22-
path: '../../docs'
22+
path: '../docs'
2323
},
2424
},
2525
{
2626
resolve: 'gatsby-source-filesystem',
2727
options: {
2828
name: 'components',
29-
path: '../../components',
29+
path: '../components',
3030
// Don't attempt to load any Storybook or source files, as these may
3131
// contain syntax and/or features we cannot parse.
3232
ignore: [/stories/, /src/]
@@ -36,7 +36,7 @@ module.exports = {
3636
resolve: 'gatsby-source-filesystem',
3737
options: {
3838
name: 'packages',
39-
path: '../../packages'
39+
path: '../packages'
4040
},
4141
},
4242
// Handles markdown files (creates "MarkdownRemark" nodes)

0 commit comments

Comments
 (0)