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

docs: some improvement after the docs migration #470

Merged
merged 4 commits into from
May 12, 2022
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
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# DevStream Docs

// TODO
8 changes: 4 additions & 4 deletions docs/quickstart_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Download the appropriate `dtm` version for your platform from [DevStream Release

## 2 Prepare a Config File

Copy the [examples/quickstart.yaml](../examples/quickstart.yaml) and [examples/tools-quickstart.yaml](../examples/tools-quickstart.yaml) to your working directory and rename `quickstart.yaml` to `config.yaml`:
Download the [examples/quickstart.yaml](https://raw.githubusercontent.com/devstream-io/devstream/main/examples/quickstart.yaml) and [examples/tools-quickstart.yaml](https://raw.githubusercontent.com/devstream-io/devstream/main/examples/tools-quickstart.yaml) to your working directory and rename `quickstart.yaml` to `config.yaml`:

```shell
cp examples/quickstart.yaml config.yaml
cp examples/tools-quickstart.yaml tools-quickstart.yaml
curl -o config.yaml https://raw.githubusercontent.com/devstream-io/devstream/main/examples/quickstart.yaml
curl -o tools-quickstart.yaml https://raw.githubusercontent.com/devstream-io/devstream/main/examples/tools-quickstart.yaml
```

Then modify the file accordingly.
Expand All @@ -31,7 +31,7 @@ sed -i.bak "s/YOUR_DOCKER_USERNAME/ironcore864/g" tools-quickstart.yaml

> This config file uses two plugins, one will create a GitHub repository and bootstrap it into a Golang web app, and the other will create GitHub Actions workflow for it.

The two plugins [require an environment variable](https://www.devstream.io/docs/plugins/github-repo-scaffolding-golang) to work, so let's set it:
The two plugins [require an environment variable](../plugins/github-repo-scaffolding-golang) to work, so let's set it:

```shell
export GITHUB_TOKEN="YOUR_GITHUB_TOKEN_HERE"
Expand Down
8 changes: 4 additions & 4 deletions docs/quickstart_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

## 2 准备一个配置文件

将 [examples/quickstart.yaml](../examples/quickstart.yaml) 和 [examples/tools-quickstart.yaml](../examples/tools-quickstart.yaml) 文件拷贝到你到工作目录下,然后重命名`quickstart.yaml` 成 `config.yaml`:
将 [examples/quickstart.yaml](https://raw.githubusercontent.com/devstream-io/devstream/main/examples/quickstart.yaml) 和 [examples/tools-quickstart.yaml](https://raw.githubusercontent.com/devstream-io/devstream/main/examples/tools-quickstart.yaml) 文件下载到你到工作目录下,然后重命名`quickstart.yaml` 成 `config.yaml`:

```shell
cp examples/quickstart.yaml config.yaml
cp examples/tools-quickstart.yaml tools-quickstart.yaml
curl -o config.yaml https://raw.githubusercontent.com/devstream-io/devstream/main/examples/quickstart.yaml
curl -o tools-quickstart.yaml https://raw.githubusercontent.com/devstream-io/devstream/main/examples/tools-quickstart.yaml
```

然后相应的修改配置文件中的内容。
Expand All @@ -31,7 +31,7 @@ sed -i.bak "s/YOUR_DOCKER_USERNAME/ironcore864/g" tools-quickstart.yaml

> 这个配置文件会使用两个插件,一个用来创建 GitHub 项目,而且初始化成一个 Golang 的 web 应用结构。接着另外一个插件会给这个项目创建对应的 GitHub Actions 工作流。

这两个插件[需要配置一个环境变量](https://www.devstream.io/docs/plugins/github-repo-scaffolding-golang) 才能工作,我们看下怎么配置:
这两个插件[需要配置一个环境变量](../plugins/github-repo-scaffolding-golang) 才能工作,我们看下怎么配置:

```shell
export GITHUB_TOKEN="YOUR_GITHUB_TOKEN_HERE"
Expand Down
22 changes: 7 additions & 15 deletions docs/tutorials/autocomplete.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,39 @@ In order to give a better experience for terminal users, we [support the Fig Aut

Unlike other auto-complete tools, [Fig](https://fig.io) is more intuitive. It brings an IDE-style experience to the terminal users. Detailed introduction see the [official website](https://fig.io/)

![](/img/docs/fig/fig-intro.gif)
![](fig/fig-intro.gif)

```{admonition} Notice
:class: warning

Temporary only supports MacOS now!
```
**Notice: Temporary only supports MacOS now!**

### Setup

See [https://fig.io](https://fig.io)

![](/img/docs/fig/fig-terminal.png)
![](fig/fig-terminal.png)

Once the installation is complete, you need to integrate the terminal you are using.

### Examples

#### Get Specified Plugin Information

![](/img/docs/fig/cmd-show-plugins.gif)
![](fig/cmd-show-plugins.gif)

#### Get Subcommand Help Information

![](/img/docs/fig/cmd-help.gif)
![](fig/cmd-help.gif)

#### Build a Specified Plugin

![](/img/docs/fig/cmd-make.gif)
![](fig/cmd-make.gif)

## Shell Autocomplete

### Bash Autocompletion

#### On Linux

```{admonition} Note
:class: note

Main reference [bash auto-completion on Linux](https://kubernetes.io/docs/tasks/tools/included/optional-kubectl-configs-bash-linux/)
```
**Note: Main reference [bash auto-completion on Linux](https://kubernetes.io/docs/tasks/tools/included/optional-kubectl-configs-bash-linux/)**

The completion script depends on `bash-completion`, So you have to install it first.

Expand Down
11 changes: 6 additions & 5 deletions docs/tutorials/best-practices/gitops.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ Download the appropriate `dtm` version for your platform from [DevStream Release

## Prepare the Config File

Copy the [gitops.yaml](https://github.com/devstream-io/devstream/blob/main/examples/gitops.yaml) and [gitops-variables.yaml](https://github.com/devstream-io/devstream/blob/main/examples/gitops-variables.yaml) to your working directory:
Copy the [gitops.yaml](../../../examples/gitops.yaml), [tools-gitops.yaml](../../../examples/tools-gitops.yaml) and [variables-gitops.yaml](../../../examples/variables-gitops.yaml) to your working directory:

```bash
curl -o config-gitops.yaml https://raw.githubusercontent.com/devstream-io/devstream/main/examples/gitops.yaml
curl -o config-gitops-variables.yaml https://raw.githubusercontent.com/devstream-io/devstream/main/examples/gitops-variables.yaml
curl -o variables-gitops.yaml https://raw.githubusercontent.com/devstream-io/devstream/main/examples/variables-gitops.yaml
curl -o tools-gitops.yaml https://raw.githubusercontent.com/devstream-io/devstream/main/examples/tools-gitops.yaml
```

Then modify the `config-gitops-variables.yaml` file accordingly.
Then modify the `variables-gitops.yaml` file accordingly.

For me I can set these variables like:

Expand Down Expand Up @@ -69,15 +70,15 @@ If you don't know how to create these two tokens, check out:
Run:

```bash
dtm init -f config-gitops.yaml --var-file=config-gitops-variables.yaml
dtm init -f config-gitops.yaml
```

## 4. Apply

Run:

```bash
dtm apply -f config-gitops.yaml --var-file=config-gitops-variables.yaml
dtm apply -f config-gitops.yaml
```

and confirm to continue, then you should see similar output to:
Expand Down
Binary file added docs/tutorials/fig/cmd-help.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorials/fig/cmd-make.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorials/fig/cmd-show-plugins.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorials/fig/fig-intro.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorials/fig/fig-terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
site_name: DevStream Docs
theme: material

site_url: https://docs.devstream.io
repo_name: devstream
repo_url: https://github.com/devstream.io/devstream
site_description: The DevStream Docs
markdown_extensions:
toc:
permalink: true
nav:
- 'quickstart_en.md'
- Tutorials:
Expand Down