aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/docs/skylark/cookbook.md
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2015-04-30 21:38:04 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-05-01 22:22:55 +0000
commit3fb27ca6770ba3239955ab7c37fad979d0df04e2 (patch)
tree4f0eaea74cf96950a3f87a0a6748e53d3aec8f59 /site/docs/skylark/cookbook.md
parent59682ac224651eafb52c0804159c072ff2bd43ab (diff)
Improvements to bazel.io.
* Move sidebar nav on docs and community pages to left side so that the sidebar shows at the top of the page in mobile. Improve appearance of sidebar nav. * Highlight navbar link depending on current page. * Switch Markdown renderer to Redcarpet to enable Pygments highlighting of fenced code blocks (```python etc.) such as on Skylark Cookbook page. * Change ```build to ```python on Skylark cookbook page. * Minor aesthetic tweaks to Install page * Make style of Feedburner widget consistent with rest of page. * Remove use of site_root from layouts and pages since it is no longer necessary after kchodorow@ added JS to redirect from github.google.com/bazel to bazel.io -- MOS_MIGRATED_REVID=92494349
Diffstat (limited to 'site/docs/skylark/cookbook.md')
-rw-r--r--site/docs/skylark/cookbook.md32
1 files changed, 16 insertions, 16 deletions
diff --git a/site/docs/skylark/cookbook.md b/site/docs/skylark/cookbook.md
index 4d9339fcba..b4aebf6e57 100644
--- a/site/docs/skylark/cookbook.md
+++ b/site/docs/skylark/cookbook.md
@@ -21,7 +21,7 @@ def macro(name, visibility=None):
`BUILD`:
-```build
+```python
load("/pkg/extension", "macro")
macro(name = "myrule")
@@ -53,7 +53,7 @@ def macro(name, visibility=None):
`BUILD`:
-```build
+```python
load("/pkg/extension", "macro")
macro(name = "myrule")
@@ -76,7 +76,7 @@ empty = rule(impl)
`BUILD`:
-```build
+```python
load("/pkg/empty", "empty")
empty(name = "nothing")
@@ -111,7 +111,7 @@ printer = rule(
`BUILD`:
-```build
+```python
load("/pkg/printer", "printer")
printer(
@@ -159,7 +159,7 @@ Hello
`BUILD`:
-```build
+```python
load("/pkg/size", "size")
size(
@@ -188,7 +188,7 @@ file = rule(
`BUILD`:
-```build
+```python
load("/pkg/file", "file")
file(
@@ -238,7 +238,7 @@ execute = rule(
`a.sh`:
-```shell
+```bash
#! /bin/bash
tr 'a-z' 'A-Z' < $1 > $2
@@ -246,7 +246,7 @@ tr 'a-z' 'A-Z' < $1 > $2
`BUILD`:
-```build
+```python
load("/pkg/execute", "execute")
execute(
@@ -300,7 +300,7 @@ Hello World!
`BUILD`:
-```build
+```python
load("/pkg/execute", "execute")
execute(
@@ -346,7 +346,7 @@ sum = rule(
`BUILD`:
-```build
+```python
load("/pkg/sum", "sum")
sum(
@@ -394,7 +394,7 @@ sum = rule(
`BUILD`:
-```build
+```python
load("/pkg/sum", "sum")
sum(
@@ -437,7 +437,7 @@ executable_rule = rule(
`BUILD`:
-```build
+```python
load("/pkg/extension", "executable_rule")
executable_rule(name = "my_rule")
@@ -469,7 +469,7 @@ rule_with_outputs = rule(
`BUILD`:
-```build
+```python
load("/pkg/extension", "rule_with_outputs")
rule_with_outputs(name = "my_rule")
@@ -503,7 +503,7 @@ rule_with_outputs = rule(
`BUILD`:
-```build
+```python
load("/pkg/extension", "rule_with_outputs")
rule_with_outputs(
@@ -562,7 +562,7 @@ def macro(name, cmd, input):
`BUILD`:
-```build
+```python
load("/pkg/extension", "macro")
# This creates the target :my_rule
@@ -595,7 +595,7 @@ debug = rule(implementation=impl)
`BUILD`:
-```build
+```python
load("/pkg/debug", "debug")
debug(