Skip to content

Commit c080a71

Browse files
authored
improve installation instruction (#5494)
1 parent 74f64cf commit c080a71

File tree

5 files changed

+20
-9
lines changed

5 files changed

+20
-9
lines changed

content/docs/install/linux.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ $ sudo yum install dvc
136136

137137
### On Debian/Ubuntu
138138

139-
[Download the debian package first](https://dvc.org/download/linux-deb/dvc-3.64.1).
140-
Then install it with `apt`:
139+
<downloadlink kind="linux-deb" />Download the debian package
140+
first.</downloadlink> Then install it with `apt`:
141141

142142
```cli
143143
$ sudo apt install ./dvc_0.62.1_amd64.deb
@@ -149,7 +149,7 @@ $ sudo apt install ./dvc_0.62.1_amd64.deb
149149

150150
### On Fedora/CentOS
151151

152-
[Download the RPM package directly](https://dvc.org/download/linux-rpm/dvc-3.64.1).
152+
<downloadlink kind="linux-rpm" />Download the RPM package first.</downloadlink>
153153
Then install it with `yum`:
154154

155155
```cli

content/docs/install/macos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ In this case it installs the `boto3` library along with DVC.
9696

9797
## Install from package
9898

99-
[Download the macOS PKG installer directly](https://dvc.org/download/osx/dvc-3.64.1).
99+
<downloadlink kind="osx" />Download the macOS PKG installer.</downloadlink>
100100

101101
> Note that currently, in order to open the PKG file, you must go to the
102102
> **Downloads** directory in Finder and do a

content/docs/install/windows.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ In this case it installs the `boto3` library along with DVC.
118118
## Windows installer
119119

120120
A quick option on Windows is to install DVC using the self-contained executable
121-
installer. [Download the latest version here][windows-installer-download-link].
121+
installer. <downloadlink kind="win"/>Download the latest Windows installer
122+
here.</downloadlink>
122123

123124
You'll need to download and run the installer again each time you want to update
124125
DVC. You may use Windows Uninstaller to
@@ -128,5 +129,3 @@ DVC. You may use Windows Uninstaller to
128129
> they can use them to
129130
> [optimize DVC](/user-guide/data-management/large-dataset-optimization)
130131
> operations.
131-
132-
[windows-installer-download-link]: https://dvc.org/download/win/dvc-3.64.1

packages/gatsby-theme/src/components/Documentation/Markdown/components/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { PropsWithChildren } from 'react'
22

33
import Slugger from '../../../../utils/front/Slugger'
4-
import { NoPreRedirectLink } from '../../../Link'
4+
import { DownloadLink, NoPreRedirectLink } from '../../../Link'
55
import Admonition from '../Admonition'
66
import { Tab, Toggle } from '../ToggleProvider'
77

@@ -20,5 +20,6 @@ export const getComponents = (slugger: Slugger) => ({
2020
toggle: Toggle,
2121
tab: Tab,
2222
admon: Admonition,
23-
admonition: Admonition
23+
admonition: Admonition,
24+
downloadlink: DownloadLink
2425
})

packages/gatsby-theme/src/components/Link/index.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ const PROTOCOL_REGEXP = /^https?:\/\//
1919
const isRelative = (url: string): boolean => !PROTOCOL_REGEXP.test(url)
2020
const isMailto = (url: string): boolean => url.startsWith('mailto:')
2121

22+
const VERSION = '3.64.2'
23+
2224
const ResultLinkComponent: React.FC<ILinkProps> = ({
2325
href,
2426
children,
@@ -116,4 +118,13 @@ export const NoPreRedirectLink: React.FC<ILinkProps> = props => (
116118
</Link>
117119
)
118120

121+
export const DownloadLink: React.FC<{
122+
kind: string
123+
children: React.ReactNode
124+
}> = ({ kind, children }) => (
125+
<Link href={`${mainSiteUrls.home}/download/${kind}/dvc-${VERSION}`}>
126+
{children}
127+
</Link>
128+
)
129+
119130
export default Link

0 commit comments

Comments
 (0)