rhcarvalho

rhcarvalho

Uniform Elixir Documentation Experience - ExDoc as a Server

I recently came across HexSearch and yesterday found yet another interesting thread on improving the experience of HexDocs (Introduce search across all of HexDocs · Issue #1811 · elixir-lang/ex_doc · GitHub). The latter is apparently aiming at changes at the ExDoc level, requiring documentation for a package to be regenerated to benefit from improvements.

Elixir documentation is generally top notch, specially for the most used libraries, however one of the things that I noticed with time is that the ExDoc/HexDocs experience can be quite inconsistent depending on the version of ExDoc used to build docs for a package.

That means clicking links that take you to another package may change the UI drastically, both aesthetically and functionally. Navigating to older versions of documentation for a given page has a similar effect.

There are advantages to having the documentation built once and never changing for a given release, but there are advantages to having a single “ExDoc server” that can render documentation for arbitrary versions of arbitrary packages, too.

Has this server model been explored in public earlier? I haven’t found any references yet.

I am not really familiar with how ExDoc works and how easy/compatible would it be for a recent version of ExDoc to render docs for arbitrarily old packages – but does that sound plausible and worth investigating further?

In broad lines, I’m thinking a server that would be able to take a Hex package (or perhaps even a Git repo), generate documentation, cache it and serve that. Any updates to the server functionality and design would apply to all pages consistently.

Most Liked

christhekeele

christhekeele

Not without messing with dependencies, exactly—the compiled BEAM code by necessity includes the compiled dependencies, if you have access to a completely compiled BEAM project by definition you’ve got the deps in there.

As far as ex_doc supporting being pointed to a folder with precompiled BEAM deps, I don’t know if it has an API for that. I would be surprised, as it’s optimized for the library owner’s developer experience, but you may be able to muck around with internals!

Even if it does support that, I would suggest the full-build solution anyhow; remember that ex_doc does not JUST look at the compiled code, but also the project’s mix/rebar configuration for extra pages, module groups, etc; to build the resulting site. Mix/Rebar build metadata like that don’t end up in the compiled release, so you don’t have enough artifacts to re-generate a full ex_doc site for a library just from precompiled files alone.

Where Next?

Popular in Discussions Top

sashaafm
I’m trying to evaluate the best combo/stack for a BEAM Web app. Right now I’m exploring Yaws a bit, after having dealt with Phoenix for a...
New
Rustixir
Hi everyone, im working on find best language/framework/system for high concurrency, high performance and stable performance after wor...
New
cvkmohan
The upcoming Phoenix 1.6 release looks very interesting. Became a habit to watch the commits - and - what they are bringing in. phx.gen...
New
New
MarioFlach
Hello, I want to share a project I’ve been working on for a while: https://github.com/almightycouch/gitgud Background Some time ago I ...
New
Fl4m3Ph03n1x
Background This question comes mainly from my ignorance. Today is Black Friday, one of my favorite days of the year to buy books. One boo...
New
chuck
Let me start by stating an assumption: Phoenix is a great approach to building REST APIs. There are many reasons for this, but I will ass...
New
arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New
ejpcmac
I have discovered Nix last month and I am currently on my way to migrating to it—both on macOS at home and the full NixOS distrubution at...
New
ben-pr-p
In general I’ve been sticking to this community style guide GitHub - christopheradams/elixir_style_guide: A community driven style guide ...
New

Other popular topics Top

Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52341 488
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 126479 1222
New

We're in Beta

About us Mission Statement