-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update how to use the update-imported-docs tool
Update kubernetes-components.md with software versions. Move content from README to kubernetes-components to avoid duplication. Be listed in the `kubernetes/website/data/reference.yml` file Signed-off-by: Aimee Ukasick <[email protected]>
- Loading branch information
Showing
2 changed files
with
67 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,5 @@ | ||
# Update imported docs | ||
|
||
This script updates the docs files that are generated from other repos. | ||
It accepts a YAML file name as its input which can be customized on a per-repo | ||
basis. | ||
This tool updates the reference docs generated from the Kubernetes repository. | ||
|
||
## Requirements | ||
|
||
Imported docs must follow these guidelines: | ||
|
||
1. Adhere to the [Documentation Style Guide](/docs/home/contribute/style-guide/). | ||
|
||
1. Have `title` defined in the front matter. For example: | ||
|
||
``` | ||
--- | ||
title: Title Displayed in Table of Contents | ||
--- | ||
Rest of the .md file... | ||
``` | ||
1. Be listed somewhere in a file under the `data` subdirectory, for example, | ||
the `data/imported.yml` file. | ||
1. Make sure the `PyYAML` package is installed: | ||
``` | ||
sudo apt-get install python-pip | ||
pip install PyYAML | ||
``` | ||
## Usage | ||
From within this directory, run the following command: | ||
``` | ||
+./update-imported-docs <CONFIG-FILE> | ||
``` | ||
where `<CONFIG-FILE>` can be any YAML configuration file in this directory. | ||
## Configuration file format | ||
Each config file may contain multiple repos that will be imported together. | ||
When necessary, you can customize the configuration file by manually editing | ||
it. You may create new config files for importing other groups of documents. | ||
The following is an example of the YAML configuration file: | ||
``` | ||
repos: | ||
- name: community | ||
remote: https://github.com/kubernetes/community.git | ||
branch: master | ||
files: | ||
- src: contributors/devel/README.md | ||
dst: docs/imported/community/devel.md | ||
- src: contributors/guide/README.md | ||
dst: docs/imported/community/guide.md | ||
``` | ||
Note: `generate-command` is an optional entry, which can be used to run a | ||
given command or a short script to generate the docs from within a repo. | ||
## Fixing Links | ||
To fix relative links within your imported files, set the repo config's | ||
`gen-absolute-links` property to `true`. You can find an example of this in | ||
[`release.yml`](release.yml). | ||
[Generating Reference Pages for Kubernetes Components and Tools](https://kubernetes.io/docs/contribute/generate-ref-docs/kubernetes-components/) contains detailed instructions for using this tool. |