diff --git a/packages/generator-cli/src/readme/ReadmeGenerator.ts b/packages/generator-cli/src/readme/ReadmeGenerator.ts index 87982a4e8a..5051e88c0b 100644 --- a/packages/generator-cli/src/readme/ReadmeGenerator.ts +++ b/packages/generator-cli/src/readme/ReadmeGenerator.ts @@ -41,6 +41,9 @@ export class ReadmeGenerator { public async generateReadme({ output }: { output: fs.WriteStream }): Promise { const blocks: Block[] = []; + if (this.readmeConfig.docsLink != null) { + blocks.push(this.generateDocumentation({ docsLink: this.readmeConfig.docsLink })); + } if (this.snippets.requirements != null) { blocks.push(this.generateRequirements({ requirements: this.snippets.requirements })); } @@ -199,6 +202,18 @@ export class ReadmeGenerator { ); } + private generateDocumentation({ docsLink }: { docsLink: string }): Block { + const writer = new StringWriter(); + writer.writeLine("## Documentation"); + writer.writeLine(); + writer.writeLine(`${this.organization} documentation is available [here](${docsLink}).`); + writer.writeLine(); + return new Block({ + id: "DOCUMENTATION", + content: writer.toString(), + }); + } + private generateRequirements({ requirements }: { requirements: string[] }): Block { const writer = new StringWriter(); writer.writeLine("## Requirements");