pxp9
Is there a way of deactivate `Pheonix.Liveview.Component.attr` documentation generation?
attr :rest, :global
slot :inner_block
def navbar(assigns) do
assigns = join_classes_with_rest(assigns, ["navbar"])
~H"""
<div {@rest}>
{render_slot(@inner_block)}
</div>
"""
end
I got this Liveview component and this documentation is being generated by default
iex(4)> Code.fetch_docs(DaisyUIComponents.Navbar)
{:docs_v1, 2, :elixir, "text/markdown",
%{"en" => "Navbar component\n\nhttps://daisyui.com/components/navbar/\n\n\n"},
%{},
[
{{:function, :__components__, 0}, [generated: true, location: 1],
["__components__()"], :hidden, %{}},
{{:function, :navbar, 1}, [generated: true, location: 15],
["navbar(assigns)"],
%{
"en" => "## Attributes\n\n* Global attributes are accepted.\n## Slots\n\n* `inner_block`\n"
}, %{}},
Is there a way to deactivate this documentation generation ?
First Post!
sodapopcan
I’m super curious to know what your use-case is here… do you just don’t want them showing up in ex_do? …do you want it completely out of the release? For releases, docs are stripped by default. If you don’t want them showing up in ex_doc you can add @doc false to the function. It’s possible neither of these are what you’re looking for, though.
Last Post!
pxp9
Hello, the use case is because I want to generate it by myself with my library lazy_doc but my library detects if a function is not documented via Code.fetch_docs and the Liveview docs seems they are generated at compile time via attr and slot Macros.
So when I execute lazy_doc the file is already compiled with the Liveview docs so my library does not detect them as something to be generated.
@doc false is not a solution because my library also thinks when you encounter a @doc false you want hidden documentation so my library does not touch it.
Btw if you are curious, you can check my blog post about the library in my blog.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex










