angular/aio/tools/transforms/templates
Alex Rickabaugh 9d4842cadb Revert "docs(docs-infra): Remove unused annotation template (#50114)" (#50206)
This reverts commit a1ca162fd6.

This commit causes failures in g3, because `@Annotation` is load-bearing for
tsickle's decorator downleveling transformation.

PR Close #50206
2023-05-08 09:45:35 -07:00
..
api Revert "docs(docs-infra): Remove unused annotation template (#50114)" (#50206) 2023-05-08 09:45:35 -07:00
cli docs: improve grammer in CLI command template (#47891) 2022-10-28 02:29:07 -07:00
error docs(docs-infra): hide Debugging the errorsection. (#50074) 2023-05-02 12:15:01 +02:00
extended-diagnostic fix(docs-infra): fix placement of "Edit source" button on errors and diagnostics pages (#45634) 2022-04-21 11:07:27 -07:00
lib ci: add Angular CLI help pages action (#48577) 2023-01-10 08:01:38 -08:00
BUILD.bazel build(bazel): create targets for aio docs tests 2022-11-22 13:51:16 -07:00
content.template.html build(docs-infra): implement @reviewed tag definition (#40582) 2021-01-28 09:04:49 -08:00
data-module.template.js build(aio): move the transforms folder into the tools folder 2017-04-16 22:05:23 +01:00
example-region.template.html build(aio): move the transforms folder into the tools folder 2017-04-16 22:05:23 +01:00
json-doc.template.json build(aio): move the transforms folder into the tools folder 2017-04-16 22:05:23 +01:00
overview-dump.template.html refactor(docs-infra): refactor templates (#24378) 2018-08-31 09:42:10 -07:00
README.md build(docs-infra): remove legacy jsdoc tag processing (#26039) 2018-09-24 09:11:02 -07:00
sitemap.template.xml build(aio): generate sitemap from the generated pages (#21689) 2018-01-22 12:55:15 -08:00

This folder contains the dgeni templates that are used to generate the API docs

Generally there is a template for each docType. Templates can extend and/or include other templates. Templates can also import macros from other template files.

Template inheritance

When extending a template, parent must declare blocks that can be overridden by the child. The template extension hierarchy looks like this (with declared blocks in parentheses):

  • layout/base.template.html (bread-crumbs, header, embedded contents and body)
    • package.template.html
    • export-base.template.html (short-description, security-notes, deprecation, overview, see-also, details, usageNotes)
      • class.template.html
        • directive.template.html
      • enum.template.html
      • var.template.html
        • const.template.html
        • let.template.html
      • decorator.template.html
      • function.template.html
      • interface.template.html
        • value-module.template.html
      • type-alias.template.html
      • pipe.template.html
      • ngmodule.template.html

Doc Properties

It is useful to know what properties are available on each doc type when working with the templates. The typescript Dgeni package is now written in TypeScript and there is a class for each of the types of API document. See https://github.com/angular/dgeni-packages/tree/master/typescript/src/api-doc-types. This is a good place to go to see what properties you can use in the templates.