224 Commits

Author SHA1 Message Date
Alan Agius 275589c564 feat(docs-infra): add hideDollar option to hide the dollar sign prefix in shell code blocks.
The dollar sign is not always required.

(cherry picked from commit efcf76ea61)
2026-02-23 17:08:55 +00:00
Alan Agius b87eed1449 docs: add documentation for SSR security and host validation, including details on allowedHosts configuration
This document adds more information about `allowedHost` option

(cherry picked from commit 944aefe854)
2026-02-23 17:08:54 +00:00
SkyZeroZx cccaed0d3d docs(docs-infra): preserve content before docs-card-container in adev
The tokenizer regex pattern `[^<]*` was consuming all non-`<` content
before custom HTML tags, causing lost content.

Changed to `\s*` which only allows leading whitespace, letting marked
properly tokenize preceding content.

(cherry picked from commit bc473cf60f)
2026-02-19 23:48:48 +00:00
SkyZeroZx c3600b3d99 docs(docs-infra): fix heading ID generation and display
Ensures that custom heading IDs are properly handled

(cherry picked from commit dd15efb7c3)
2026-02-09 12:20:18 -08:00
SkyZeroZx 29f70072a8 docs(docs-infra): simplify external link rendering for pill
Renders the external link icon for docs pills using CSS instead of a `docs-icon` component.

(cherry picked from commit 0b9d1cfb7b)
2026-02-09 12:19:12 -08:00
SkyZeroZx df7bf134fe docs(docs-infra): ensure code preview copy preserves spaces
Preserve whitespace when copying code examples from the docs. Fixes the copy handler so copied snippets keep original spacing.

Fixes #66790

(cherry picked from commit 522c5ba868)
2026-02-02 10:09:39 -08:00
Matthieu Riegler e0a260a425 docs(docs-infra): wrap getTextOfJSDocComment
This commits adds a wrapper around `ts.getTextOfJSDocComment` because of bugs that won't be fixed by the TS team (see microsoft/TypeScript#63027)

