Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: formatting updates to api reference #271

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions site/crd-ref-docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ render:
- name: ExtProc
package: github.com/envoyproxy/gateway/api/v1alpha1
link: https://gateway.envoyproxy.io/docs/api/extension_types/#extproc

navigation:
includeTOC: true
includeBackToTopLinks: true
9 changes: 6 additions & 3 deletions site/crd-ref-docs/templates/gv_details.tpl
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{{- define "gvDetails" -}}
{{- $gv := . -}}

## {{ $gv.GroupVersionString }}
<a name="{{ lower (replace $gv.GroupVersionString " " "-" ) }}"></a>
# {{ $gv.GroupVersionString }}

{{ $gv.Doc }}

{{- if $gv.Kinds }}
### Resource Types
## Resource Types
{{- range $gv.SortedKinds }}
- {{ $gv.TypeForKind . | markdownRenderTypeLink }}
- {{ markdownRenderTypeLink ($gv.TypeForKind .) }}
{{- end }}
{{ end }}

{{ range $gv.SortedTypes }}
{{ template "type" . }}
{{ end }}

[Back to Packages](#api_references)

{{- end -}}
6 changes: 3 additions & 3 deletions site/crd-ref-docs/templates/gv_list.tpl
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{{- define "gvList" -}}
{{- $groupVersions := . -}}


---
id: api_references
title: API Reference
---

## Packages
<a id="api_references"></a>
# Packages
{{- range $groupVersions }}
- {{ markdownRenderGVLink . }}
- [{{ .GroupVersionString }}](#{{ lower (replace .GroupVersionString " " "-" ) }})
{{- end }}

{{ range $groupVersions }}
Expand Down
2 changes: 1 addition & 1 deletion site/crd-ref-docs/templates/type.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{- $type := . -}}
{{- if markdownShouldRenderType $type -}}

#### {{ $type.Name }}
### {{ $type.Name }}

{{ if $type.IsAlias }}_Underlying type:_ _{{ markdownRenderTypeLink $type.UnderlyingType }}_{{ end }}

Expand Down
Loading