Commit graph

79 commits

Author SHA1 Message Date
Bob Watson
a6d953e145 docs: move tour of heroes tutorial to a subdirectory (#48162)
This commit prepares the documentation directories for future tutorials organized by directory.

Also, it moves the Angular Libraries topic from the Tutorials section to Developer Guides in TOC

PR Close #48162
2022-12-12 12:07:46 -08:00
Derek Cormier
b258b32f55 build(bazel): copy dist folder to aio for firebase deployment
Firebase requires the distributable to be in the same folder as
firebase.json.
2022-11-23 14:43:08 -07:00
Derek Cormier
e864254224 build(bazel): point to correct dist folder in firebase config (#48211)
Point to the AIO dist folder in the Bazel output tree.

PR Close #48211
2022-11-23 12:12:29 -08:00
Bob Watson
032a488d02 docs: add info about v15 changes and update process (#47951)
PR Close #47951
2022-11-16 16:13:30 -08:00
Alan Agius
760cd78e94 docs: remove redirects to no longer existing page (#47929)
This redirect is broken as this page no longer exists.

PR Close #47929
2022-11-03 17:47:53 -07:00
Alan Agius
c9a6f95c9d docs: update analytics gathering documentation (#47840)
Currently there are 3 pages for analytics gathering information. Most of the information is duplicate.

With this change we remove the duplicate pages and outdated content to reflect the changes in version 15.

PR Close #47840
2022-11-03 17:45:35 -07:00
George Kalpakas
c9241fdeb0 build(docs-infra): introduce new process for generating data for the events page (#45588)
This commit introduces a new process for generating data for the AIO
[events page](https://angular.io/events), which streamlines the process
and minimizes duplication and manual work. For more details, see
`aio/scripts/generate-events/README.md`.

PR Close #45588
2022-09-12 12:25:44 -07:00
George Kalpakas
df87f4afb5 docs: redirect /guide/ivy to the v12 guide (#46820)
Since Ivy is the default since v13, the Ivy guide (that used to live at
https://angular.io/guide/ivy) has been removed (see #43860). However,
there are certain error messages emitted by the CLI that still point to
it.

This commit address the problem by adding a redirect from
https://angular.io/guide/ivy to https://v12.angular.io/guide/ivy (which
is the last version that includes the guide).

Fixes #46717

PR Close #46820
2022-07-13 21:59:18 +00:00
Paul Gschwendtner
658d161c18 feat(docs-infra): set up Google Analytics 4 along with keeping legacy Universal Analytics (#46716)
We currently use Universal Analytics. This is deprecated in favor of
Google Analytics 4 and UA will stop processing hits in October 2023.

This change intends to prepare us for this migration, and to already
pre-populate our GA4 property (there is no way to migrate existing data
/properties into a GA4 property -- a new one needs to be created).

This will help us minimize the data gap so that we can:

* Continue to look at the UA property with the full time span until
  October 2023
* Can start using the GA4 property long-term in the future, starting
  with data even before Universal Analytics stops processing new data.

We need to keep the existing `analytics.js` setup. Initially we have
considered using `gtag.js` for both the UA and GA4 properties, as it
supports that, but that doesn't work with our strict trusted types
enforcement because it results in multiple `gtag.js` scripts (specific
versions for UA or GA4) that recreate the same trusted type policies.
This causes runtime errors and breaks the setup.

Instead, with continued use of `analytics.js` we have the benefit of
a good separation of trusted types + events and configuration. There is
some problematic with translation of Universal Analytics Events to GA4,
or the other way around (even though we don't use custom events
currenlty)

We also do not need to send page views for our GA4 property because GA4
with gtag supports this automatically (respecting the history state --
using the `Enhanced measurement events` setting in the UI).
For our UA legacy instance we continue to dispatch events manually. This
logic can be removed in the future.

More details can be found here:
https://docs.google.com/document/d/1aK8u4ZlXbqQ2wMqmgSX7Ces8iLgamC13oCoG6VeBruA/edit?usp=sharing&resourcekey=0-EVe-Rhnme3bj_pkz2RcOmw.

PR Close #46716
2022-07-12 15:53:23 +00:00
Andrew Scott
e4538e03d6 refactor(docs-infra): Redirect old document title guide to new router feature (#45857)
The "set-document-title" guide was in place to direct developers to the
`Title` service for managing page titles. Managing the title is now
available in the `Router` package and is much easier. This change
deletes the old guide and redirects it to the section in the router
guide about setting the page title.

PR Close #45857
2022-05-04 16:30:52 -07:00
Paul Gschwendtner
68a6a075f4 build: clean up references to old master branch (#45856)
Cleans up all references to the `master` branch we renamed to
`main` across Angular.

PR Close #45856
2022-05-04 16:23:33 -07:00
Joey Perrott
38ad849d98 fix(docs-infra): prevent framing of AIO with X-Frame-Options (#45419)
Prevent the docs site from being place in an iframe.

PR Close #45419
2022-03-23 12:20:49 -07:00
Joe Martin (Crowdstaffing)
36e75d3ddb docs: update link (#44017)
Update link to match heading.

PR Close #44017
2021-11-08 17:00:18 +00:00
Alex Rickabaugh
509b14536a docs: initial commit of Angular Package Format documentation (#43987)
This commit adds the Angular Package Format to AIO. Previously this document
was updated and versioned in Google Docs.

The document is also updated for the Angular Package Format version 13.

PR Close #43987
2021-11-01 18:24:21 -07:00
Joe Martin (Crowdstaffing)
fc3cd38125 docs: add latest version content (#43964)
Add the update to latest version content for version 13.  Add redirect for latest version content.  Update toc for later version content.

PR Close #43964
2021-10-29 16:51:32 -07:00
David Shevitz
a82c55ff2f docs: add redirect from angular.io/guide to angular.io/docs (#43341)
PR Close #43341
2021-10-12 17:41:48 +00:00
Joe Martin (Crowdstaffing)
644e3d2765 docs: add redirect for internationalization (#43245)
Add redirect for internationalization guide. Add test for redirect.

PR Close #43245
2021-09-23 15:40:33 -07:00
Bjarki
025cf9302b build(docs-infra): send CSP reports for Trusted Types violations (#42800)
Configure Firebase to serve a CSP header on angular.io that enables
Trusted Types in report-only mode. This causes any Trusted Types
violations that may occur as users browser angular.io to generate a CSP
report that is sent to csp.withgoogle.com, where it is processed by
Google's CSP report collector.

This is a non-breaking change that allows us to evaluate whether
angular.io is fully compatible with Trusted Types, at which point we can
start enforcing Trusted Types.

PR Close #42800
2021-09-09 11:17:00 -07:00
George Kalpakas
e064509613 docs(bazel): fix outdated redirect URL for /guide/bazel (#43376)
The file we are redirecting `/guide/bazel` to was moved from
`bazel/src/schematics/README.md` to `bazel/docs/BAZEL_SCHEMATICS.md` in
commit 71b8c9ab29.

Update the Firebase configuration to use the new path in the redirect
URL.

PR Close #43376
2021-09-09 09:17:40 -07:00
George Kalpakas
44291889ee docs(docs-infra): document how to configure redirects (#42452)
PR Close #42452
2021-06-18 17:32:58 +00:00
George Kalpakas
d07e736f17 build(docs-infra): auto-generate SW navigationUrls from Firebase config (#42452)
Previously, redirects had to be configured in both the Firebase config
(`firebase.json`) and the ServiceWorker config (`ngsw-config.json`).
This made it challenging to correctly configure redirects, since one had
to understand the different formats of the two configs, and was also
prone to getting out-of-sync configs.

This commit simplifies the process of adding redirects by removing the
need to update the ServiceWorker config (`ngsw-config.json`) and keep it
in sync with the Firebase config (`firebase.json`). Instead the
ServiceWorker `navigationUrls` are automatically generated from the list
of redirects in the Firebase config.

NOTE:
Currently, the automatic generation only supports the limited set of
patterns that are necessary to translate the existing redirects. It can
be made more sophisticated in the future, should the need arise.

PR Close #42452
2021-06-18 17:32:58 +00:00
George Kalpakas
36fb5744db build(docs-infra): add missing redirect rule for api/http in firebase.json (#42452)
Previously, only sub-paths, such as `api/http/foo`, were redirected to
`guide/deprecations#http`.

This commit ensures that also `api/http` itself (which used to point to
the `http` module's API page) is redirected as well.

PR Close #42452
2021-06-18 17:32:58 +00:00
George Kalpakas
e0338189b3 test(docs-infra): add testcases for all redirect rules (#42452)
This commit adds testcases in `URLS_TO_REDIRECT.txt` for all redirect
rules defined in `firebase.json`. This ensures that all rules are tested
and work as expected.

PR Close #42452
2021-06-18 17:32:57 +00:00
Pete Bacon Darwin
62aca30286 feat(docs-infra): add support for "special elements" (#41299)
This commit adds support for generating pages that document
special Angular elements, such as `ng-content` and `ng-template`,
which have special behavior in Angular but are not directives nor
components.

Resolves #41273

PR Close #41299
2021-06-16 14:01:16 -07:00
George Kalpakas
56a0582d79 fix(docs-infra): correctly serve index.html with a query string (#42547)
Previously, due to a bug in Firebase hosting, requests to
`/index.html?<query>` would lead to an infinite redirect and eventually
a failure. This affected, for example, cache-busting requests from the
ServiceWorker, which look like: `/index.html?ngsw-cache-bust=...`
For more details see
https://github.com/angular/angular/issues/42518#issuecomment-858545483

This commit temporarily works around the bug by explicitly redirecting
`/index.html?<query>` to `/?<query>`.

Fixes #42518

PR Close #42547
2021-06-14 09:57:30 -07:00
George Kalpakas
47bb841ed6 build(docs-infra): temporarily serve the DevTools guide at /devtools too (#42283)
The latest SW app version knows that `/devtools` should be redirected to
`/guide/devtools`. However, if a user has an older app version installed
(and until the SW downloads the latest version) they will get a 404 when
navigating to `/devtools`.

The reason is that the SW will see `/devtools` as a regular navigation
URL and serve `index.html` instead. The Angular app will then try to get
the content for `/devtools` by fetching `/generated/docs/devtools.json`
(which does not exist).

This commit fixes the issue by redirecting
`/generated/docs/devtools.json` to
`/geenrated/docs/guide/devtools.json`. When a user visits `/devtools`
for the first time, they will still be able to see the guide content
(while the SW updates in the background). On subsequent visits (once the
SW has downloaded the latest app version), they will be redirected to
`/guide/devtools`).

At a later time, once we are confident that the majority of users will
have updated to a newer app version, we can remove this temporary
redirect.

PR Close #42283
2021-05-24 15:17:21 -07:00
mgechev
a303362481 docs: redirect for devtools to the corresponding guide (#42152)
Add redirects for Angular DevTools. We have
https://angular.io/guide/devtools as canonical URL, but as a short URL
we use https://angular.io/devtools to make the extension more
discoverable.

PR Close #42152
2021-05-18 11:18:35 -07:00
George Kalpakas
d94e1acd93 docs: change updating-to-version-* redirects to point to the respective versions (#42019)
Previously, the `updating-to-version-*` URLs would redirect to the next
version update guide. More specifically:
- `/guide/updating-to-version-10` --> `https://v11.angular.io/guide/updating-to-version-11`
- `/guide/updating-to-version-11` --> `/guide/updating-to-version-12`

This seems confusing and inconsistent. Either all URLs should redirect
to the latest update guide (currently `/guide/updating-to-version-12`)
or each URL should redirect to the corresponding version.

This commit implements the second approach:
- `/guide/updating-to-version-10` --> `https://v10.angular.io/guide/updating-to-version-10`
- `/guide/updating-to-version-11` --> `https://v11.angular.io/guide/updating-to-version-11`

PR Close #42019
2021-05-13 13:48:56 -04:00
Kapunahele Wong
3a5f006ca6 docs: add redirect and update updating-to-v11 to v12 (#41625)
PR Close #41625
2021-05-06 15:15:08 -04:00
George Kalpakas
3b7d4ebbd6 fix(docs-infra): do not redirect disambiguated URLs (#41842)
In #41788, logic was added to disambiguate case-insensitively equal docs
paths/URLs. This process includes appending a `-\d+` suffix to some
paths/URLs (for example, `/.../inject-1`). Unfortunately, some of the
Firebase redirects configured in `firebase.json` would match these URLs
and redirect them to non-existing paths.
Example failures: [stable][1], [next][2]

NOTE:
This was not picked up in the regular CI tests run for PRs, because the
local devserver and the preview server used to test PRs do not support
Firebase-like redirects.

This commit fixes this by ensuring these disambiguated paths/URLs are
not matched by the redirect rules by checking whether the part of the
suffix after the `-` contains any numeric digits. While this check is
not ideal, it should be good enough for our purpose, since the legacy
URLs that we do want to redirect contain suffixes such as `-class`,
`-function` and thus no numeric digits.

[1]: https://circleci.com/gh/angular/angular/974345
[2]: https://circleci.com/gh/angular/angular/974346

PR Close #41842
2021-04-27 14:05:23 -07:00
Kapunahele Wong
820d95ba40 docs: add redirect from updating-v10 to v11 (#40108)
Redirects from https://angular.io/guide/updating-to-version-10 to
https://angular.io/guide/updating-to-version-11 to avoid 404 errors.

PR Close #40108
2021-02-09 14:45:38 -08:00
David Shevitz
60f761b4c2 docs: deprecate displaying data in views topic (#38885)
The Displaying Data in Views topic is actually a small tutorial
that describes Angular features such as interpolation and
structural directives. These content is already covered in
our getting started tutorial and in Tour of Heroes.

This change adds redirects to the Template Syntax section
of the Getting Started tutorial and deletes displaying-data.md.

PR Close #38885
2020-10-15 14:05:28 -07:00
Alan Agius
01ec0f0933 feat(docs-infra): add short url for strict mode guide (#39129)
With this change we add a short url to strict mode guide
(angular.io/strict -> angular.io/guide/strict-mode). This is important because
of two reasons.

1) Reduce the clutter in the terminal when we include the strict mode guide url in a prompt.
2) Easiler to share in conferences, slides etc..

PR Close #39129
2020-10-08 08:45:02 -07:00
Alan Agius
79dc14199b docs: update /config/app-package-json redirect (#37774)
With this change we change the redirect for `/config/app-package-json` from `https://webpack.js.org/configuration/optimization/#optimizationsideeffects` to `https://angular.io/guide/strict-mode#non-local-side-effects-in-applications`

The latter page has more details.

PR Close #37774
2020-06-30 10:45:52 -07:00
Igor Minar
3a698e2d08 feat(docs-infra): update deploy-to-firebase.sh script to support v9 multisite setup (#37721)
v9.angular.io was used to pilot the firebase hosting multisites setup for angular.io.

The deployments so far have been done manually to control the deployment process.

This change, automates the deployment for v9.angular.io so that future deployments can be made from
the CI.

See https://angular-team.atlassian.net/browse/DEV-125 for more info.

In the process of updating the scripts I rediscovered a bug in the deploy-to-firebase.sh script that
incorrect compared two numbers as strings. This previously worked correctly because we were comparing
single digit numbers. With the release of v10, we now compare 9 > 10 which behaves differently for
strings and numbers. The bug was fixed by switching to an arithmetic comparison of the two variables.

This bug has been fixed on the master branch but not on the 9.1.x branch. I realized this during the
rebase, but found my version to be a bit cleaner, so I kept it.

PR Close #37721
2020-06-25 13:44:52 -07:00
Alan Agius
8dcf618411 docs: add redirects for cli generated config files (#37533)
With this change we add redirects for config files generated by the Angular CLI. These links form part of a comment in the generated files, thus it is important that they valid for the many years to come.

PR Close #37533
2020-06-12 08:51:24 -07:00
Keen Yee Liau
e64176019a docs: Redirect /guide/bazel to deprecation doc in Angular repo (#37190)
This commit adds a 301 redirect for /guide/bazel on angular.io to the
deprecation doc for Angular Bazel schematics in Angular repo.

PR Close #37190
2020-05-28 21:35:40 -04:00
David Shevitz
c414f45ddf docs: update getting started topics to avoid duplicate topic names (#35457)
PR Close #35457
2020-02-25 13:10:30 -08:00
George Kalpakas
0b9c4245f9 refactor(docs-infra): simplify Firebase redirect config (#34726)
This simplifies the Firebase redirect config, removing a redundant
pattern (`/api/http`) which is covered by the previous pattern and
dropping an unused named captured segment (`:rest*`).

This change does not affect the redirection behavior for the deployed
apps, but allows the Firebase hosting emulator to work correctly.
(See [here][1] for more info.)

NOTE: Although we are not currently using the Firebase emulator for
      development/testing, we might want to use it in the future.

[1]: https://github.com/firebase/superstatic/issues/231#issuecomment-573034515

PR Close #34726
2020-01-13 07:19:29 -08:00
George Kalpakas
b3441eea4c ci(docs-infra): do not deploy Firebase Realtime Database rules (#34696)
Currently, the angular.io projects do not use Firebase's Realtime
Database and therefore we only need to configure and deploy changes for
`hosting`.

This commit removes the unused Realtime Database related configs and
files.

PR Close #34696
2020-01-10 08:22:38 -08:00
Judy Bogart
b85ac03136 docs(upgrade): position old setup guide as legacy until it can be removed (#32193)
PR Close #32193
2019-08-21 15:20:48 -07:00
jenniferfell
1c3ee41902 docs: move old quick start content into new local setup guide (#29651)
PR Close #29651
2019-05-20 10:16:23 -07:00
Vani
cce9b9912f docs: update redirect links and fix typo (#30092)
PR Close #30092
2019-04-26 16:31:04 -07:00
Vani
24c61cb63e docs: add redirect link to deprecation summary page (#29951)
PR Close #29951
2019-04-24 11:07:14 -07:00
jenniferfell
8ca208ff59 docs: remove outdated docs change log (#26102)
PR Close #26102
2019-04-23 15:19:10 -07:00
George Kalpakas
80c7aff5cc build(docs-infra): improve caching configuration for Firebase hosting (#28785)
This will hopefully improve(/fix?) the errors discussed in #28114.
See there for a more detailed discussion.

PR Close #28785
2019-02-19 12:38:50 -08:00
Vani
ea2cfbbd2e docs: remove setup for local dev and anatomy of setup docs from nav (#26380)
PR Close #26380
2018-10-16 14:14:00 -07:00
George Kalpakas
df5999a739 fix(docs-infra): configure Firebase to strip off the .html extension (#25999)
Firebase used to do it automatically (with `cleanUrls: true`), but it
stopped doing it unless the resulting URL corresponds to an existing
file (which is not always the case in angular.io; e.g. the resulting URL
might be matched by a new redirect rule).
This change in Firebase hosting behavior resulted in some URLs not being
correctly redirected (e.g. URLs to the archived v2 site, or `.html`
suffixed URLs from 3rd-party sites).

This commit fixes it, by configuring Firebase hosting to strip off the
`.html` extension and redirect (if no other redirect rule matched).

PR Close #25999
2018-09-19 16:08:06 -07:00
Alex Rickabaugh
be24f9f0cb feat(docs-infra): Convert AIO to use the new Service Worker 5.0.0. (#19795)
AIO is currently using a beta version of @angular/service-worker.
Since that was implemented, the SW has been rewritten and released
as part of Angular 5.0.0. This commit updates AIO to use the latest
implementation, with an appropriate configuration file that caches
the various AIO assets in useful ways.

PR Close #19795
2018-08-27 16:30:42 -04:00
George Kalpakas
cb31381734 build(docs-infra): redirect removed webpack guide to v5.angular.io (#24595)
The outdated webpack guide has been removed in #24478, but people might
still try to access it (via direct links or search-engine results).

Instead of returning 404, we will now redirect `/guide/webpack` to the
archived version of the guide at `v5.angular.io/guide/webpack`.

PR Close #24595
2018-06-20 16:51:33 -07:00