Reputation: 1519
I used the ex_docs package to automatically generate documentation regarding my project modules in a Phoenix Framework project.
Then with mix docs
I successfully created the doc folder at the root of the project.
However the contained files are full-fledged html files instead of templates.
How can I route to these files with the Router?
Upvotes: 2
Views: 564
Reputation: 1030
The documentation is generated as static HTML files. You can serve static files with phoenix from the priv/static
directory, copy your files from doc/
to the static directory.
You can find the configuration for the static file in your endpoint.ex
file, see plug for documentation: http://hexdocs.pm/plug/Plug.Static.html.
Upvotes: 1