Commit graph

16 commits

Author SHA1 Message Date
George Kalpakas
bdefeb1f11 perf(docs-infra): reduce unnecessary whitespace in API docs (#43435)
The HTML for the docs pages is generated by Dgeni based on some
[Nunjucks][1] templates.

Previously, these templates were set up in a way that introduced a lot
excess whitespace in the generated HTML, unnecessarily bloating the
corresponding JSON files that need to be downloaded in order to view a
certain docs page. This has been discussed in #28105 and was again
observed while investigating #43285.

This commit refactors some of the templates related to API docs (which
seem to be the most affected ones) to drastically reduce the amount of
excess whitespace. More specifically, the total size of all files in
`generated/docs/api/` was reduced from ~13MB to ~7MB.

Besides the reduced payload size for each API page, this change will
also reduce the amount of memory needed by the ServiceWorker to cache
the API pages that have been visited by a user.

NOTE:
The affected files are not eagerly downloaded when navigating to
angular.io. Instead, each file is downloaded individually, as soon as a
user visits the corresponding API docs page. Therefore, the impact of
this change will be relatively small for most users.

[1]: https://mozilla.github.io/nunjucks/

PR Close #43435
2021-09-14 08:29:50 -07:00
Stefanie Fluin
cffbaba914 fix(docs-infra): make API member name bold (#31574)
- Return API member name bold font weight
- SCSS formatting cleanup

Closes #31494

PR Close #31574
2020-03-11 14:47:16 -04:00
Pete Bacon Darwin
15dadb92ef build(docs-infra): include directives etc in class descendants lists (#25768)
PR Close #25768
2018-10-01 09:36:33 -07:00
Pete Bacon Darwin
edef58f466 build(docs-infra): ensure all API headings are sentence cased (#24949)
Closes #24880

PR Close #24949
2018-07-23 08:43:07 -07:00
Pete Bacon Darwin
cd58c0a6d9 build(aio): remove unwanted overview headings (#22681)
PR Close #22681
2018-03-12 11:23:47 -07:00
Pete Bacon Darwin
38fef1588d build(aio): move "see also" block to export-base template (#22681)
This makes it easier for all the API docs to display "see also" links
in a consitent manner.

PR Close #22681
2018-03-12 11:23:46 -07:00
Pete Bacon Darwin
c10c831b8e build(aio): render subclasses + see-also block in the main flow (#22445)
Closes #22386

PR Close #22445
2018-02-26 17:50:42 -08:00
Pete Bacon Darwin
25a43041d2 build(aio): group API members by type in overview (#22438)
Now the overview groups the members in the following order:

* static properties
* static methods
* constructor
* instance properties
* instance members

Closes #22132

PR Close #22438
2018-02-26 13:34:04 -08:00
Pete Bacon Darwin
7007f51c35 feat(aio): first pass API docs redesign (#21874)
Includes:

* display ToC for API docs
* update dgeni-packages to 0.24.1
* add floating sidebar in API docs
* add breadcrumbs and structured data for Google crawler
* improved rendering of method overloads
* properties rendered in a table
* params rendered with docs
* removal of outdated "infobox" from all API docs

PR Close #21874
2018-02-09 13:05:16 -08:00
Pete Bacon Darwin
c83c4168ca build(aio): upgrade to dgeni-packages 0.24.0 (#21802)
This has two benefits:

* it prepares the way for the API docs update, which need parameter docs
* it doesn't incorrectly report dangling links for non-latin anchors

Closes #21306

PR Close #21802
2018-01-31 10:20:37 -08:00
Peter Bacon Darwin
f06ce9adc8 build(aio): truncate API overview parameters at one line 2017-07-13 12:16:20 -07:00
Peter Bacon Darwin
998049ec9b build(aio): truncate API overview parameters at one line 2017-07-13 12:16:20 -07:00
Peter Bacon Darwin
3abf208235 build(aio): update doc-gen templates 2017-07-11 11:44:05 +01:00
Peter Bacon Darwin
d5ce086089 build(aio): fix up API doc-gen templates
* Remove whitespace before type specifiers
* Generate `new` and `call` member info for interfaces
* Ensure that there is no double space after class names
2017-06-02 13:18:09 -04:00
Peter Bacon Darwin
cb2cb7c3bd build(aio): display "call" and "new" members of interfaces in API docs 2017-05-31 08:45:50 +03:00
Peter Bacon Darwin
b051d7ff48 build(aio): refactor API templates for clean start 2017-05-03 13:30:11 -07:00