Commit graph

4 commits

Author SHA1 Message Date
Derek Cormier
7642abfb7a build(bazel): fix bazel aio regressions after rebase
The aio-bazel-migration branch was rebased onto main to include runfiles
support on windows.
2022-11-22 13:51:16 -07:00
Derek Cormier
431c562815 build(bazel): add bazel targets for aio doc generation
This is an incremental step to produce dgeni output with bazel. The
generated outputs are not yet used by other targets.
2022-11-22 13:51:16 -07:00
George Kalpakas
3fdcf991c7 build(docs-infra): be able to resolve root-relative image URLs in getImageDimensions() (#46138)
Previously, `getImageDimensions()` would try to resolve image URLs
relative to the base path using `path.resolve()`. This resulted in
root-relative URLs (i.e. URLs starting with `/`) being treated as
absolute filesystem paths and thus resolving incorrectly
([example failure][1]).

This commit fixes it by using `.join()` instead, which is more
appropriate in this case. (Originally discussed [here][2].)

[1]: https://circleci.com/gh/angular/angular/1173150
[2]: https://github.com/angular/angular/pull/46134#issuecomment-1137191996

PR Close #46138
2022-05-26 11:25:07 -07:00
Peter Bacon Darwin
ca17d4f639 build(aio): auto-fill width/height to all image tags
Parse all `<img>` tags, during doc-gen, and insert the width and height of
the sourceed image, if neither are already specified.

Warnings are reported if the `<img>` tag has no `src` attribute or the image
cannot be loaded.

The work is done in the `addImageDimensions` post-processor, which must be
configured with a `basePath` so that it knows where to find the images.

Closes #15888
2017-05-01 15:52:51 -07:00