File tree 5 files changed +76
-0
lines changed
5 files changed +76
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Node rules:
2
+ # # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
3
+ .grunt
4
+
5
+ # # Dependency directory
6
+ # # Commenting this out is preferred by some people, see
7
+ # # https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git
8
+ node_modules
9
+
10
+ # Book build output
11
+ _book
12
+
13
+ # eBook build output
14
+ * .epub
15
+ * .mobi
16
+ * .pdf
Original file line number Diff line number Diff line change
1
+ # My Awesome API
2
+
3
+ This file file serves as your book's preface, a great place to describe your book's content and ideas.
Original file line number Diff line number Diff line change
1
+ # Summary
2
+
3
+ ## Overview
4
+
5
+ * [ My Awesome API] ( README.md )
6
+
7
+ ## Methods
8
+
9
+ * [ Defining Methods] ( methods.md )
Original file line number Diff line number Diff line change
1
+ {
2
+ "plugins" : [ " theme-api" ],
3
+ "pluginsConfig" : {
4
+ "theme-api" : {
5
+ "languages" : [
6
+ {
7
+ "lang" : " js" ,
8
+ "name" : " JavaScript" ,
9
+ "default" : true
10
+ },
11
+ {
12
+ "lang" : " go" ,
13
+ "name" : " Go"
14
+ }
15
+ ]
16
+ }
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ # Defining Methods
2
+
3
+ Methods allow you to smoothly display code examples in different languages.
4
+
5
+ {% method %}
6
+ ## My first method
7
+
8
+ My first method exposes how to print a message in JavaScript and Go.
9
+
10
+ {% sample lang="js" %}
11
+ Here is how to print a message to ` stdout ` using JavaScript.
12
+
13
+ ``` js
14
+ console .log (' My first method' );
15
+ ```
16
+
17
+ {% sample lang="go" %}
18
+ Here is how to print a message to ` stdout ` using Go.
19
+
20
+ ``` go
21
+ fmt.Println (" My first method" )
22
+ ```
23
+
24
+ {% common %}
25
+ Whatever language you are using, the result will be the same.
26
+
27
+ ``` bash
28
+ $ My first method
29
+ ```
30
+ {% endmethod %}
You can’t perform that action at this time.
0 commit comments