1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-16 09:16:38 +00:00
prometheus-operator/scripts/docs/templates/pkg.tpl
Simon Pasquier 69f7061796
Refactor crd api docs (#4899)
* scripts:tools: Add gen-crd-api-reference-docs tool

Signed-off-by: Philip Gough <philip.p.gough@gmail.com>

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* make: Add targets and scripts to generate docs with gen-crd-api-reference-docs tool

Signed-off-by: Philip Gough <philip.p.gough@gmail.com>

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* scripts/go.mod: bump gen-crd-api-reference-docs version

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Makefile: add target to generate v1beta1 docs

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Documentation/apis: regenerate

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Makefile: remove unused variable

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* pkg/apis/monitoring: reorder markers for API docs

gen-crd-api-reference-docs requires codegen markers to appear before the
comments describing the types. Otherwise resource types aren't properly
identified.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Documentation/apis: regenerate

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* update docs configuration

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Documentation/apis: regenerate

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Add README.md for API documentation generation

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Skip embedded fields

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Move docgen tooling to Documentation/

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* keep all APIs in a single page

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Fix header in pkg.tpl

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Update docs README.md

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Add link for apiextensions-apiserver module

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Documentation: regenerate

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Fix links in documentation

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* update pkg.tpl

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Fix check-docs CI

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Documentation/api.md: regenerate

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* scripts: bump mdox version

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2022-07-13 14:24:02 +02:00

58 lines
1.1 KiB
Smarty

{{ define "packages" }}
---
title: "API reference"
description: "Prometheus operator generated API reference docs"
draft: false
images: []
menu:
docs:
parent: "operator"
weight: 1000
toc: true
---
> This page is automatically generated with `gen-crd-api-reference-docs`.
{{ with .packages}}
<p>Packages:</p>
<ul>
{{ range . }}
<li>
<a href="#{{- packageAnchorID . -}}">{{ packageDisplayName . }}</a>
</li>
{{ end }}
</ul>
{{ end}}
{{ range .packages }}
<h2 id="{{- packageAnchorID . -}}">
{{- packageDisplayName . -}}
</h2>
{{ with (index .GoPackages 0 )}}
{{ with .DocComments }}
<div>
{{ safe (renderComments .) }}
</div>
{{ end }}
{{ end }}
Resource Types:
<ul>
{{- range (visibleTypes (sortedTypes .Types)) -}}
{{ if isExportedType . -}}
<li>
<a href="{{ linkForType . }}">{{ typeDisplayName . }}</a>
</li>
{{- end }}
{{- end -}}
</ul>
{{ range (visibleTypes (sortedTypes .Types))}}
{{ template "type" . }}
{{ end }}
<hr/>
{{ end }}
{{ end }}