Skip to content

Commit

Permalink
docs(nx-dev): render keywords meta tag (nrwl#29450)
Browse files Browse the repository at this point in the history
Renders `keywords` property from frontmatter as a `<meta>` tag.
  • Loading branch information
isaacplmann authored Dec 20, 2024
1 parent d7ffba8 commit c7e2782
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/nx-cloud/features/split-e2e-tasks.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
keywords: [split tasks, atomizer]
---

# Automatically Split E2E Tasks by File (Atomizer)

{% youtube
Expand Down
4 changes: 4 additions & 0 deletions docs/shared/concepts/common-tasks.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
keywords: [build, serve, test, lint]
---

# Common Tasks

The tasks that are [inferred by plugins](/concepts/inferred-tasks) or that you define in your [project configuration](/reference/project-configuration) can have any name that you want, but it is helpful for developers if you keep your task naming convention consistent across the projects in your repository. This way, if a developer moves from one project to another, they already know how to launch tasks for the new project. Here are some common task names that you can define for your projects.
Expand Down
4 changes: 4 additions & 0 deletions docs/shared/features/automate-updating-dependencies.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
keywords: [update]
---

# Automate Updating Dependencies

{% youtube
Expand Down
4 changes: 4 additions & 0 deletions docs/shared/features/distribute-task-execution.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
keywords: [distributed tasks]
---

# Distribute Task Execution (Nx Agents)

{% youtube
Expand Down
4 changes: 4 additions & 0 deletions docs/shared/reference/project-configuration.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
keywords: [project.json]
---

# Project Configuration

A project's configuration is constructed by Nx from three sources:
Expand Down
10 changes: 10 additions & 0 deletions nx-dev/feature-doc-viewer/src/lib/doc-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ export function DocViewer({
siteName: 'Nx',
type: 'website',
}}
additionalMetaTags={
metadata.keywords
? [
{
name: 'keywords',
content: metadata.keywords,
},
]
: []
}
/>

<div className="mx-auto w-full grow items-stretch px-4 sm:px-6 lg:px-8 2xl:max-w-6xl">
Expand Down

0 comments on commit c7e2782

Please sign in to comment.