Skip to content

Commit

Permalink
fix some code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
natefinch committed Sep 19, 2018
1 parent a9a0e40 commit 4a81047
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
7 changes: 4 additions & 3 deletions site/content/blog/mage-in-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ mage targets in the current directory.

This will download the mage source and install it (if you're using a gopath):

```
```plain
go get -d github.com/magefile/mage
go run $GOPATH/src/github.com/magefile/mage/bootstrap.go install
```

If you're using go modules, you can do it with good old git clone:

```
```plain
git clone git@github.com:magefile/mage
go run ./mage/bootstrap.go install
cd mage
go run bootstrap.go install
```

Note that in the second case, the binary will be copied to where go env GOPATH
Expand Down
4 changes: 2 additions & 2 deletions site/content/dependencies/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Mage supports a makefile-style tree of dependencies using the helper library
[github.com/magefile/mage/mg](https://godoc.org/github.com/magefile/mage/mg). To
declare dependencies, pass any number of dependent functions of the following
types:
```
```go
func()
func() error
func(ctx context.Context)
Expand Down Expand Up @@ -62,7 +62,7 @@ func h() {

Running `mage build` will produce the following output:

```
```plain
h running
g running
f running
Expand Down
6 changes: 3 additions & 3 deletions site/content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ and above (possibly even lower versions, but they're not regularly tested).

Install mage by running

```
```plain
go get -u -d github.com/magefile/mage
cd $GOPATH/src/github.com/magefile/mage
go run bootstrap.go
Expand Down Expand Up @@ -50,7 +50,7 @@ import whatever libraries you want. Every library in the go ecosystem is a mage
plugin. Every tool you use with Go can be used with Magefiles.

## Usage
```
```plain
mage [options] [target]
Mage is a make-like command runner. See https://magefile.org for full docs.
Expand Down Expand Up @@ -98,7 +98,7 @@ the mage execution runtime and the tasks compiled in such that it can be run on
without requiring installation of dependencies. To do so, pass the output path to the compile flag.
like this:

```
```plain
$ mage -compile ./static-output
```

Expand Down
4 changes: 2 additions & 2 deletions site/content/magefiles/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func Build(ctx context.Context) {

```

```
```plain
$ mage -l
A comment on the package will be output when you list the targets of a
magefile.
Expand All @@ -82,7 +82,7 @@ Targets:
* default target
```

```
```plain
$ mage -h target
mage target:
Expand Down
10 changes: 5 additions & 5 deletions site/content/targets/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title = "Targets"
weight = 10
+++
A target is any exported function that is one of the following types:
```
```go
func()
func() error
func(context.Context)
Expand Down Expand Up @@ -53,7 +53,7 @@ it to.

Target aliases can be specified using the following notation:

```
```go
var Aliases = map[string]interface{} {
"i": Install,
"build": Install,
Expand All @@ -71,7 +71,7 @@ normal application. To define a namespace in your magefile, simply define an
exported named type of type `mg.Namespace`. Then, every method on that type which
matches the normal target signature becomes a target under that namespace.

```
```go
import "github.com/magefile/mage/mg"

type Build mg.Namespace
Expand All @@ -88,13 +88,13 @@ func (Build) Docs() {}
To call a namespaced target, type it as `namespace:target`. For example, the
above would be called by typing

```
```plain
$ mage build:site
```

Similarly, the help for the target will show how it may be called:

```
```plain
$ mage -l
build:docs Builds the pdf docs.
Expand Down
2 changes: 1 addition & 1 deletion site/content/zeroInstall/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ the mage execution runtime and the tasks compiled in such that it can be run on
without requiring installation of dependencies. To do so, pass the output path to the compile flag.
like this:

```
```plain
$ mage -compile ./static-output
```

0 comments on commit 4a81047

Please sign in to comment.