From 1704d6637ed8879163893a923a49e84f28dc396b Mon Sep 17 00:00:00 2001 From: Dex Date: Wed, 13 Mar 2019 10:04:34 -0500 Subject: [PATCH 1/3] HC docs template fixes --- hack/docs/Makefile | 19 ++++++++++++------- hack/docs/src/markdown.ts | 4 ++-- hack/docs/src/static.ts | 12 ++++++------ 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/hack/docs/Makefile b/hack/docs/Makefile index cf4766232..67df8c1df 100644 --- a/hack/docs/Makefile +++ b/hack/docs/Makefile @@ -42,7 +42,7 @@ markdown-assets: pipeline-strict: deps prebuild build gen-schema merge-mutations validate markdown-assets -pipeline: deps prebuild build gen-schema merge-mutations +pipeline: deps prebuild build gen-schema merge-mutations # require validation to generate docs, pipeline only does schema pipeline-docs: pipeline-strict @@ -51,17 +51,22 @@ copy-to-help-center: : To copy to the Ship documentation site, run the following command: : : make pipeline - : cp assets/* [path/to/ship-www]/content/reference/assets/ - : cp lifecycle/* [path/to/ship-www]/content/reference/lifecycle/ - : cp config/* [path/to/ship-www]/content/reference/config/ + : cp assets/* [path/to/help/center]/content/api/ship-assets/ + : cp lifecycle/* [path/to/help/center]/content/api/ship-lifecycle/ + : cp config/* [path/to/help/center]/content/api/ship-config/ copy-to-help-center-gopath: - cp assets/* $$GOPATH/src/github.com/replicatedhq/ship-www/content/reference/assets/ - cp lifecycle/* $$GOPATH/src/github.com/replicatedhq/ship-www/content/reference/lifecycle/ - cp config/* $$GOPATH/src/github.com/replicatedhq/ship-www/content/reference/config/ + cp assets/* $$GOPATH/src/github.com/replicatedhq/help-center/content/api/ship-assets/ + cp lifecycle/* $$GOPATH/src/github.com/replicatedhq/help-center/content/api/ship-lifecycle/ + cp config/* $$GOPATH/src/github.com/replicatedhq/help-center/content/api/ship-config/ copy-replicated-lint: : To Copy to replicated lint, run the following command: : : make pipeline : cp schema.json [path/to/replicated-lint]/projects/replicated-ship/ + +copy-replicated-lint-gopath: + cp schema.json $$GOPATH/src/github.com/replicatedhq/replicated-lint/projects/replicated-ship/ + make -C $$GOPATH/src/github.com/replicatedhq/replicated-lint/ project-import project=replicated-ship + diff --git a/hack/docs/src/markdown.ts b/hack/docs/src/markdown.ts index b8e8ac329..9b2f1ae6a 100644 --- a/hack/docs/src/markdown.ts +++ b/hack/docs/src/markdown.ts @@ -146,7 +146,7 @@ ${yaml.safeDump({[subgroup]: {v1: [{[specType]: example}]}})}${"```"} function writeHeader(specTypes: any, specType, subgroup: string) { return `--- categories: -- ${subgroup} +- ship-${subgroup} date: 2018-01-17T23:51:55Z description: ${specTypes[specType].description || ""} index: docs @@ -155,7 +155,7 @@ weight: "100" gradient: "purpleToPink" --- -[Assets](/reference/assets/overview) | [Config](/reference/config/overview) | [Lifecycle](/reference/lifecycle/overview) +[Assets](/api/ship-assets/overview) | [Config](/api/ship-config/overview) | [Lifecycle](/api/ship-lifecycle/overview) ## ${specType} diff --git a/hack/docs/src/static.ts b/hack/docs/src/static.ts index 46f64bdcb..006f30f1f 100644 --- a/hack/docs/src/static.ts +++ b/hack/docs/src/static.ts @@ -1,6 +1,6 @@ export const ASSETS_INDEX_DOC = `--- categories: -- assets +- ship-assets date: 2018-01-17T23:51:55Z description: Reference Documentation for defining your Ship application assets index: false @@ -10,7 +10,7 @@ hideFromList: true gradient: "purpleToPink" --- -[Assets](/reference/assets/overview) | [Config](/reference/config/overview) | [Lifecycle](/reference/lifecycle/overview) +[Assets](/api/ship-assets/overview) | [Config](/api/ship-config/overview) | [Lifecycle](/api/ship-lifecycle/overview) ## Ship Assets @@ -19,7 +19,7 @@ Ship Assets are files rendered during the [render](/api/ship-lifecycle/render) l export const LIFECYCLE_INDEX_DOC = `--- categories: -- lifecycle +- ship-lifecycle date: 2018-01-17T23:51:55Z description: Reference Documentation for defining your Ship application lifecycle index: false @@ -29,7 +29,7 @@ hideFromList: true gradient: "purpleToPink" --- -[Assets](/reference/assets/overview) | [Config](/reference/config/overview) | [Lifecycle](/reference/lifecycle/overview) +[Assets](/api/ship-assets/overview) | [Config](/api/ship-config/overview) | [Lifecycle](/api/ship-lifecycle/overview) ## Ship Lifecycle @@ -39,7 +39,7 @@ Ship lifecycle steps define the steps that a Ship application will proceed throu export const CONFIG_INDEX_DOC = `--- categories: -- config +- ship-config date: 2018-01-17T23:51:55Z description: Reference Documentation for defining your Ship application configuration options index: docs @@ -49,7 +49,7 @@ hideFromList: true gradient: "purpleToPink" --- -[Assets](/reference/assets/overview) | [Config](/reference/config/overview) | [Lifecycle](/reference/lifecycle/overview) +[Assets](/api/ship-assets/overview) | [Config](/api/ship-config/overview) | [Lifecycle](/api/ship-lifecycle/overview) ## Ship Config From c4ffd636bd6f8bdc22b5bcc39aac348f9ca5c15f Mon Sep 17 00:00:00 2001 From: Dex Date: Wed, 13 Mar 2019 10:09:46 -0500 Subject: [PATCH 2/3] project is caps --- hack/docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/docs/Makefile b/hack/docs/Makefile index 67df8c1df..0f69dc4f1 100644 --- a/hack/docs/Makefile +++ b/hack/docs/Makefile @@ -68,5 +68,5 @@ copy-replicated-lint: copy-replicated-lint-gopath: cp schema.json $$GOPATH/src/github.com/replicatedhq/replicated-lint/projects/replicated-ship/ - make -C $$GOPATH/src/github.com/replicatedhq/replicated-lint/ project-import project=replicated-ship + make -C $$GOPATH/src/github.com/replicatedhq/replicated-lint/ project-import PROJECT=replicated-ship From 76efbabba4dcd71a6e9886a11dcfea2bc57fd49a Mon Sep 17 00:00:00 2001 From: Dex Date: Wed, 13 Mar 2019 10:16:53 -0500 Subject: [PATCH 3/3] one more fix --- hack/docs/src/markdown.ts | 2 +- hack/docs/src/static.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hack/docs/src/markdown.ts b/hack/docs/src/markdown.ts index 9b2f1ae6a..6a78859e7 100644 --- a/hack/docs/src/markdown.ts +++ b/hack/docs/src/markdown.ts @@ -155,7 +155,7 @@ weight: "100" gradient: "purpleToPink" --- -[Assets](/api/ship-assets/overview) | [Config](/api/ship-config/overview) | [Lifecycle](/api/ship-lifecycle/overview) +[Assets](/api/ship-assets/assets) | [Config](/api/ship-config/config) | [Lifecycle](/api/ship-lifecycle/lifecycle) ## ${specType} diff --git a/hack/docs/src/static.ts b/hack/docs/src/static.ts index 006f30f1f..793794823 100644 --- a/hack/docs/src/static.ts +++ b/hack/docs/src/static.ts @@ -10,7 +10,7 @@ hideFromList: true gradient: "purpleToPink" --- -[Assets](/api/ship-assets/overview) | [Config](/api/ship-config/overview) | [Lifecycle](/api/ship-lifecycle/overview) +[Assets](/api/ship-assets/assets) | [Config](/api/ship-config/config) | [Lifecycle](/api/ship-lifecycle/lifecycle) ## Ship Assets @@ -29,7 +29,7 @@ hideFromList: true gradient: "purpleToPink" --- -[Assets](/api/ship-assets/overview) | [Config](/api/ship-config/overview) | [Lifecycle](/api/ship-lifecycle/overview) +[Assets](/api/ship-assets/assets) | [Config](/api/ship-config/config) | [Lifecycle](/api/ship-lifecycle/lifecycle) ## Ship Lifecycle @@ -49,7 +49,7 @@ hideFromList: true gradient: "purpleToPink" --- -[Assets](/api/ship-assets/overview) | [Config](/api/ship-config/overview) | [Lifecycle](/api/ship-lifecycle/overview) +[Assets](/api/ship-assets/assets) | [Config](/api/ship-config/config) | [Lifecycle](/api/ship-lifecycle/lifecycle) ## Ship Config