Skip to content

Commit aaf61ad

Browse files
committed
feat: add aliases and examples
1 parent a4d8110 commit aaf61ad

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

src/ditamap/base-ditamap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class BaseDitamap extends Ditamap {
1111
constructor(topics: string[]) {
1212
// Set the data of topic and filenames
1313
super('cli_reference.ditamap', {
14-
namespaceDitamapFiles: topics.map(topic => `${topic}/cli_reference_${topic}.ditamap`)
14+
namespaceDitamapFiles: topics.sort().map(topic => `${topic}/cli_reference_${topic}.ditamap`)
1515
});
1616
}
1717

src/ditamap/subtopic-ditamap.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ import { Ditamap } from './ditamap';
1111
export class SubTopicDitamap extends Ditamap {
1212
constructor(topic: string, subtopic: string, commandFileNames: string[]) {
1313
const filename = `cli_reference_${topic}_${subtopic}.ditamap`;
14+
15+
commandFileNames.sort();
16+
1417
// Set the data of topic and filenames
1518
super(filename, {
1619
topic,

templates/command.hbs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,21 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
9898
{{/each}}
9999
</section>
100100
{{/if}}
101+
{{#if aliases}}
102+
<section>
103+
<title><ph>Aliases for <codeph otherprops="nolang">{{id}}</codeph></ph></title>
104+
{{#each aliases}}
105+
<codeblock otherprops="nolang">{{this}}</codeblock>
106+
{{/each}}
107+
</section>
108+
{{/if}}
109+
{{#if examples}}
110+
<section>
111+
<title><ph>Examples for <codeph otherprops="nolang">{{id}}</codeph></ph></title>
112+
{{#each examples}}
113+
{{#isCodeBlock this}}<codeblock otherprops="nolang">{{this}}</codeblock>{{else}}<p>{{this}}</p>{{/isCodeBlock}}
114+
{{/each}}
115+
</section>
116+
{{/if}}
101117
</refbody>
102118
</reference>

0 commit comments

Comments
 (0)