diff --git a/content/data/datachain.yml b/content/data/datachain.yml index 908fdc17bf..1432c2a9ec 100644 --- a/content/data/datachain.yml +++ b/content/data/datachain.yml @@ -3,9 +3,9 @@ Datasets are getting larger, but the ability to iterate rapidly and efficiently is as important as ever. terminal: | - from dvcx.query import C, DatasetQuery - from dvcx.lib.webdataset import WebDataset - from dvcx.lib.gpt4_vision import DescribeImage + from datachain.query import C, DatasetQuery + from datachain.lib.webdataset import WebDataset + from datachain.lib.gpt4_vision import DescribeImage prompt = "How many people in the image?" @@ -21,6 +21,6 @@ Save the results of a query in a dataset that you can use to train your ML models. terminal: | - $ dvcx query my-query.py my-dataset + $ datachain query my-query.py my-dataset .......... Dataset 'my-dataset' created diff --git a/src/components/Home/Alert/index.tsx b/src/components/Home/Alert/index.tsx index fa51ca3d91..3936a21425 100644 --- a/src/components/Home/Alert/index.tsx +++ b/src/components/Home/Alert/index.tsx @@ -1,11 +1,12 @@ import Link from '@dvcorg/gatsby-theme-iterative/src/components/Link' import { cn } from '../../../utils' +import { githubDatachainUrl } from '../../../utils/externalUrls' +import { ReactComponent as GithubSVG } from '@dvcorg/gatsby-theme-iterative/src/components/SocialIcon/github.svg' const banner = { - title: - 'DataChain Open-Source Release - A New Way to Manage your Unstructured Data', - subtitle: 'Webinar | Wednesday, July 24th | 11 am ET', - link: 'https://www.linkedin.com/events/7217199578704445442/about/' + title: 'DataChain Open-Source Release', + subtitle: 'A New Way to Manage your Unstructured Data', + link: githubDatachainUrl } const Alert = () => ( @@ -13,8 +14,8 @@ const Alert = () => (
- {banner.title} -
{banner.subtitle}
+ {banner.title} +
{banner.subtitle}
( 'font-medium', 'whitespace-nowrap', 'bg-orange-50 text-orange-700', - 'hover:bg-white' + 'hover:bg-white', + 'flex items-center' )} > - Register Now + Star us on GitHub{' '} +
diff --git a/src/components/Home/Hero/BetterTogether/index.tsx b/src/components/Home/Hero/BetterTogether/index.tsx index c283c2602f..8fa25d069c 100644 --- a/src/components/Home/Hero/BetterTogether/index.tsx +++ b/src/components/Home/Hero/BetterTogether/index.tsx @@ -5,7 +5,7 @@ const BetterTogether = () => { return (

- DVCx and DVC: Better Together + Datachain and DVC: Better Together

Build the datasets you need without modifying your data sources. Create diff --git a/src/components/Home/Hero/GetStarted/GetStartedWithDatachain.tsx b/src/components/Home/Hero/GetStarted/GetStartedWithDatachain.tsx index 7c065c126f..66aa9a8905 100644 --- a/src/components/Home/Hero/GetStarted/GetStartedWithDatachain.tsx +++ b/src/components/Home/Hero/GetStarted/GetStartedWithDatachain.tsx @@ -1,7 +1,11 @@ import HeroContainer from '../../../HeroContainer' import { cn } from '../../../../utils' import DatachainSlides from '../../LandingHero/DatachainSlides' -import GetOnTheWaitlistForm from '../GetOnTheWaitlist/Form' +import { ReactComponent as GithubSVG } from '@dvcorg/gatsby-theme-iterative/src/components/SocialIcon/github.svg' + +import { CTAButton } from '../HeroSection' +import { githubDatachainUrl } from '../../../../utils/externalUrls' +import { navigateLink } from '../../../../utils/urls' const GetStartedWithDatachain = () => { return ( @@ -12,7 +16,22 @@ const GetStartedWithDatachain = () => {

- + { + navigateLink(githubDatachainUrl) + }} + > + Star us on Github +
) diff --git a/src/components/Home/Hero/HeroSection.tsx b/src/components/Home/Hero/HeroSection.tsx index ca49146a7b..7553016cb6 100644 --- a/src/components/Home/Hero/HeroSection.tsx +++ b/src/components/Home/Hero/HeroSection.tsx @@ -9,6 +9,7 @@ import useStars from '../../../gatsby/hooks/stars' import Link from '@dvcorg/gatsby-theme-iterative/src/components/Link' import { navigate } from 'gatsby' import { StaticImage } from 'gatsby-plugin-image' +import { githubDatachainUrl, githubDvcUrl } from '../../../utils/externalUrls' interface ISectionProps { className?: string @@ -90,6 +91,7 @@ export const CTAButton = ({ const HeroSection = () => { const stars = useStars() + const datachainStars = useStars('datachain') return (
@@ -104,9 +106,25 @@ const HeroSection = () => { )} >

- GenAI dataset management + GenAI data chain

- Coming soon + + + {datachainStars ? ( + shortenNumber(datachainStars, 1) + ) : ( + --- + )} + Github Logo + +
@@ -117,10 +135,7 @@ const HeroSection = () => {

Data and model versioning

- + {stars ? ( shortenNumber(stars, 1) @@ -175,7 +190,7 @@ const HeroSection = () => { }) }} > - Learn about DVCx + Learn about Datachain
diff --git a/src/gatsby/hooks/stars.ts b/src/gatsby/hooks/stars.ts index e1f8c4269e..7f040a3163 100644 --- a/src/gatsby/hooks/stars.ts +++ b/src/gatsby/hooks/stars.ts @@ -3,7 +3,7 @@ import { useStaticQuery, graphql } from 'gatsby' import fetch from 'isomorphic-fetch' import * as Sentry from '@sentry/gatsby' -export default function useStars(): number | null { +export default function useStars(repo = 'dvc'): number | null { // Get the amount of stars from build time const staticStars = useStaticQuery(graphql` query GithubStarsQuery { @@ -13,14 +13,15 @@ export default function useStars(): number | null { } `).staticGithubData.stars + const defaultStars = repo === 'dvc' ? staticStars : null // Maintain an updatable state so we can update stars on delivery - const [stars, setStars] = useState(staticStars) + const [stars, setStars] = useState(defaultStars) // Run an IIFE to update from the server on the client side. useEffect(() => { ;(async (): Promise => { try { - const res = await fetch(`/api/github/stars?repo=dvc`) + const res = await fetch(`/api/github/stars?repo=${repo}`) if (res.status === 200) { const json = await res.json() @@ -29,11 +30,11 @@ export default function useStars(): number | null { Sentry.captureMessage( `Stars update response status was ${res.status}! Using static value.` ) - setStars(staticStars) + setStars(defaultStars) } } catch (error) { Sentry.captureException(error) - setStars(staticStars) + setStars(defaultStars) } })() }, []) diff --git a/src/utils/externalUrls.ts b/src/utils/externalUrls.ts index 78084ad90c..ed10bc48d1 100644 --- a/src/utils/externalUrls.ts +++ b/src/utils/externalUrls.ts @@ -10,6 +10,10 @@ export const studioUrl = 'https://studio.iterative.ai' // export const cloudUrl = 'https://cloud.dvc.ai' export const cloudUrl = studioUrl +// Github Urls +export const githubDatachainUrl = `https://github.com/iterative/datachain` +export const githubDvcUrl = `https://github.com/iterative/dvc` + // HubSpot Forms interface IHubSpotFormUrlOptions { portalId?: string diff --git a/src/utils/urls.ts b/src/utils/urls.ts new file mode 100644 index 0000000000..f491e43990 --- /dev/null +++ b/src/utils/urls.ts @@ -0,0 +1,13 @@ +import { navigate } from 'gatsby' + +export function isExternalLink(url: string) { + return /^https?:\/\//.test(url) +} + +export const navigateLink = (link: string) => { + if (isExternalLink(link)) { + return window.open(link, `_blank`, `noreferrer`) + } else { + navigate(link) + } +}