Generate the proto docs in the grpc_apis folder and ignore it from repo
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
hugo/
|
hugo/
|
||||||
|
grpc_apis/
|
||||||
mutagen.yml.lock
|
mutagen.yml.lock
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
---
|
---
|
||||||
title: "GRPC API"
|
{{- $package := (index .Files 0).Package }}
|
||||||
date: 2018-05-02T00:00:00+00:00
|
title: "{{ $package }}"
|
||||||
|
url: /grpc_apis/{{ $package }}
|
||||||
|
date: {{ now | date "2006-01-02T15:04:05Z07:00" }}
|
||||||
weight: 50
|
weight: 50
|
||||||
geekdocRepo: https://github.com/owncloud/ocis-thumbnails
|
geekdocRepo: https://github.com/owncloud/ocis
|
||||||
geekdocEditPath: edit/master/docs
|
geekdocEditPath: edit/master/docs/grpc_apis/{{ $package | replace "." "/" }}
|
||||||
geekdocFilePath: grpc.md
|
geekdocFilePath: grpc.md
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -26,9 +28,9 @@ geekdocFilePath: grpc.md
|
|||||||
{{ range .Fields -}}
|
{{ range .Fields -}}
|
||||||
{{- $loca := printf "#%s" (.LongType | lower | replace "." "") -}}
|
{{- $loca := printf "#%s" (.LongType | lower | replace "." "") -}}
|
||||||
{{- if and (hasPrefix "ocis." .LongType) (ge (len $filenameParts) 3) -}}
|
{{- if and (hasPrefix "ocis." .LongType) (ge (len $filenameParts) 3) -}}
|
||||||
{{- $rep := regexReplaceAll "[^/]+" (slice $filenameParts 1 (sub (len $filenameParts) 1) | join "/") ".." -}}
|
{{- $ltypeSpl := .LongType | splitList "." -}}
|
||||||
{{- $fieldDir := dir (.LongType | lower | replace "." "/") -}}
|
{{- $ltypePkg := slice $ltypeSpl 0 (sub (len $ltypeSpl) 1) | join "." -}}
|
||||||
{{- $loca = printf "%s/%s/grpc.md#%s" $rep (substr 5 (len $fieldDir) $fieldDir) (.Type | lower | replace "." "") -}}
|
{{- $loca = printf "/grpc_apis/%s/#%s" $ltypePkg (.Type | lower) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
| {{.Name}} | [{{.LongType}}]({{ $loca }}) | {{.Label}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end }} |
|
| {{.Name}} | [{{.LongType}}]({{ $loca }}) | {{.Label}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end }} |
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ plugins:
|
|||||||
- paths=source_relative
|
- paths=source_relative
|
||||||
|
|
||||||
- name: microweb
|
- name: microweb
|
||||||
#path: ../../.bingo/protoc-gen-microweb
|
path: ../../.bingo/protoc-gen-microweb
|
||||||
path: ../../../protoc-gen-microweb/protoc-gen-microweb
|
|
||||||
out: ../gen/
|
out: ../gen/
|
||||||
opt:
|
opt:
|
||||||
- paths=source_relative
|
- paths=source_relative
|
||||||
@@ -30,6 +29,6 @@ plugins:
|
|||||||
|
|
||||||
- name: doc
|
- name: doc
|
||||||
path: ../../.bingo/protoc-gen-doc
|
path: ../../.bingo/protoc-gen-doc
|
||||||
out: ../docs/extensions
|
out: ../../docs/grpc_apis
|
||||||
opt:
|
opt:
|
||||||
- ../docs/GRPC.tmpl,grpc.md,source_relative
|
- ../docs/GRPC.tmpl,grpc.md,source_relative
|
||||||
|
|||||||
Reference in New Issue
Block a user