# Hyperlink to Pluto notebook

**URL:** https://discourse.julialang.org/t/hyperlink-to-pluto-notebook/69818
**Category:** General Usage
**Tags:** pluto, pluto-markdown
**Created:** [October 15, 2021, 11:07am UTC](https://discourse.julialang.org/t/hyperlink-to-pluto-notebook/69818 "2021-10-15T11:07:00Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [October 15, 2021, 11:07am UTC](https://discourse.julialang.org/t/hyperlink-to-pluto-notebook/69818/1 "2021-10-15T11:07:00Z")

</div>

Hi all,

In Jupyter, it is possible to link one notebook to another using relative paths. However, this does not appear to work with Pluto. Here is what I tried:

```julia
md"""
# [my link]("my_notebook.jl")
"""

```

The linked page said “not found”.

How can I link to another notebook?

---

<div class="post-metadata">

### Author: ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)
#### Post date: [October 15, 2021, 1:23pm UTC](https://discourse.julialang.org/t/hyperlink-to-pluto-notebook/69818/2 "2021-10-15T13:23:02Z")

</div>

you can do

```julia
md"""
[my_link](./open?path=my_notebook.jl)
"""

```

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [October 15, 2021, 3:43pm UTC](https://discourse.julialang.org/t/hyperlink-to-pluto-notebook/69818/3 "2021-10-15T15:43:11Z")

</div>

> [@lungben](#):
>
> `[my_link](./open?path=my_notebook.jl)`

@lungben, thank you. This is really close to what I need. I need to specify a path relative to the current working directory. Unfortunately, my attempts to modify your code did not work. Here is what I did:

```julia
path = pwd()
md"""
[my_link](./open?path=$(path)/my_notebook.jl)
"""

```

Error:  
`Please check whether /home/dfish/.julia/pluto_notebooks/$(path)/my_notebook.jl exists.`

Is there a way to interpolate the path variable? I thought that $() would work.

---

<div class="post-metadata">

### Author: ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)
#### Post date: [October 15, 2021, 4:24pm UTC](https://discourse.julialang.org/t/hyperlink-to-pluto-notebook/69818/4 "2021-10-15T16:24:14Z")

</div>

String interpolation seems not to work inside a hyperlink with the md macro.  
But you can do

```julia
notebook_path= joinpath(pwd(), "my_notebook.jl")

Markdown.parse("[my_link](./open?path=$notebook_path)")

```

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [October 15, 2021, 4:55pm UTC](https://discourse.julialang.org/t/hyperlink-to-pluto-notebook/69818/5 "2021-10-15T16:55:19Z")

</div>

> [@lungben](#):
>
> ```julia
> notebook_path= joinpath(pwd(), "my_notebook.jl")
> 
> Markdown.parse("[my_link](./open?path=$notebook_path)")
> 
> ```

Thanks @lungben. Do you know of a way to suppress Markdown.parse from printing in the markdown?

Here is what I did:

```julia
	md"""
	Click on this link
	Markdown.parse("[my_link](./open?path=$notebook_path)"). More info
	"""

```

And it outputs the following:

```julia
Click on this link Markdown.parse("my_link"). More info

```

Also the link does not work. The link does work if I use Markdown.parse by itself in a separate cell.

---

<div class="post-metadata">

### Author: ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)
#### Post date: [October 15, 2021, 5:03pm UTC](https://discourse.julialang.org/t/hyperlink-to-pluto-notebook/69818/6 "2021-10-15T17:03:54Z")

</div>

Write `Markdown.parse()` as Julia code, not in a `md""` string block.

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [October 15, 2021, 5:11pm UTC](https://discourse.julialang.org/t/hyperlink-to-pluto-notebook/69818/7 "2021-10-15T17:11:39Z")

</div>

I was hoping to integrate the link into some text. Is that not possible?

---

<div class="post-metadata">

### Author: ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)
#### Post date: [October 15, 2021, 5:45pm UTC](https://discourse.julialang.org/t/hyperlink-to-pluto-notebook/69818/8 "2021-10-15T17:45:34Z")

</div>

You can put your whole text inside of `Markdown.parse()`. It essentially does the same as the `md` string macro (in fact, `md` internally calls `Markdown.parse()`), except that it takes a “normal” string as input, where interpolation works slightly different than in the `md` string macro.

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [October 15, 2021, 11:42pm UTC](https://discourse.julialang.org/t/hyperlink-to-pluto-notebook/69818/9 "2021-10-15T23:42:14Z")

</div>

Ah. I understand now. Thank you for your help!
