Skip to content

Commit 1a4946f

Browse files
authored
Update doc generation templates (aws#1349)
Fixes the SDK's API Reference doc service client pages to generate the fragment links correctly.
1 parent 5148af5 commit 1a4946f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

doc-src/aws-godoc/templates/package_default.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,14 @@ <h2 class="toggleButton" title="Click to hide Internal Call Graph section">Inter
146146
</div> <!-- #pkg-callgraph -->
147147

148148
{{with .Consts}}
149-
<h2 id="pkg-constants">Constants <a class="permalink" href="pkg-constants"></a></h2>
149+
<h2 id="pkg-constants">Constants <a class="permalink" href="#pkg-constants"></a></h2>
150150
{{range .}}
151151
<pre>{{node_html $ .Decl true}}</pre>
152152
{{comment_html .Doc}}
153153
{{end}}
154154
{{end}}
155155
{{with .Vars}}
156-
<h2 id="pkg-variables">Variables <a class="permalink" href="pkg-variables"></a></h2>
156+
<h2 id="pkg-variables">Variables <a class="permalink" href="#pkg-variables"></a></h2>
157157
{{range .}}
158158
<pre>{{node_html $ .Decl true}}</pre>
159159
{{comment_html .Doc}}
@@ -201,7 +201,7 @@ <h3 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a
201201

202202
{{range .Methods}}
203203
{{$name_html := html .Name}}
204-
<h3 id="{{$tname_html}}.{{$name_html}}">func ({{html .Recv}}) <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a> <a class="permalink" href="#{{$tname_html}}"></a></h3>
204+
<h3 id="{{$tname_html}}.{{$name_html}}">func ({{html .Recv}}) <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a> <a class="permalink" href="#{{$tname_html}}.{{$name_html}}"></a></h3>
205205
<pre>{{node_html $ .Decl true}}</pre>
206206
{{comment_html .Doc}}
207207
{{$name := printf "%s_%s" $tname .Name}}

doc-src/aws-godoc/templates/package_service.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ <h2 class="toggleButton" title="Click to hide Index section">Operations ▾</h2>
9696
</div><!-- .expanded -->
9797
</div><!-- #pkg-index -->
9898
{{ if $.HasPaginators -}}
99-
<div id="pkg-pagination " class="toggle">
99+
<div id="pkg-pagination " class="toggleVisible">
100100
<div class="collapsed">
101101
<h2 class="toggleButton" title="Click to show Index section">Paginators ▹</h2>
102102
</div>
@@ -114,7 +114,7 @@ <h2 class="toggleButton" title="Click to hide Index section">Paginators ▾</h2>
114114
</div>
115115
</div>
116116
{{ end -}}
117-
<div id="pkg-types" class="toggle">
117+
<div id="pkg-types" class="toggleVisible">
118118
<div class="collapsed">
119119
<h2 class="toggleButton" title="Click to show Index section">Types ▹</h2>
120120
</div>
@@ -130,7 +130,7 @@ <h2 class="toggleButton" title="Click to hide Index section">Types ▾</h2>
130130
{{ range .Methods -}}
131131
{{ if is_setter $.PDoc.Name . -}}
132132
{{ $name_html := html .Name -}}
133-
<dd><a href="#{{$tname_html}}.{{$name_html}}">{{name_only_html $ . | sanitize}}</a></dd>
133+
<dd><a href="#{{$tname_html}}.{{$name_html}}">{{node_html $ .Decl false | sanitize}}</a></dd>
134134
{{ end -}}
135135
{{ end -}}
136136
{{ end -}}
@@ -250,9 +250,9 @@ <h3 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a
250250
{{ range .Methods -}}
251251
{{ $name_html := html .Name -}}
252252
{{ if is_op_deprecated $.PDoc.Name .Name -}}
253-
<h3 id="{{$tname_html}}.{{$name_html}}">func ({{html .Recv}}) <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a><div class="deprecated">Deprecated</div> <a class="permalink" href="#{{$name_html}}"></a></h3>
253+
<h3 id="{{$tname_html}}.{{$name_html}}">func ({{html .Recv}}) <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a><div class="deprecated">Deprecated</div> <a class="permalink" href="#{{$tname_html}}.{{$name_html}}"></a></h3>
254254
{{ else }}
255-
<h3 id="{{$tname_html}}.{{$name_html}}">func ({{html .Recv}}) <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a> <a class="permalink" href="#{{$name_html}}"></a></h3>
255+
<h3 id="{{$tname_html}}.{{$name_html}}">func ({{html .Recv}}) <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a> <a class="permalink" href="#{{$tname_html}}.{{$name_html}}"></a></h3>
256256
{{ end -}}
257257
<pre>{{node_html $ .Decl true}}</pre>
258258
{{comment_html .Doc}}

0 commit comments

Comments
 (0)