Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Mintlify to Docusaurus #586

Merged
merged 1 commit into from
Jan 4, 2024
Merged
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cargo install --git https://github.com/TraceMachina/nativelink --tag v0.2.0
### ⚙️ Configuration

The `nativelink` executable reads a JSON file as it's only parameter,
`--config`. See [nativelink-config](./nativelink-config/examples/basic_cas.json)
`--config`. See [nativelink-config](https://github.com/TraceMachina/nativelink/blob/main/nativelink-config/examples/basic_cas.json)
for more details and examples.

To grab the example in your current working directory, run:
Expand Down Expand Up @@ -79,7 +79,7 @@ and `worker`.
* Nix with [flakes](https://nixos.wiki/wiki/Flakes) enabled

This build does not require cloning the repository, but you need to provide a
config file, for instance the one at [nativelink-config/examples/basic_cas.json](./nativelink-config/examples/basic_cas.json).
config file, for instance the one at [nativelink-config/examples/basic_cas.json](https://github.com/TraceMachina/nativelink/blob/main/nativelink-config/examples/basic_cas.json).

The following command builds and runs Native Link in release (optimized) mode:

Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.cilium-cli
pkgs.yarn

# Additional tools from within our development environment.
local-image-test
Expand Down
20 changes: 20 additions & 0 deletions nativelink-docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
21 changes: 12 additions & 9 deletions nativelink-docs/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# NativeLink Docs

### Development

Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command
### Installation

```
npm i -g mintlify
$ yarn
```

Run the following command at the root of your documentation (where mint.json is)
### Local Development

```
mintlify dev
$ yarn start
```

#### Troubleshooting
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies.
- Page loads as a 404 - Make sure you are running in a folder with `mint.json`
This command generates static content into the `build` directory and can be served using any static contents hosting service.
3 changes: 3 additions & 0 deletions nativelink-docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
33 changes: 12 additions & 21 deletions nativelink-docs/about.mdx → nativelink-docs/docs/About.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
---
title: About
sidebar_position: 4
title: 'About'
description: 'What is NativeLink?'
---

<img
className="block dark:hidden"
src="/images/hero-dark.png"
alt="Hero Light"
/>
<img
className="hidden dark:block"
src="/images/hero-dark.png"
src="/img/hero-dark.png"
alt="Hero Dark"
/>

Expand All @@ -23,20 +19,15 @@ such as [Bazel](https://bazel.build), [Buck2](https://buck2.build),

Supports Unix-based operating systems and Windows.

**🎯 Goals**
<Steps>
<Step title="Stability">
Things should work out of the box as expected.
</Step>
<Step title="Efficiency">
Don't waste time on inefficiencies &amp; low resource usage.
</Step>
<Step title="User First">
Design choices should be optimized for what users want.
</Step>
</Steps>

**🏺 History**
## 🎯 Goals

**1. Things should work out of the box as expected.**

**2. Don't waste time on inefficiencies &amp; low resource usage.**

**3. Design choices should be optimized for what users want.**

## 🏺 History

This project was first created due to frustration with similar projects not
working or being extremely inefficient. Rust was chosen as the language to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
---
sidebar_position: 3
title: 'Contributing'
description: 'Learn how to contribute to NativeLink'
---

<Info>
:::info

**Prerequisite** You should have Rust installed (version 1.71.0 or
higher).
</Info>

<Warning>MacOS and Windows developers will not be able to run the full unit-test suite, which is necessary for contributing. Follow the Docker instructions in quickstart to get docker set up with NativeLink.</Warning>
:::

:::warning

MacOS and Windows developers will not be able to run the full unit-test suite, which is necessary for contributing. Follow the Docker instructions in quickstart to get docker set up with NativeLink.

:::

## Fork the repository

Expand All @@ -26,7 +33,11 @@ Should you wish to work on an issue, please claim it first by commenting on
the GitHub issue that you want to work on it. This is to prevent duplicated
efforts from contributors on the same issue.

<Tip>Look for the `good first issue` label or ask contributors in comments if something is a good issue to get started with!</Tip>
:::tip

Look for the `good first issue` label or ask contributors in comments if something is a good issue to get started with!

:::

## Pull Request Checklist

Expand All @@ -43,7 +54,7 @@ efforts from contributors on the same issue.

- Commits should be accompanied by a [Developer Certificate of Origin](http://developercertificate.org)
sign-off, which indicates that you (and your employer if applicable) agree to
be bound by the terms of the [project license](LICENSE). In git, this is the
be bound by the terms of the [project license](https://github.com/TraceMachina/nativelink/blob/main/LICENSE). In git, this is the
`-s` option to `git commit`.

- If your patch is not getting reviewed or you need a specific person to review
Expand All @@ -54,12 +65,16 @@ efforts from contributors on the same issue.

- Unit-tests run with `bazel test //..` must pass locally.

<Note>See Quickstart if having trouble running unit tests.</Note>
:::note

See Quickstart if having trouble running unit tests.

:::

- If `rustfmt` complains you can use the following command to apply its
suggested changes to the Rust sources:

```bash
```sh
bazel run \
--@rules_rust//:rustfmt.toml=//:.rustfmt.toml \
@rules_rust//:rustfmt
Expand All @@ -81,4 +96,4 @@ various Cloud CLIs for you:
## Conduct

Native Link Code of Conduct is available in the
[CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) file.
[CODE_OF_CONDUCT](https://github.com/TraceMachina/nativelink/blob/main/CODE_OF_CONDUCT.md) file.
Loading