Small fixes to the explore docs (#953)

* Fix Intro to Kino link in chat_app.livemd

* Install Kino before usage in distributed portals exploration
This commit is contained in:
Chris Kellendonk 2022-01-29 13:23:18 -05:00 committed by GitHub
parent b1b573b5f4
commit 6bae9f3d93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 21 deletions

View file

@ -699,34 +699,20 @@ and execute it:
<!-- livebook:{"force_markdown":true} --> <!-- livebook:{"force_markdown":true} -->
```elixir ```elixir
IO.puts node() IO.inspect node()
IO.puts Node.get_cookie() IO.inspect Node.get_cookie()
``` ```
Now paste the result of the other node name and its cookie in the inputs below: Now paste the result of the other node name and its cookie in the variables below:
```elixir ```elixir
node_input = Kino.Input.text("Other node") other_node = :"name-of-the@other-node"
other_cookie = :"value-of-the-other-cookie"
``` ```
```elixir With both variables defined, let's connect to the other node with the given cookie:
cookie_input = Kino.Input.text("Other cookie")
```
And now execute the code cell below, which will read the inputs, configure the
cookie, and connect to the other notebook:
```elixir ```elixir
other_node =
node_input
|> Kino.Input.read()
|> String.to_atom()
other_cookie =
cookie_input
|> Kino.Input.read()
|> String.to_atom()
Node.set_cookie(other_node, other_cookie) Node.set_cookie(other_node, other_cookie)
Node.connect(other_node) Node.connect(other_node)
``` ```

View file

@ -14,7 +14,7 @@ Mix.install([
## Kino.Control ## Kino.Control
In our [introduction to Kino](/explore/notebooks/intro_to_kino), In our [introduction to Kino](/explore/notebooks/intro-to-kino),
we learned about inputs and several different outputs, such as we learned about inputs and several different outputs, such as
tables, frames, and more. In particular, we learned how to use tables, frames, and more. In particular, we learned how to use
inputs to capture values directly into our notebooks: inputs to capture values directly into our notebooks: