# Create documentation locally for unregistered package

**URL:** <https://discourse.julialang.org/t/create-documentation-locally-for-unregistered-package/5630>\
**Category:** General Usage\
**Created:** [August 30, 2017, 2:45pm UTC](https://discourse.julialang.org/t/create-documentation-locally-for-unregistered-package/5630 "2017-08-30T14:45:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![henrykironde](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrykironde/32/6307_2.png) [@henrykironde](https://discourse.julialang.org/u/henrykironde)\
**Post date:** [August 30, 2017, 2:45pm UTC](https://discourse.julialang.org/t/create-documentation-locally-for-unregistered-package/5630/1 "2017-08-30T14:45:21Z")

</div>

What could I be doing wrong or still missing in setting up docs . I still cant get the docstrings fetched from source. [https://github.com/henrykironde/Retriever.jl/blob/docs/docs/make.jl](https://github.com/henrykironde/Retriever.jl/blob/docs/docs/make.jl)

When I Run Julia make.jl i get the documentation from the .md files, but I don’t get the documentation from the source code.

---

<div class="post-metadata">

**Author:** ![christopher-dG](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher-dg/32/7387_2.png) [@christopher-dG](https://discourse.julialang.org/u/christopher-dG)\
**Post date:** [August 30, 2017, 3:27pm UTC](https://discourse.julialang.org/t/create-documentation-locally-for-unregistered-package/5630/2 "2017-08-30T15:27:16Z")

</div>

You need to use the `@docs` macro in documentation pages referred to by `pages`, see [here](https://raw.githubusercontent.com/invenia/PkgTemplates.jl/master/docs/src/pages/licenses.md) for an example and its [results](https://invenia.github.io/PkgTemplates.jl/stable/pages/licenses.html).

The [Documenter.jl guide](https://juliadocs.github.io/Documenter.jl/stable/man/guide/) contains tons of info and usages.

---

<div class="post-metadata">

**Author:** ![henrykironde](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrykironde/32/6307_2.png) [@henrykironde](https://discourse.julialang.org/u/henrykironde)\
**Post date:** [August 30, 2017, 8:39pm UTC](https://discourse.julialang.org/t/create-documentation-locally-for-unregistered-package/5630/3 "2017-08-30T20:39:29Z")

</div>

Thank you @christopher-dG, I have done that but I still fail to get the documentations locally.

[Branch](https://github.com/henrykironde/Retriever.jl/tree/test-doc)

---

<div class="post-metadata">

**Author:** ![christopher-dG](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher-dg/32/7387_2.png) [@christopher-dG](https://discourse.julialang.org/u/christopher-dG)\
**Post date:** [August 30, 2017, 9:13pm UTC](https://discourse.julialang.org/t/create-documentation-locally-for-unregistered-package/5630/4 "2017-08-30T21:13:43Z")

</div>

I cloned and built the docs myself, and found that docstrings for `Retriever` and `bar` failed, while `Retriever.bar` worked.

- There is no docstring for the `Retriever` module so ```@docs Retriever``` is not going to do anything
- Documenter searches the main module by default, so ```@docs bar``` is not going to work
  - You can get around this however:

````julia
```@meta
CurrentModule = Retriever
-```

````

(Ignore the `-` on the last line)

- `@docs Retriever.bar` works for reasons outlined above, but will not work if you apply the `CurrentModule` fix.

---

<div class="post-metadata">

**Author:** ![henrykironde](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrykironde/32/6307_2.png) [@henrykironde](https://discourse.julialang.org/u/henrykironde)\
**Post date:** [August 30, 2017, 9:50pm UTC](https://discourse.julialang.org/t/create-documentation-locally-for-unregistered-package/5630/5 "2017-08-30T21:50:44Z")

</div>

@christopher-dG, thanks for the guidance, could you please give me a PR to that Branch I would really appreciate.
