Skip to content

Commit

Permalink
add global version callout
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 committed Dec 16, 2024
1 parent 39c9cd4 commit b39fe72
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions website/docs/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ pagination_next: null
pagination_prev: null
---


<VersionCallout version="2.5" />

<Snippet path="what-is-dbt-intro" />

dbt compiles and runs your analytics code against your data platform, enabling you and your team to collaborate on a single source of truth for metrics, insights, and business definitions. This single source of truth, combined with the ability to define tests for your data, reduces errors when logic changes, and alerts you when issues arise.
Expand Down
17 changes: 17 additions & 0 deletions website/src/components/versionCallout/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import Admonition from '@theme/Admonition';

const VersionCallout = ({ version }) => (
<div>
<Admonition type="tip" icon="💡" title="Did you know...">
<span>
Available from dbt v{version} or with the{' '}
<a href="/docs/dbt-versions/cloud-release-tracks">
dbt Cloud "Latest" release track
</a>{' '}.
</span>
</Admonition>
</div>
);

export default VersionCallout;
2 changes: 2 additions & 0 deletions website/src/theme/MDXComponents/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -97,5 +98,6 @@ const MDXComponents = {
Expandable: Expandable,
ConfettiTrigger: ConfettiTrigger,
SortableTable: SortableTable,
VersionCallout: VersionCallout,
};
export default MDXComponents;

0 comments on commit b39fe72

Please sign in to comment.