This is an automated email from the ASF dual-hosted git repository. nferraro pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit c5149b8dde04edaac8f52a1fa80f54976ef824c0 Author: Pasquale Congiusti <pasquale.congiu...@gmail.com> AuthorDate: Thu May 13 09:56:20 2021 +0200 fix(doc): remove API gen workaround --- script/gen_crd/gen_crd_api.sh | 7 +------ script/gen_crd/template/members.tpl | 2 +- script/gen_crd/template/pkg.tpl | 10 ++-------- script/gen_crd/template/type.tpl | 6 +++--- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/script/gen_crd/gen_crd_api.sh b/script/gen_crd/gen_crd_api.sh index 73aeadb..6b38d59 100755 --- a/script/gen_crd/gen_crd_api.sh +++ b/script/gen_crd/gen_crd_api.sh @@ -23,6 +23,7 @@ echo "Downloading gen-crd-api-reference-docs binary..." TMPFILE=`mktemp` TMPDIR=`mktemp -d` PWD=`pwd` +# TODO detect proper binary, based on the OS running this script wget -q --show-progress https://github.com/ahmetb/gen-crd-api-reference-docs/releases/download/v0.1.5/gen-crd-api-reference-docs_linux_amd64.tar.gz -O $TMPFILE tar -C $TMPDIR -xf $TMPFILE @@ -36,12 +37,6 @@ $TMPDIR/gen-crd-api-reference-docs \ # Workaround: https://github.com/ahmetb/gen-crd-api-reference-docs/issues/33 sed -i -E "s/%2f/\//" $crd_file -# Valid HTML: https://github.com/ahmetb/gen-crd-api-reference-docs/issues/34 -sed -i -E "s/<\/code><\/br>/<\/code><br>/" $crd_file -sed -i -E "s/<\/p><\/h3>/<\/h3>/" $crd_file -sed -i ':a;N;$!ba;s/<p>\n<p>/<p>/g' $crd_file -sed -i ':a;N;$!ba;s/<\/p>\n<\/p>/<\/p>/g' $crd_file - echo "Cleaning the gen-crd-api-reference-docs binary..." rm $TMPFILE rm -rf $TMPDIR \ No newline at end of file diff --git a/script/gen_crd/template/members.tpl b/script/gen_crd/template/members.tpl index 9f08d1a..a529c67 100644 --- a/script/gen_crd/template/members.tpl +++ b/script/gen_crd/template/members.tpl @@ -4,7 +4,7 @@ {{ if not (hiddenMember .)}} <tr> <td> - <code>{{ fieldName . }}</code></br> + <code>{{ fieldName . }}</code><br/> <em> {{ if linkForType .Type }} <a href="{{ linkForType .Type}}"> diff --git a/script/gen_crd/template/pkg.tpl b/script/gen_crd/template/pkg.tpl index 2f03a80..220f015 100644 --- a/script/gen_crd/template/pkg.tpl +++ b/script/gen_crd/template/pkg.tpl @@ -18,9 +18,9 @@ {{ with (index .GoPackages 0 )}} {{ with .DocComments }} - <p> + <div> {{ safe (renderComments .) }} - </p> + </div> {{ end }} {{ end }} @@ -38,12 +38,6 @@ {{ range (visibleTypes (sortedTypes .Types))}} {{ template "type" . }} {{ end }} - <hr/> {{ end }} -<p><em> - Generated with <code>gen-crd-api-reference-docs</code> - {{ with .gitCommit }} on git commit <code>{{ . }}</code>{{end}}. -</em></p> - {{ end }} diff --git a/script/gen_crd/template/type.tpl b/script/gen_crd/template/type.tpl index e28b088..725d405 100644 --- a/script/gen_crd/template/type.tpl +++ b/script/gen_crd/template/type.tpl @@ -2,7 +2,7 @@ <h3 id="{{ anchorIDForType . }}"> {{- .Name.Name }} - {{ if eq .Kind "Alias" }}(<code>{{.Underlying}}</code> alias)</p>{{ end -}} + {{ if eq .Kind "Alias" }}(<code>{{.Underlying}}</code> alias){{ end -}} </h3> {{ with (typeReferences .) }} <p> @@ -18,9 +18,9 @@ {{ end }} -<p> +<div> {{ safe (renderComments .CommentLines) }} -</p> +</div> {{ if .Members }} <table>