feat: add category metadata to doc pages and switch code blocks to dart syntax

Add `^category` front matter to all language, types, and reference doc pages for site navigation restructuring. Replace `:::wren` and `:::java` code block annotations with `:::dart` across multiple files. Create new stub pages for core-libraries, embedding-api, and contributing under the reference category. Remove the old embedding and getting-involved stub pages.
This commit is contained in:
Bob Nystrom
2014-04-15 04:23:46 +00:00
parent 10b19d969b
commit 6ed15da597
24 changed files with 341 additions and 175 deletions
+2
View File
@@ -1,4 +1,5 @@
^title Functions
^category types
No self-respecting language today can get by without functions—first class little bundles of code. Since Wren is object-oriented, most of your code will live in methods on classes, but free-floating functions are still useful.
@@ -41,6 +42,7 @@ Of course, you don't *have* to use a block argument to pass a function to a meth
Block arguments are purely sugar for creating a function and passing it in one little blob of syntax. There are some times when you want to create a function but *don't* need to pass it to a method. For that, you can call the `Fn` class's constructor:
:::dart
var someFn = new Fn {
IO.print("Hi!")
}