Commit Graph

67 Commits

Author SHA1 Message Date
Igor Minar 59136fdbe4 build(aio): add ngo + purify 2017-05-18 15:48:49 +01:00
Pete Bacon Darwin af99cf2a41 build(aio): compute `{@link ...} titles more effectively (#16813)
If a usage of `{@link ...}` does not provide a title then
compute it based on the `title` and/or `name` properties
or set the link to invalid.

Closes #16811
2017-05-16 10:21:31 -07:00
Peter Bacon Darwin a9d9aa18a0 build(aio): automatically link code blocks to API docs 2017-05-15 10:56:38 +01:00
Peter Bacon Darwin 2eca6e67e1 test(aio): add tests for renderAttributes helper 2017-05-11 10:30:10 +01:00
Peter Bacon Darwin bcbee13e26 build(aio): fail build if more than h1 is found in a doc
Closes #16193
2017-05-11 08:15:19 +01:00
Jesus Rodriguez b44f5c69e1 build(aio): make less verbose tools 2017-05-10 14:26:14 +01:00
Jesus Rodriguez 56833a6171 docs(aio): more content fixes 2017-05-10 12:51:01 +01:00
Peter Bacon Darwin f5335d17ec build(aio): fail the doc-gen if there is an invalid `{@link ...}` tag
This fail behaviour is only turned on for `yarn docs`;
in `yarn docs-watch` you only receive a warning.
This is because you can get false errors when watching
since we don't parse all the docs in that case.
2017-05-10 11:39:07 +01:00
Pete Bacon Darwin 9e661e58d1 docs(aio): image sweep (#16609)
* fix(aio): allow code blocks to clear floated images

Previously the negative margin on the code headings were causing
floated images to overlay the start of a code block. Now all code block
successfully clear all floated elements.

* feat(aio): add a `.clear` class for clearing floating images

* fix(aio): tidy up image styles

The css rules for `img.right` and `img.left` allow authors easy
access to floating an image on the left or right, respectively.

The `.image-display` rule which was always found on a figure
has been simplified so that all figures have this styling. It is very
unlikely that a figure will be used outside the content area; and
at this time it seems like `figure` is as good an indicator that we
want this kind of styling as anything.

Now that images are all tagged with width and height values, we cannot
assume to modify these dimensions via CSS as it can cause the image to
lose its correct proportions.  Until we find a better solition we must set
`height` to `auto` when the screen width is below 1300px to ensure that
these images maintain their proportions as they get shrunk to fit.

* docs(aio): general tidy up of image HTML in guides

Previously, the guides have a lot of inline image styling and unnecessary
use of the `image-display` css class.
Images over 700px are problematic for guide docs, so those have been given
specific widths and associated heights.

* docs(aio): use correct anchor for "back to the top" link

The `#toc` anchor does not work when the page is
wide enough that the TOC is floating to the side.

* build(aio): add `#top-of-page` to path variants for link checking

Since the `#top-of-page` is outside the rendered docs
the `checkAnchorLinks` processor doesn't find them
as valid targets for links.
Adding them as a `pathVariant` solves this problem
but will still catch links to docs that do not actually exist.

* fix(aio): ensure that headings clear floated images

* fix(aio): do not force live-example embedded image to 100% size

