-
Notifications
You must be signed in to change notification settings - Fork 580
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a70a8d1
Showing
5 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Node rules: | ||
## Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
## Dependency directory | ||
## Commenting this out is preferred by some people, see | ||
## https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git | ||
node_modules | ||
|
||
# Book build output | ||
_book | ||
|
||
# eBook build output | ||
*.epub | ||
*.mobi | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# My Awesome API | ||
|
||
This file file serves as your book's preface, a great place to describe your book's content and ideas. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Summary | ||
|
||
## Overview | ||
|
||
* [My Awesome API](README.md) | ||
|
||
## Methods | ||
|
||
* [Defining Methods](methods.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"plugins": [ "theme-api" ], | ||
"pluginsConfig": { | ||
"theme-api": { | ||
"languages": [ | ||
{ | ||
"lang": "js", | ||
"name": "JavaScript", | ||
"default": true | ||
}, | ||
{ | ||
"lang": "go", | ||
"name": "Go" | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Defining Methods | ||
|
||
Methods allow you to smoothly display code examples in different languages. | ||
|
||
{% method %} | ||
## My first method | ||
|
||
My first method exposes how to print a message in JavaScript and Go. | ||
|
||
{% sample lang="js" %} | ||
Here is how to print a message to `stdout` using JavaScript. | ||
|
||
```js | ||
console.log('My first method'); | ||
``` | ||
|
||
{% sample lang="go" %} | ||
Here is how to print a message to `stdout` using Go. | ||
|
||
```go | ||
fmt.Println("My first method") | ||
``` | ||
|
||
{% common %} | ||
Whatever language you are using, the result will be the same. | ||
|
||
```bash | ||
$ My first method | ||
``` | ||
{% endmethod %} |