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

Zexi template change to make unique title IDs #5396

Merged
merged 1 commit into from
Sep 19, 2023
Merged
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
2 changes: 1 addition & 1 deletion .doc_gen/templates/zonbook/library_by_service_chapter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<listitem><para><phrase role="topcom"><ulink url="https://github.com/awsdocs/aws-doc-sdk-examples">&AWS; SDK Examples</ulink></phrase>
&endash; GitHub repo with complete code in preferred languages. Includes instructions for setting up and running the code.</para></listitem>
</itemizedlist>
{{- template "hello" makeSlice $service.CategorizedExampleSets ""}}
{{- template "hello" makeSlice $service.CategorizedExampleSets "" $service.Model}}
<para role="contents-abbrev">Code examples</para>
{{- range $category := $service.CategoryNamesSorted}}
{{- if ne $category "Hello"}}
Expand Down
2 changes: 1 addition & 1 deletion .doc_gen/templates/zonbook/service_chapter_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{{.ServiceEntity.Caveat}}</para>
{{- template "note_example_types" makeSlice $actions.Examples $scenarios.Examples $cross_service.Examples}}
{{- template "note_complete_list"}}
{{- template "hello" makeSlice .CategorizedExampleSets ""}}
{{- template "hello" makeSlice .CategorizedExampleSets "" 0}}
<para role="contents-abbrev">Code examples</para>
{{- range $category := .CategoryNamesSorted}}
{{- if ne $category "Hello"}}
Expand Down
11 changes: 8 additions & 3 deletions .doc_gen/templates/zonbook/utility/hello.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
{{- if not $example_suffix}}
{{- $example_suffix = "tablist"}}
{{- end}}
{{- $prefix := index . 2}}
{{- $example_prefix := ""}}
{{- if $prefix}}
{{- $example_prefix = printf "%s_" $prefix}}
{{- end}}
{{- $include_docs := "file://AWSShared/code-samples/docs/"}}
{{- if isSnapshot}}
{{- $include_docs := ""}}
Expand All @@ -14,10 +19,10 @@
<block>
<collapsible expand-section="_collapse_all_">
{{- range $hello.Examples}}
<section id="example_{{.ExampleId}}_section">
<section id="{{$example_prefix}}example_{{.ExampleId}}_section">
<info>
<title id="example_{{.ExampleId}}_section.title">{{.Title}}</title>
<titleabbrev id="example_{{.ExampleId}}_section.titleabbrev">{{.TitleAbbrev}}</titleabbrev>
<title id="{{$example_prefix}}example_{{.ExampleId}}_section.title">{{.Title}}</title>
<titleabbrev id="{{$example_prefix}}example_{{.ExampleId}}_section.titleabbrev">{{.TitleAbbrev}}</titleabbrev>
<abstract>
<para>{{.Title}}</para>
</abstract>
Expand Down
2 changes: 1 addition & 1 deletion .doc_gen/templates/zonbook/utility/sdk_api_examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{{- template "note_example_types" makeSlice 1 1 0}}
<para>Each example includes a link to GitHub, where you can find
instructions on how to set up and run the code in context.</para>
{{- template "hello" makeSlice $svc_examples.CategorizedExampleSets $examples.Language}}
{{- template "hello" makeSlice $svc_examples.CategorizedExampleSets $examples.Language $examples.LanguageSlug}}
<para role="topiclist-abbrev"/>
{{- range $category := $svc_examples.CategoryNamesSorted}}
{{- if ne $category "Hello"}}
Expand Down
6 changes: 3 additions & 3 deletions .doc_gen/templates/zonbook/utility/service_examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
{{- end}}
<section id="{{$svc_prefix}}example_{{.ExampleId}}_section" role="topic">
<info>
<title id="example_{{.ExampleId}}_section.title">{{.Title}}</title>
<titleabbrev id="example_{{.ExampleId}}_section.titleabbrev">{{.TitleAbbrev}}</titleabbrev>
<title id="{{$svc_prefix}}example_{{.ExampleId}}_section.title">{{.Title}}</title>
<titleabbrev id="{{$svc_prefix}}example_{{.ExampleId}}_section.titleabbrev">{{.TitleAbbrev}}</titleabbrev>
<abstract>
<para>{{.Title}}</para>
</abstract>
Expand Down Expand Up @@ -57,7 +57,7 @@
<listitem>
<para>
<xref linkend="{{$svc_prefix}}example_{{$rel_example}}_section"
endterm="example_{{$rel_example}}_section.titleabbrev"/>
endterm="{{$svc_prefix}}example_{{$rel_example}}_section.titleabbrev"/>
</para>
</listitem>
{{- end}}
Expand Down