fceruti

fceruti

Using monospace in docs

I’m trying to add an ascii diagram to a @moduledoc, but when I generate the docs using ex_docs’s mix docs, the output doesn’t look well because of the non-monospace font it’s using.

Is there any way I can tell the docs to use a monospace font here?

      ┌──────┐
      │ User │
      └──────┘
          ◆
          │
      ┌──────────┐
      │ Settings │
      └──────────┘

Marked As Solved

lud

lud

You could use the :assets config option to provide your own CSS and use the :before_closing_head_tag to call that CSS into your docs.

See mix docs — ExDoc v0.40.3

Alternatively, as docs are rendered using markdown, you should be able to output a code block by indenting your diagram with four spaces.

Also Liked

fceruti

fceruti

Thanks, you definitely pointed me in the right direction. For anyone interested, I found this link very useful: https://medium.com/@takanori.ishikawa/customize-how-your-exdoc-documentation-looks-a10234dbb4c9

Last Post!

fceruti

fceruti

Thanks, you definitely pointed me in the right direction. For anyone interested, I found this link very useful: https://medium.com/@takanori.ishikawa/customize-how-your-exdoc-documentation-looks-a10234dbb4c9

Where Next?

Popular in Questions Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
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

We're in Beta

About us Mission Statement