forked from awsdocs/aws-doc-sdk-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor SOS templates to use nested templates and add curated exampl…
…e templates (awsdocs#4186) * Refactor SOS templates to use nested templates. Add curated examples as a new example type that can be published (but don't add any yet). * Add placeholder sources.yaml so the linter finds something to lint. Co-authored-by: Steven Meyer <[email protected]>
- Loading branch information
1 parent
0241fe8
commit 4db4420
Showing
23 changed files
with
462 additions
and
517 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
placeholder-examples: | ||
name: Placeholder curated examples | ||
description: Placeholder source description until we add actual curated examples. | ||
url: https://github.com/aws/not-a-real-repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{{- template "prologue"}} | ||
{{- $include_docs := "file://AWSShared/code-samples/docs/"}} | ||
{{- if isSnapshot}} | ||
{{- $include_docs := ""}} | ||
{{- end}} | ||
<block> | ||
{{- if .BlockContent}} | ||
<xi:include href="{{$include_docs}}{{.BlockContent}}"></xi:include> | ||
{{- else}} | ||
<para>{{.Description}}</para> | ||
{{- if .DescriptionList}} | ||
<itemizedlist> | ||
{{- range $desc := .DescriptionList}} | ||
<listitem><para>{{$desc}}</para></listitem> | ||
{{- end}} | ||
</itemizedlist> | ||
{{- end}} | ||
{{- end}} | ||
<para> | ||
For complete source code and instructions on how to set up and run, see | ||
<ulink url="{{.UrlHref}}">{{.UrlText}}</ulink> in | ||
<emphasis>{{.SourceName}}</emphasis>. | ||
</para> | ||
<itemizedlist> | ||
<title>Services used in this example</title> | ||
{{- range $svc_ent := $.Services}} | ||
<listitem><para>{{$svc_ent.Short}}</para></listitem> | ||
{{- end}} | ||
</itemizedlist> | ||
</block> |
36 changes: 2 additions & 34 deletions
36
.doc_gen/templates/zonbook/example_description_template.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "file://zonbook/docbookx.dtd"[ | ||
{{- if isSnapshot}} | ||
<!ENTITY % phrases-code-examples SYSTEM "phrases-code-examples.ent"> | ||
{{- else}} | ||
<!ENTITY % phrases-code-examples SYSTEM "file://AWSShared/code-samples/docs/phrases-code-examples.ent"> | ||
{{- end}} | ||
%phrases-code-examples; | ||
<!ENTITY % phrases-shared SYSTEM "file://AWSShared/common/phrases-shared.ent"> | ||
%phrases-shared; | ||
]> | ||
<!-- zexi 0.2.0 --> | ||
{{- $synopsis_prefix := "The following code examples show how to"}} | ||
{{- $synopsis_sep := " "}} | ||
{{- $synopsis := "use this service with some of the &AWS; SDKs that are available."}} | ||
{{- if eq .ExampleCount 1}} | ||
{{- $synopsis_prefix = "The following code example shows how to"}} | ||
{{- end}} | ||
{{- if .Synopsis}} | ||
{{- $synopsis = .Synopsis}} | ||
{{- else}} | ||
{{- if .SynopsisList}} | ||
{{- $synopsis_sep = ":"}} | ||
{{- $synopsis = ""}} | ||
{{- end}} | ||
{{- end}} | ||
{{- template "prologue"}} | ||
<block> | ||
<para>{{$synopsis_prefix}}{{$synopsis_sep}}{{$synopsis}}</para> | ||
{{- if .SynopsisList}} | ||
<itemizedlist> | ||
{{- range $synitem := .SynopsisList}} | ||
<listitem><para>{{$synitem}}</para></listitem> | ||
{{- end}} | ||
</itemizedlist> | ||
{{- end}} | ||
{{- template "service_synopsis" .}} | ||
</block> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.