Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixes to the explore docs #953

Merged
merged 3 commits into from
Jan 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -699,34 +699,20 @@ and execute it:
<!-- livebook:{"force_markdown":true} -->

```elixir
IO.puts node()
IO.puts Node.get_cookie()
IO.inspect node()
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
chriskdon marked this conversation as resolved.
Show resolved Hide resolved
node_input = Kino.Input.text("Other node")
other_node = :"name-of-the@other-node"
other_cookie = :"value-of-the-other-cookie"
```

```elixir
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:
With both variables defined, let's connect to the other node with the given cookie:

```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.connect(other_node)
```
Expand Down
2 changes: 1 addition & 1 deletion lib/livebook/notebook/explore/kino/chat_app.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Mix.install([

## 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
tables, frames, and more. In particular, we learned how to use
inputs to capture values directly into our notebooks:
Expand Down