summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrajaktaPurohit <PrajaktaPurohit@users.noreply.github.com>2022-07-28 10:42:15 -0700
committerGitHub <noreply@github.com>2022-07-28 10:42:15 -0700
commitf5202ba20921b00c1a866bb1bbf020ac7d9855ba (patch)
tree70636d35c9ee11287b95ac8261daffb83553c437
parent14d795ce3d8d65e94b5ace612bfc8f67dba8374d (diff)
parent2b433ba2197a4ca80a8e6900056ac748d924f583 (diff)
downloadchef-f5202ba20921b00c1a866bb1bbf020ac7d9855ba.tar.gz
Merge pull request #13046 from chef/neha-p6/how_to_client_documentation
Added how to doc with details about documentation for infra client resources
-rw-r--r--docs/dev/how_to/adding_documentation_to_infra_resources.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/dev/how_to/adding_documentation_to_infra_resources.md b/docs/dev/how_to/adding_documentation_to_infra_resources.md
new file mode 100644
index 0000000000..7a333fa35f
--- /dev/null
+++ b/docs/dev/how_to/adding_documentation_to_infra_resources.md
@@ -0,0 +1,29 @@
+# Adding documentation to resources:
+The documentation for Infra Client resources resides at [chef-wed-docs repository](https://github.com/chef/chef-web-docs/).
+Currently in order to reflect the documentation added to Infra Client resources on the [website](https://docs.chef.io/) we need to follow some manual steps.
+
+# Prerequisite:
+Clone [chef-wed-docs repository](https://github.com/chef/chef-web-docs/). Install Hugo, npm, go.
+
+`brew tap go-swagger/go-swagger && brew install go-swagger hugo node go jq`
+
+# Generating YAML files:
+The YAML data is generated using a [rake](https://github.com/chef/chef/blob/main/tasks/docs.rb) task in the `chef/chef` repository.
+
+`rake docs_site:resources`
+
+The YAML files will be created under `docs_site` directory. Copy the corresponding file(s) for the resource(s) for which documentation is updated to [chef-web-docs/data/infra/resources](https://github.com/chef/chef-web-docs/tree/main/data/infra/resources).
+(NOTE: The data file(.yaml) should be verified and edited manually to remove any inaccuracies.)
+
+# Generating mark down(.md) files:
+Go to the [chef-web-docs](https://github.com/chef/chef-web-docs/) repository, where we copied the YAML file(s).
+Using the YAML file(s) create corresponding markdown(.md) file(s).
+
+`hugo new -k resource content/resources/RESOURCE_NAME.md`
+
+# Verifying changes locally:
+Run server locally and verify the changes in your browser at http://localhost:1313
+
+`make serve`
+
+Once changes are verified, create a PR at [chef-web-docs](https://github.com/chef/chef-web-docs/) repository. \ No newline at end of file