Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

install: remove from menu, update in docs (nav and content) #447

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 '../../../../components/molecules/InstallPopup'
import SmartLink from '../../../../components/atoms/SmartLink'
Comment on lines 2 to 3
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is the right repo to edit this file now though.

import SiteLogo from '../../../../components/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 @@ -195,29 +193,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
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