(cherry picked from commit 72dfb4d92a)
2026-01-29 13:16:05 -08:00
SkyZeroZx 49e3c25d62 docs(docs-infra): Exempts more symbols from automatic linking (#66732)
Extends the list of symbols that should not be
automatically linked for forms.

PR Close #66732
2026-01-26 22:46:11 +00:00
SkyZeroZx 458e21e0fe docs(docs-infra): Exempts more symbols from automatic linking
Extends the list of symbols that should not be
automatically linked.

(cherry picked from commit 30b50e7142)
2026-01-22 15:01:43 -08:00
Matthieu Riegler ad9e473e73 docs(docs-infra): fix regression on docs-tabs
(cherry picked from commit 4ca2722d6f)
2026-01-21 20:43:07 +00:00
Matthieu Riegler 18842266de docs(docs-infra): Handle additional description format
Ex: https://angular.dev/api/router/withExperimentalPlatformNavigation
(cherry picked from commit f0b1061791)
2026-01-21 19:37:11 +00:00
SkyZeroZx 01e98ded2e docs(docs-infra): : Exempts animation-related symbols from linking
Exempts 'group()', 'keyframes', and '@keyframes' symbols from automatic linking.

(cherry picked from commit 00455105cf)
2026-01-20 18:13:55 +00:00
Joey Perrott 82593de5a4 fix(docs-infra): support providing links to multiple symbols within a single line of a code block
Previously our system only found the first matching symboling to link to within a code block on each line, now we set up a link for all of the discovered symbols on each line

Fixes #65403

(cherry picked from commit a88f353a45)
2026-01-20 17:35:36 +00:00
Joey Perrott 0f3f346ec4 fix(docs-infra): use public folder instead of assets folder for static files in adev tutorials
Use public folder rather than assets folder after the change in angular-cli's defaults for angular.json

Fixes #58981

(cherry picked from commit f2cf96b519)
2026-01-15 18:59:30 +00:00
Matthieu Riegler c0446da35f docs(docs-infra): prevent heading from linking symbols
(cherry picked from commit a792315f09)
2026-01-15 16:59:18 +00:00
SkyZeroZx d81f8ea0f6 docs(docs-infra): Exempts animation-related symbols from linking
Exempts 'animation', 'transition', and 'trigger' symbols from automatic linking.

(cherry picked from commit 724e917f7a)
2026-01-14 16:24:53 +00:00
Matthieu Riegler 79f979a673 docs(docs-infra): Throw build error on invalid guide links
The list of valid links is generated from navigation data configuration in the ADEV app.
Redirections are knowingly exclude so we stop referencing them.

(cherry picked from commit c09f5352f6)
2026-01-12 21:38:23 +00:00
Shuaib Hasan Akib cc066cb31f fix(docs-infra): prevent duplicate description rendering for block API entries
Block entries (@if, @defer, @for,@let, @switch) were falling back to the generic
DocsReference template, causing the description to appear twice - once in
the header section and once in the main content area.

This commit adds a dedicated rendering path for block entries:
- Creates BlockEntryRenderable type and associated transforms
- Adds BlockReference template that uses RawHtml directly
- Modifies HeaderApi to accept hideDescription prop
- Updates processing and rendering pipelines to handle blocks

The fix ensures block documentation displays only one description section
while preserving the existing behavior for all other API entry types.

Update adev/shared-docs/pipeline/api-gen/rendering/transforms/block-transforms.mts

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
(cherry picked from commit 8bdd98ef41)
2026-01-12 21:37:58 +00:00
Matthieu Riegler 481557e69f docs(docs-infra): prevent from showing duplicate usage blocks in functions API docs
fixes #66398

(cherry picked from commit b22835579e)
2026-01-12 17:50:16 +00:00
Matthieu Riegler 13a7ee8424 docs(docs-infra): Show API decorators docs
fixes #66129

(cherry picked from commit a056413520)
2026-01-12 17:41:28 +00:00
Shuaib Hasan Akib 8358e548ce fix(docs-infra): stop auto-linking "state" and "group" to APIs
Prevents common words used in code examples from being incorrectly
linked to API references.

Fixes: #66292
2026-01-05 12:01:51 -05:00
SkyZeroZx 3b73eff0b4 docs(docs-infra): apply OnPush change detection and remove redundant root provider
Adds OnPush change detection and removes a redundant `providedIn: 'root'` injection token.
2026-01-02 08:23:20 +01:00
Shuaib Hasan Akib e9d1c6478a docs(docs-infra): clean up TODO comment, unused imports, and helper function 2025-12-17 14:33:58 -08:00
Matthieu Riegler 6270bba056 ci: reformat files
This is after we've slightly changed a rule in #66056
2025-12-16 14:44:19 -08:00
Shuaib Hasan Akib 3ff20a58d3 refactor(docs-infra): remove deprecated h.JSX.HTMLAttributes usage
Import HTMLAttributes directly from preact to address deprecation warning in header-api.tsx
2025-12-15 17:44:24 -08:00
Alan Agius 2a5c6919d0 build: remove API doc generation for localize/init and add mnemonic to API rendering rule.
The removed target was not used and was generating an empty output which causes `java.io.IOException: mandatory output packages/localize/init/localize_docs_html was not created`
2025-12-15 11:41:43 -08:00
Matthieu Riegler b5205c7c42 docs(docs-infra): throw when rendering absolute links to adev in our guides
This is to prevent any further regressions in the future
2025-12-15 09:45:04 -08:00
Andrew Xue ff68806c67 docs(docs-infra): add primary color vars for tutorial button 2025-12-11 17:11:27 -08:00
SkyZeroZx a8fac4ce3b docs(docs-infra): Fix prefer/avoid rule matching with word boundaries
Improve code block rule detection by adding word-boundary anchors.
Also update indentation for consistency.
2025-12-11 17:08:50 -08:00
SkyZeroZx 15e3407dab docs(docs-infra): Fixes the visibility of the copy link button in API documentation headings
Fixes the visibility of the copy link button in API documentation headings.
The button now appears on hover, improving the user experience.
2025-12-10 10:15:59 -08:00
Shuaib Hasan Akib 1f29577077 fix(docs-infra): parse linenums attribute from triple backtick metadata
The triple backtick code block parser now extracts the linenums attribute
from metadata and applies it to enable line number display in code examples
2025-12-10 09:31:44 -08:00
Matthieu Riegler 8199945637 refactor(core): add dedicated deprecated signatures for providedIn: any / NgModule.
Those were deprecated by #47616 back in v15.

fixes #65923
2025-12-09 10:38:09 -08:00
SkyZeroZx 9a6b8e0315 docs(docs-infra): Refactors tutorial generation and updates ng-container docs
Updates the `ng-container` documentation page to use the correct `angular-html` code format and removes an unused CLI documentation file.
2025-12-09 09:25:29 -08:00
Matthieu Riegler 3411638f65 docs(docs-infra): prefer/avoid code block styling
fixes #65866
2025-12-09 09:23:12 -08:00
Joey Perrott aa92f19307 build: update to bazel version 8.4.2
Update bazel to use version 8.4.2
2025-12-08 10:21:59 -08:00
Matthieu Riegler 9d1d742f1b build: enable angular formatting on all html files
This should also be safe on any html file that isn't an angular template
2025-12-08 10:19:45 -08:00
SkyZeroZx a4563044ad docs(docs-infra): fix hideCopy option to code snippets
Adds the ability to hide the copy button on code snippets.

Updates documentation to use the new `hideCopy` option with the new
markdown code fence syntax.
2025-12-08 08:48:20 -08:00
Shuaib Hasan Akib 7f8ffa3304 fix(docs-infra): prevent readonly TypeScript keyword from being linked
This updates the docs infrastructure to avoid incorrectly linking the `readonly` keyword in TypeScript examples.

Fixes #65632
2025-12-03 16:30:51 +01:00
Joey Perrott 34bedae101 docs: rename visibleRegion to region
Use the attribute region instead of visibleRegion
2025-12-03 10:06:01 +01:00
Joey Perrott 9b3b5fb4cf refactor(docs-infra): extract only the visibleRegion
Previously we extracted the regions and only made the visible region visible on the page, but since there is not a need for the
non-visible code to be presented, we don't need to include it in the generated code snippets.
2025-12-03 10:06:01 +01:00
Matthieu Riegler a784995a98 docs(docs-infra): Show examples on function overloads 2025-12-02 12:13:11 +01:00
Joey Perrott a16a70ca74 refactor(docs-infra): move header id tracking into RendererContext
Move the header id tracking into the renderer context rather than a global state.  Since the RendererContext is
initialized for each execution of the marked parser, we can store the context of which header ids have been seen within
a single page there which allows us to run these parse interactions in parallel.
2025-12-02 12:03:34 +01:00
Joey Perrott 8b296543ae refactor(docs-infra): transform all headings using the built in transformer
Rather than manually calling the transformer we use for headings from within a render function, we now properly call into the Renderer to do them
via the tokens they are require instead.  This is being done to allow us to have a per Renderer instance of state instead of a global state, which will
allow us to run marked async and hopefully speed up the pipeline
2025-12-02 12:03:34 +01:00
SkyZeroZx 4e89bc6244 feat(docs-infra): Adds copy link to anchor functionality
Enables copying a direct link to any section by clicking its anchor. Also updates the aria-label to remove the code tag
2025-12-01 19:19:31 +01:00
SkyZeroZx 2d854e01bc docs(docs-infra): Improves symbol linking for Angular Aria selectors
Improves the symbol linking logic to handle Angular component selectors (e.g., ngCombobox). It attempts to convert Angular selector patterns to their corresponding class names, improving navigation to Angular API documentation.
2025-12-01 18:47:19 +01:00
SkyZeroZx ef034c15c1 docs(docs-infra): renders inline code snippets in docs pills
Improves the rendering of `DocsPillRow` to correctly display inline code snippets (using backticks) within the pill labels.
2025-11-25 18:30:05 -05:00
Joey Perrott 046501fd33 refactor(docs-infra): make docs-alert an inline token
Migrate docs-alert to be inline instead of block, this ensures that the content is placed within a <p> tag as expected. This is important
for ensuring that the iconography is placed correctly within the wrapper div generated for the alert. Additionally, we refactor the matcher
code to be more efficient, running with fewer loops.
2025-11-24 13:25:59 -05:00
SkyZeroZx 46269be842 feat(docs-infra): add docs-image extension for enhanced image handling in markdown
Extends the Markdown parser to support `loading`, `decoding`, and `fetchpriority` attributes for images via curly brace syntax.
2025-11-21 13:24:59 -05:00
Joey Perrott 88753d6a5a refactor(docs-infra): improve code efficiency for adding line numbers
Only run the code for adding line numbers if line numbers are required, otherwise skip the code block
2025-11-21 13:20:46 -05:00
Joey Perrott a873c4eb1a refactor(docs-infra): remove the unnecessary whitespace using shiki
Use a transformer within shiki to remove the unnecessary whitespace between code lines
2025-11-21 13:20:46 -05:00