diff --git a/website/docs/docs/collaborate/govern/model-versions.md b/website/docs/docs/collaborate/govern/model-versions.md index 0bd16a03b3a..35bb7e047c8 100644 --- a/website/docs/docs/collaborate/govern/model-versions.md +++ b/website/docs/docs/collaborate/govern/model-versions.md @@ -14,7 +14,7 @@ This functionality is new in v1.5 — if you have thoughts, participate in [the -import VersionsCallout from '/snippets/_version-callout.md'; +import VersionsCallout from '/snippets/_model-version-callout.md'; diff --git a/website/docs/reference/project-configs/version.md b/website/docs/reference/project-configs/version.md index 890ad8542a7..54df6bfcb31 100644 --- a/website/docs/reference/project-configs/version.md +++ b/website/docs/reference/project-configs/version.md @@ -4,7 +4,7 @@ required: True keyword: project version, project versioning, dbt project versioning --- -import VersionsCallout from '/snippets/_version-callout.md'; +import VersionsCallout from '/snippets/_model-version-callout.md'; diff --git a/website/docs/reference/resource-configs/dbt_valid_to_current.md b/website/docs/reference/resource-configs/dbt_valid_to_current.md index 2a6cf3abe6d..9cf2ca0860e 100644 --- a/website/docs/reference/resource-configs/dbt_valid_to_current.md +++ b/website/docs/reference/resource-configs/dbt_valid_to_current.md @@ -6,7 +6,7 @@ default_value: {NULL} id: "dbt_valid_to_current" --- -Available from dbt v1.9 or with [the dbt Cloud "Latest" release track](/docs/dbt-versions/cloud-release-tracks) dbt Cloud. + diff --git a/website/docs/reference/resource-properties/versions.md b/website/docs/reference/resource-properties/versions.md index 748aa477a4f..d2cb4a1f116 100644 --- a/website/docs/reference/resource-properties/versions.md +++ b/website/docs/reference/resource-properties/versions.md @@ -5,7 +5,7 @@ required: no keyword: governance, model version, model versioning, dbt model versioning --- -import VersionsCallout from '/snippets/_version-callout.md'; +import VersionsCallout from '/snippets/_model-version-callout.md'; diff --git a/website/snippets/_version-callout.md b/website/snippets/_model-version-callout.md similarity index 100% rename from website/snippets/_version-callout.md rename to website/snippets/_model-version-callout.md diff --git a/website/src/components/versionCallout/index.js b/website/src/components/versionCallout/index.js new file mode 100644 index 00000000000..598182c851f --- /dev/null +++ b/website/src/components/versionCallout/index.js @@ -0,0 +1,23 @@ +import React from 'react'; +import Admonition from '@theme/Admonition'; + +const VersionCallout = ({ version }) => { + if (!version) { + return null; + } + + return ( +
+ + + Available from dbt v{version} or with the{' '} + + dbt Cloud "Latest" release track + {' '}. + + +
+); +}; + +export default VersionCallout; diff --git a/website/src/theme/MDXComponents/index.js b/website/src/theme/MDXComponents/index.js index 422d6c99fab..c0a15e6c5b6 100644 --- a/website/src/theme/MDXComponents/index.js +++ b/website/src/theme/MDXComponents/index.js @@ -45,6 +45,7 @@ import Lifecycle from '@site/src/components/lifeCycle'; import DetailsToggle from '@site/src/components/detailsToggle'; import Expandable from '@site/src/components/expandable'; import ConfettiTrigger from '@site/src/components/confetti/'; +import VersionCallout from '@site/src/components/versionCallout'; const MDXComponents = { Head, @@ -97,5 +98,6 @@ const MDXComponents = { Expandable: Expandable, ConfettiTrigger: ConfettiTrigger, SortableTable: SortableTable, + VersionCallout: VersionCallout, }; export default MDXComponents;