From e9fc5ebd0ecc4a5833583cb5eb524ff0b5fc374c Mon Sep 17 00:00:00 2001 From: Dhanu Saputra <35093673+dhanusaputra@users.noreply.github.com> Date: Sat, 25 Mar 2023 00:18:14 +0700 Subject: [PATCH] Docs: make sure shell examples can be copied (#1670) close #1656 --------- Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> --- docs/README.md | 12 ++++++------ .../docs/92-development/01-getting-started.md | 19 ++++++++++--------- docs/src/pages/faq.md | 6 +++--- .../92-development/01-getting-started.md | 19 ++++++++++--------- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/docs/README.md b/docs/README.md index fa0d44098..f1e34b2c3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,22 +4,22 @@ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern sta ### Installation -``` -$ pnpm install +```bash +pnpm install ``` ### Local Development -``` -$ pnpm start +```bash +pnpm start ``` 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 -``` -$ pnpm build +```bash +pnpm build ``` This command generates static content into the `build` directory and can be served using any static contents hosting service. diff --git a/docs/docs/92-development/01-getting-started.md b/docs/docs/92-development/01-getting-started.md index 7afe018f9..25e7194c5 100644 --- a/docs/docs/92-development/01-getting-started.md +++ b/docs/docs/92-development/01-getting-started.md @@ -133,13 +133,14 @@ Or you can open the test-file inside [VS-Code](#developing-with-vs-code) and run If you want to run a Woodpecker applications from your terminal you can use one of the following commands from the base of the Woodpecker project. They will execute Woodpecker in a similar way as described in [debugging Woodpecker](#debugging-woodpecker) without the ability to really debug it in your editor. -```bash -# start server -$ go run ./cmd/server - -# start agent -$ go run ./cmd/agent - -# execute cli command -$ go run ./cmd/cli [command] +```bash title="start server" +go run ./cmd/server +``` + +```bash title="start agent" +go run ./cmd/agent +``` + +```bash title="execute cli command" +go run ./cmd/cli [command] ``` diff --git a/docs/src/pages/faq.md b/docs/src/pages/faq.md index 51745eec8..962751051 100644 --- a/docs/src/pages/faq.md +++ b/docs/src/pages/faq.md @@ -57,8 +57,8 @@ pipeline: Get the container id using `docker ps` and copy the id from the first column. Enter the container with: `docker exec -it 1234asdf bash` (replace `1234asdf` with the docker id). Then try to clone the git repository with the commands from the failing pipeline: ```bash -$ git init -$ git remote add origin https://git.example.com/username/repo.git -$ git fetch --no-tags origin +refs/heads/branch: +git init +git remote add origin https://git.example.com/username/repo.git +git fetch --no-tags origin +refs/heads/branch: ``` (replace the url AND the branch with the correct values, use your username and password as log in values) diff --git a/docs/versioned_docs/version-0.15/92-development/01-getting-started.md b/docs/versioned_docs/version-0.15/92-development/01-getting-started.md index 61a5f94e7..df1821897 100644 --- a/docs/versioned_docs/version-0.15/92-development/01-getting-started.md +++ b/docs/versioned_docs/version-0.15/92-development/01-getting-started.md @@ -115,13 +115,14 @@ Or you can open the test-file inside [VS-Code](#developing-with-vs-code) and run If you want to run a Woodpecker applications from your terminal you can use one of the following commands from the base of the Woodpecker project. They will execute Woodpecker in a similar way as described in [debugging Woodpecker](#debugging-woodpecker) without the ability to really debug it in your editor. -```bash -# start server -$ go run ./cmd/server - -# start agent -$ go run ./cmd/agent - -# execute cli command -$ go run ./cmd/cli [command] +```bash title="start server" +go run ./cmd/server +``` + +```bash title="start agent" +go run ./cmd/agent +``` + +```bash title="execute cli command" +go run ./cmd/cli [command] ```