Skip to content

Commit

Permalink
install: remove from menu, update in docs
Browse files Browse the repository at this point in the history
moving nav entry before Cmd Ref and clarifying/simplifying the page as well
  • Loading branch information
jorgeorpinel committed Nov 18, 2022
1 parent 4237192 commit 19b43d8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 57 deletions.
47 changes: 28 additions & 19 deletions content/docs/install.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
# Installing CML as a Package

CML comes pre-installed in our provided
[Docker Images](/doc/self-hosted-runners#docker-images). Alternatively, GitHub
users can also use the [`setup-cml` action](/doc/start/github#setup-action).
<admon>

However, in all other cases, CML can be installed directly as a Node.js package
using the package manager `npm` ([see below](#installing-nodejs)):
Installing CML directly in CI environment is not typically needed, as comes
pre-installed in our provided [Docker Images]. Alternatively, GitHub users can
use the [`setup-cml` action].

```cli
$ npm i -g @dvcorg/cml
```
[docker images]: /doc/self-hosted-runners#docker-images
[`setup-cml` action]: /doc/start/github#setup-action

You may also need to install additional dependencies to use
[DVC plots](https://dvc.org/doc/command-reference/plots) and Vega-Lite:
</admon>

```cli
$ sudo apt-get install -y \
libcairo2-dev libfontconfig-dev \
libgif-dev libjpeg-dev libpango1.0-dev librsvg2-dev
$ npm install -g vega-cli vega-lite
```
CML can be installed directly as a [Node.js](https://nodejs.org) package using
`npm`.

## Installing Node.js
<details>

Instructions for installing [Node.js](https://nodejs.org) and its package
manager `npm` can be found below.
### Installing Node.js

<toggle>
<tab title="GitLab">
Expand All @@ -51,3 +43,20 @@ install a particular version, add the following step to your workflow:
</tab>
</toggle>
</details>
```cli
$ npm i -g @dvcorg/cml
```

To use [DVC plots], you need to install these additional dependencies:

```cli
$ sudo apt-get install -y \
libcairo2-dev libfontconfig-dev \
libgif-dev libjpeg-dev libpango1.0-dev librsvg2-dev
$ npm install -g vega-cli vega-lite
```

[dvc plots]: https://dvc.org/doc/command-reference/plots
8 changes: 4 additions & 4 deletions content/docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
"label": "Self-hosted Runners",
"slug": "self-hosted-runners"
},
{
"label": "Install as a Package",
"slug": "install"
},
{
"label": "Command Reference",
"slug": "ref",
Expand Down Expand Up @@ -68,10 +72,6 @@
}
]
},
{
"label": "Install as a Package",
"slug": "install"
},
{
"label": "Contributing",
"slug": "contributing",
Expand Down
9 changes: 0 additions & 9 deletions src/components/molecules/HamburgerMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,6 @@ export const HamburgerMenu: React.FC<
Doc
</Link>
</li>
<li className={styles.section}>
<Link
href="/doc/install"
className={styles.sectionHeading}
onClick={handleItemClick('install')}
>
Install
</Link>
</li>

<li className={styles.section}>
<div className={styles.sectionHeading}>Support</div>
Expand Down
25 changes: 0 additions & 25 deletions src/components/organisms/SiteHeader/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'
import { Flex, Box, Container, Button } from '@theme-ui/components'
import InstallPopup from '../../molecules/InstallPopup'
import SmartLink from '../../atoms/SmartLink'
import SiteLogo from '../../molecules/SiteLogo'
import Alert from './Alert'
Expand Down Expand Up @@ -145,7 +144,6 @@ const Header: React.FC<IHeaderProps> = ({ isMain }) => {

const collapsed = opened

const installPopup = usePopup()
const otherToolsPopup = usePopup()

return (
Expand Down Expand Up @@ -193,29 +191,6 @@ const Header: React.FC<IHeaderProps> = ({ isMain }) => {
{label}
</SmartLink>
))}
<Box
ref={installPopup?.containerEl}
sx={{ position: ['static', 'relative'] }}
onMouseEnter={installPopup.open}
onMouseLeave={installPopup.close}
>
<Button
onPointerUp={installPopup.toggle}
onKeyUp={onSelectKey(installPopup.toggle)}
variant="layout.Header.Nav.NavButton"
sx={
installPopup.isOpen
? { variant: 'layout.Header.Nav.NavButton.Active' }
: {}
}
>
Install
</Button>
<InstallPopup
onClose={installPopup.close}
isOpen={installPopup.isOpen}
/>
</Box>
<Box
variant="layout.Header.Nav.OtherTools"
ref={otherToolsPopup.containerEl}
Expand Down

0 comments on commit 19b43d8

Please sign in to comment.