File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,5 +6,11 @@ resources/
66public /
77.hugo_build.lock
88
9+ # Supporting tools
10+ bin /
11+
12+ # API Generation
13+ api-gen /build /
14+
915# IDEs
1016.vscode
Original file line number Diff line number Diff line change 1+ # Website Contributing Guide
2+
3+ Do you want to contribute to Shipwright's documentation, or publish a blog post about Shipwright?
4+ You have come to the right place!
5+
6+ ## Before You Begin
7+
8+ - Review the overall project [ contributor guide] ( https://github.com/shipwright-io/.github/blob/main/CONTRIBUTING.md )
9+ and [ code of conduct] ( https://github.com/shipwright-io/.github/blob/main/CODE_OF_CONDUCT.md ) .
10+ - Set up your computer to contribute content to the website. Review the "Getting Started" section
11+ in the [ README] ( README.md ) for details.
12+
13+ ## Adding Content
14+
15+ There are two main forms of content on the website - documentation and blog posts.
16+
17+ We use the [ Hugo] ( https://gohugo.io ) framework to generate the website content, which supports
18+ internationalization. At present we publish content only in English, located in the ` content/en `
19+ directory.
20+
21+ ### Adding Documentation Content
22+
23+ Documentation content can come in various forms, but is directly related to the features and
24+ functionality of Shipwright's projects. This content is located in the ` content/en/docs ` directory.
25+
26+ API reference documentation - located in ` content/en/docs/ref ` - should not be edited by hand. This
27+ content should only be generated by running the ` gen-api-docs ` Makefile target:
28+
29+ ``` sh
30+ make gen-api-docs
31+ ```
32+
33+ ### Adding Blog Posts
34+
35+ Blog post content should be located in the ` content/en/blog/posts ` directory.
36+
37+ Release notes may also be published in the ` content/en/blog/releases ` directory.
Original file line number Diff line number Diff line change @@ -37,4 +37,19 @@ serve: ## serve the content locally for testing
3737
3838.PHONY : serve-preview
3939serve-preview : # # serve the preview content locally for testing
40- hugo -t docsy server -F
40+ hugo -t docsy server -F
41+
42+ .PHONY : bin-dir
43+ bin-dir : # # Creates a local "bin" directory for helper applications.
44+ @mkdir ./bin || true
45+
46+ .PHONY : crd-ref-docs
47+ crd-ref-docs : bin-dir # # install crd-ref-docs tool
48+ GOBIN=$(shell pwd) /bin go install github.com/elastic/crd-ref-docs@v0.1.0
49+
50+ BUILD_REPO ?= "https://github.com/shipwright-io/build.git"
51+ BUILD_VERSION ?= "v0.15.0"
52+
53+ .PHONY : gen-api-docs
54+ gen-api-docs : crd-ref-docs # # generate API reference documentation
55+ BUILD_REPO=$(BUILD_REPO ) BUILD_VERSION=$(BUILD_VERSION ) ./hack/gen-api-docs.sh
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ Then install any additional dependencies by running `make install`
3030To run the website locally, use Hugo's ` server ` command:
3131
3232``` bash
33- $ hugo server
33+ $ hugo -t docsy server
3434```
3535
3636## Contributing
Original file line number Diff line number Diff line change 1+ processor :
2+ ignoreFields :
3+ - " TypeMeta$"
4+ render :
5+ kubernetesVersion : 1.30
Original file line number Diff line number Diff line change 1+ {{- define " gvDetails" -}}
2+ {{- $gv := . -}}
3+
4+ # {{ $gv .GroupVersionString }}
5+
6+ {{ $gv .Doc }}
7+
8+ {{- if len $gv .Kinds }}
9+ ## Resource Types
10+ {{- range $gv .SortedKinds }}
11+ - {{ $gv .TypeForKind . | markdownRenderTypeLink }}
12+ {{- end }}
13+ {{ end }}
14+
15+ {{ range $gv .SortedTypes }}
16+ {{ template " type" . }}
17+ {{ end }}
18+
19+ {{- end -}}
Original file line number Diff line number Diff line change 1+ {{- define " gvList" -}}
2+ {{- $groupVersions := . -}}
3+
4+ ---
5+ title: {{env " API_GROUP" }} Resources
6+ weight: {{env " API_WEIGHT" }}
7+ ---
8+
9+ # Packages
10+ {{- range $groupVersions }}
11+ - {{ markdownRenderGVLink . }}
12+ {{- end }}
13+
14+ {{ range $groupVersions }}
15+ {{ template " gvDetails" . }}
16+ {{ end }}
17+
18+ {{- end -}}
Original file line number Diff line number Diff line change 1+ {{- define " type" -}}
2+ {{- $type := . -}}
3+ {{- if markdownShouldRenderType $type -}}
4+
5+ ### {{ $type .Name }}
6+
7+ {{ if $type .IsAlias }}_Underlying type:_ _{{ markdownRenderTypeLink $type .UnderlyingType }}_{{ end }}
8+
9+ {{ $type .Doc }}
10+
11+ {{ if $type .Validation -}}
12+ _Validation:_
13+ {{- range $type .Validation }}
14+ - {{ . }}
15+ {{- end }}
16+ {{- end }}
17+
18+ {{ if $type .References -}}
19+ _Appears in:_
20+ {{- range $type .SortedReferences }}
21+ - {{ markdownRenderTypeLink . }}
22+ {{- end }}
23+ {{- end }}
24+
25+ {{ if $type .Members -}}
26+ | Field | Description | Default | Validation |
27+ | --- | --- | --- | --- |
28+ {{ if $type .GVK -}}
29+ | ` apiVersion` _string_ | ` {{ $type.GVK.Group }}/{{ $type.GVK.Version }}` | | |
30+ | ` kind` _string_ | ` {{ $type.GVK.Kind }}` | | |
31+ {{ end -}}
32+
33+ {{ range $type .Members -}}
34+ | ` {{ .Name }}` _{{ markdownRenderType .Type }}_ | {{ template " type_members" . }} | {{ markdownRenderDefault .Default }} | {{ range .Validation -}} {{ markdownRenderFieldDoc . }} <br />{{ end }} |
35+ {{ end -}}
36+
37+ {{ end -}}
38+
39+ {{ if $type .EnumValues -}}
40+ | Field | Description |
41+ | --- | --- |
42+ {{ range $type .EnumValues -}}
43+ | ` {{ .Name }}` | {{ markdownRenderFieldDoc .Doc }} |
44+ {{ end -}}
45+ {{ end -}}
46+
47+
48+ {{- end -}}
49+ {{- end -}}
Original file line number Diff line number Diff line change 1+ {{- define " type_members" -}}
2+ {{- $field := . -}}
3+ {{- if eq $field .Name " metadata" -}}
4+ Refer to Kubernetes API documentation for fields of ` metadata` .
5+ {{- else -}}
6+ {{ markdownRenderFieldDoc $field .Doc }}
7+ {{- end -}}
8+ {{- end -}}
Original file line number Diff line number Diff line change 1+ ---
2+ title : " Reference"
3+ weight : 30
4+ ---
5+
6+ This section contains reference documentation.
You can’t perform that action at this time.
0 commit comments