This made them look too big, generally. Leaving them with no size means
that they will look reasonable in large viewports and switch to 100% width
in narrow viewports.
2017-05-09 15:53:32 -07:00
Pete Bacon Darwin 7b4a8d53a7 build(aio): remove "pure" property from pipe template (#16655)
This information is not relevant to users, right now.

Closes #16641
2017-05-09 15:44:10 -07:00
Peter Bacon Darwin 0190df9cf3 build(aio): local assets are not dangling links
Closes #16615
Closes #16616
2017-05-09 14:33:40 +01:00
Stefanie Fluin d27588b5fb feat(aio): api label styles
- Moved info bar section in pipe template to be the first section to match other templates
- Fixed label styling for type label
- Added label styling for status label
2017-05-05 11:04:55 +01:00
Peter Bacon Darwin 5057e16874 build(aio): throw an error if a code-example tag is not closed 2017-05-04 15:52:17 -07:00
Peter Bacon Darwin 4dabec6a48 build(aio): compute search title for certain API docs 2017-05-04 13:45:04 +01:00
Peter Bacon Darwin 978376a46e build(aio): `doc.searchTitle` can override name in search results 2017-05-04 13:45:04 +01:00
Peter Bacon Darwin 5b96fb9320 build(aio): rename `src/content` to `src/generated`
This commit will definitely require a clean up of your
working folder:

```
cd aio
git clean -xdf
yarn setup
```
2017-05-03 13:40:46 -07:00
Peter Bacon Darwin 8760bf7be4 build(aio): fix paths to template macros in overview-dump template 2017-05-03 13:30:11 -07:00
Peter Bacon Darwin ea02073c84 build(aio): mark API docs as not having a TOC 2017-05-03 13:30:11 -07:00
Peter Bacon Darwin b051d7ff48 build(aio): refactor API templates for clean start 2017-05-03 13:30:11 -07:00
Peter Bacon Darwin 3f1d7f7a76 build(aio): add the api folder to the list of template folders 2017-05-03 13:30:11 -07:00
Ward Bell 9650ff0824 docs(aio): add hero “Zero” to toh-6
Update to in-memory-web-api should handle id=0.
Make sure this works by having a hero with id=0 in ToH.
Coincidentally delete lingering dead app/ folders
Todo: fix ToH images (which have to do anyway)
2017-05-03 08:03:55 +01:00
Stefanie Fluin 04dc24820d feat(aio): comment cleanup, API table styles
- API table styling
- Cleanup on resource page comments
2017-05-02 10:57:54 -07:00
Peter Bacon Darwin 3b80472bad style(aio): fix comment on postProcessHtml processor
Fixes https://github.com/angular/angular/pull/16336#discussion_r113891332
2017-05-01 15:52:51 -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
Peter Bacon Darwin 64335d3521 build(aio): capture and log errors and warnings when post-processing HTML 2017-05-01 15:52:51 -07:00
Peter Bacon Darwin 9945ce2259 build(aio): move copyContentAssets processor to the base package
This allows other processors who need to know about the copyContentAssets
processors to ensure that the runs after the content has been copied.
2017-05-01 15:52:51 -07:00
Peter Bacon Darwin 6d9da73090 build(aio): move attribute utils to helpers folder
This allows these utility functions to be reused across packages.
2017-05-01 15:52:51 -07:00
Peter Bacon Darwin c889fb1ef5 build(aio): include new packages in docs-watch 2017-05-01 15:52:51 -07:00
Peter Bacon Darwin 235eb17cca build(aio): improve info-bar template
The "npm module" and "NgModule" are now rendered correctly.

Closes #16055
2017-05-01 15:51:03 -07:00
Peter Bacon Darwin f32bfcdbe5 build(aio): convert triple backtick blocks to `code-example` tags
Closes #16246
2017-04-30 09:07:28 -07:00
Peter Bacon Darwin 24b9067047 build(aio): remove unused `{@exampleTabs}` inline tag 2017-04-30 09:07:28 -07:00
Ward Bell 7b94f493b9 feat(aio): code snippet source available & shown when code missing
Tells reader (usually the author) what code file is missing
Also when no linenums specified, turn them on if num of lines > 10
2017-04-28 11:07:45 +01:00
Ward Bell 4be1966a21 feat(aio): revise Docs page; docs version selector in sidenav 2017-04-28 09:40:39 +01:00
Peter Bacon Darwin de25cfc0cb build(aio): move autolink-headings to post-processing (#16336)
The autolinking is now done on the `renderedContent` which means it also
captures and autolinks headings that were generated outside of markdown.

PR Close #16336
2017-04-27 23:42:04 -05:00
Peter Bacon Darwin 1ceb2f9c79 build(aio): add new post-process dgeni package
This package will allow us to do complex post-processing
on the HTML that is rendered by Nunjucks.
2017-04-27 23:42:04 -05:00
Stefanie Fluin bb52e22ecf feat(aio): api pages styling
- Banner class code consolidation for API pages
- Set up temporary table of contents class and file
- API pages title styling
- Add color styling to doc-type listed on each API details page
- Classes and SCSS variables refactor
- Mobile optimization on headers, info-banner, and API pages
- API page table custom styling
- API Class Overview template code overview into table format
2017-04-26 14:31:54 +01:00
Ward Bell d8e2829e5b feat(aio): boilerplate:add cleans (removes) before adding 2017-04-26 09:23:32 +01:00
Peter Bacon Darwin 5331fc1aab build(aio): turn on dangling link checking 2017-04-25 14:09:08 +01:00
Peter Bacon Darwin 1762047bc0 build(aio): fix other dgeni templates
The function and interface templates were overriding the
wrong block.
2017-04-25 07:35:34 +01:00
Peter Bacon Darwin 9a4c8d543d build(aio): fix rendering of Decorator API docs
The templates were a bit out and we were not merging the
correct properties.

Added some docs and tests for the processor.

Related to #16208
2017-04-25 07:35:34 +01:00
Peter Bacon Darwin f5aaa55f21 build(aio): ignore the VERSION constant correctly
We were filtering this document from the docs list but
not removing it from the module export lists.

We can actually filter it out much easier at the TypeScript
parsing point, which means we do not need the
`filterIgnoredDocs` processor any more.

Closes #16287
2017-04-25 07:33:50 +01:00
Peter Bacon Darwin ff0f53c915 build(aio): include missing packages in the docs
These packages were not included in the configuration of the doc-gen, so
were not being rendered.
2017-04-25 06:56:41 +01:00
Stefanie Fluin 64ef69fb34 feat(aio): api page column layout 2017-04-25 06:51:04 +01:00
Ward Bell 93516ea8a1 docs(aio): rename cb- files and a few others 2017-04-24 14:00:51 +01:00
Peter Bacon Darwin 3cad5da5a4 build(aio): refactor dgeni packages
This is to tidy up the `author-packagse`, which currently duplicates a
lot of the configuration in the main packages. We need to
DRY this up so that we don't fall foul of a change in one being missed in
the other.
2017-04-23 22:50:33 +01:00
Stefanie Fluin cf034f759a feat(aio): api page styles
Changed description from h3 to h2 to match the other header
Created api page classes for consistent styling
Add styles for info-bar section
Wrapped pre tags for code not to go off of screen
2017-04-21 16:24:37 +01:00
Jesus Rodriguez 4598af23c0 docs(aio): adjust zips/plunker paths 2017-04-21 09:56:45 +01:00
Peter Bacon Darwin 9730351048 build(aio): compute which examples to include when watching guide docs (#16213)
PR Close #16213
2017-04-20 22:16:21 -05:00
Peter Bacon Darwin ce687550ae build(aio): run `docs` before `docs-watch` (#16213)
This helps to ensure that the full docs have been
generated before we begin watching.

You can disable this by providing the `--watch-only`
flag. E.g. `yarn docs-watch -- --watch-only`.
2017-04-20 22:16:16 -05:00
Peter Bacon Darwin 563b909279 build(aio): give the authors-package tests long enough not to flake (#16213) 2017-04-20 22:16:10 -05:00