# Newbie questions concerning Documenter.jl usage: @example & link to source code

**URL:** https://discourse.julialang.org/t/newbie-questions-concerning-documenter-jl-usage-example-link-to-source-code/8434
**Category:** New to Julia
**Created:** [January 17, 2018, 12:09pm UTC](https://discourse.julialang.org/t/newbie-questions-concerning-documenter-jl-usage-example-link-to-source-code/8434 "2018-01-17T12:09:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Vincent\_Picaud](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vincent_picaud/32/3108_2.png) [@Vincent\_Picaud](https://discourse.julialang.org/u/Vincent_Picaud)
#### Post date: [January 17, 2018, 12:09pm UTC](https://discourse.julialang.org/t/newbie-questions-concerning-documenter-jl-usage-example-link-to-source-code/8434/1 "2018-01-17T12:09:56Z")

</div>

I trying to document some Julia code and I am struggling with these two problems:

**Question 1:**

Is it possible to use `@example` direclty in **my code.jl Julia source code files:**?

````
"""
          foo()

 Some doc

 ```@example
   a = 1
 ```
"""
foo() = ...

````

→ when I do that `a = 1` is **verbatim** copied in my html page but not executed (no result in the html page)

Note that when I define the `@example` in my index.md it works properly → code is executed and both code and result are shown in the generated html page.

Please also note that `jldoctest` is working as expected, both in source code.jl file and index.md file

So my question is: is it possible to define `@example` code blocks directly in the Julia source code documentation (I expect these blocks to be executed and their results to be shown in the html pages) ?

**Question 2:**

In the official Julia documentation there is a **source** link directly pointing to the documented item source code (the .jl files). What is the setup to reproduce that?

thanks!
