Commit Graph

25 Commits

Author SHA1 Message Date
Aire-One 6b97ec3307 doc(ltp) Change author mention 2021-06-14 17:03:26 +02:00
Aire-One 9807ccd5e0
fix(ldoc.ltp): extra-header tag arrangement (#3318) 2021-04-05 09:42:15 -07:00
Emmanuel Lepage Vallee 25f4cfcb05 doc(ltp): Implement module `extra-header` section
Co-authored-by: Lucas Schwiderski <lucas@lschwiderski.de>
Co-authored-by: Aire-One <Aire-One@users.noreply.github.com>
2021-04-02 20:00:46 +02:00
Aire-One bc8a5b0230 fix(ldoc.ltp): item.inherited can be wrongly true
For some even more strange reasons than commit 047729ae1, it seems
we can also have the error that `item.inherited` can be sets to `true`
on items that are not inherited...

I just had this issue with `wibox.widget.imagebox` where properties
were marked as inherited from `wibox.widget.imagebox`. Best way to fix
it is to only trust the check on `item.baseclass`, and completly
dismiss its `inherited` property.
2021-04-02 19:24:07 +02:00
Aire-One af3b194a31 doc(@hidden;ldoc.ltp): Add ldoc tag to hide item
Add a new ldoc tag `@hidden`. This tag allows us to keep documentation
for magic methods (e.g. `wibox.widget.base:get_visible`) but prevent
it from being part of the documentation used by final users.
2021-04-02 19:24:07 +02:00
Aire-One 5baa1c97cd fix(ldoc.ltp): Identify inherited items by name 2021-04-02 19:24:07 +02:00
Aire-One 93e9361280 fix(ldoc.ltp): item.inherited can be wrongly false
For some reasons, sometime `item.inherited` is `false` even if the
item was added to the `all_module_kinds` table by the "hierarchy
lookup" for-loop, and we already force the `inherited` property to be
sets to `true` at this moment.

With this commit, we add a second fail-check condition based on the
`item.baseclass` property to determine if the item is inherited or not
when we do the render.
2021-04-02 19:24:07 +02:00
Aire-One b82d2a690f doc(@supermodule;ldoc.ltp): Find inherited members
This commit uses the `@supermodule` tag to recursively find all the
properties from supermodules and add them to the current module
documentation.
2021-04-02 19:24:07 +02:00
Aire-One 4dd689f181 doc(@supermodule;ldoc.ltp): Draw hierarchy tree
This commit adds a new ldoc custom tag `@supermodule`. It has to be
used at the module level. It should refer to the module
supermodules.

This tag can be used multiple time by the same module, but we ignore
other calls (for now?) as (AFAIK) we only use one way inheritance.

This tag is used in the ldoc template to find modules hierarchy and
draw the inheritance tree. It makes it easy to find and navigate to
parents modules.
2021-04-02 19:24:07 +02:00
Emmanuel Lepage Vallee d408ec7846 doc: Use a more compact rendering for method return types. 2020-02-29 21:17:27 -05:00
Emmanuel Lepage Vallee 5f9bd77bd9 doc: Do not add parentheses arpund property types.
They provide no value.
2020-02-29 21:17:27 -05:00
Emmanuel Lepage-Vallee 74ba84b299 doc: Make use of the @classsignal tag.
It wasn't doing anything until now.
2020-01-19 20:30:06 -05:00
Emmanuel Lepage Vallee ec7cac5dbf doc: Add a summary next to the property/method title. 2019-11-29 01:26:25 -05:00
Aire-One 46c86351a0 Add ldoc tags for inherited members.
* Add `@inheritedproperty`, `@inheritedmethod` and `@inheritedsignal` ldoc tags to specify inherited members in the documentation,
* These new tags create their own section in the rendered documentation,
* Implemente these tags for `docs/common/object.ldoc` and `docs/common/widget.ldoc`.
2019-11-29 01:26:25 -05:00
Emmanuel Lepage Vallee a3a2fc1344 doc: Hide the newly auto-generated content by default.
First of all, yes, JavaScript in the doc. I don't like this either.

The reason is that the new sections are super useful *when you need
them*. However, in practice, that's rare. So better not make the
signal to noise ratio worst. Future commit will introduce an
auto-generated summary of what's hidden.
2019-11-27 01:44:23 -05:00
Aire-One bc35da73ac Implement inheritance into ldoc template.
This use the new `@baseclass` and `@inherited` tags to add inheritance data to the rendered documentation.
2019-11-27 01:43:07 -05:00
Emmanuel Lepage Vallee 4102e6a503 doc: Update the template to render sub-tags.
Sub-tags are a new concept and is equivalent to @tparam, but in
a generic form.
2019-11-27 01:43:07 -05:00
Emmanuel Lepage Vallee 4dbc83fa7d doc: Modify the template to allow merging sections.
It might not be the most pretty of change, but it works. With this
change, it is possible to have multiple "things" in the "same"
section having the "same" name.

This allows for C/C++ style functions with the same name but different
signatures. Lua doesn't handle this well, so it should usually be
avoided. However, constructors might be a valid exception. Most older
widget (and object) constructors have multiple random argument while
newer one use `args`. Deprecating the old ones for the sake of
standardization might be a bit too much for users upgrading from v3.5.

Given the only reason all of those deprecation would happen is because
"its pretty that way", then lets allow 2 constructors and avoid outrage.
2019-11-03 01:28:29 -05:00
Emmanuel Lepage Vallee 8038f8124e doc: Do not mix spaces and tabs for indentation in the generated HTML. 2019-07-09 17:00:20 -04:00
Emmanuel Lepage Vallee 7cba838067 doc: Prevent ldoc from generating URLs with spaces.
For dubious reasons, ldoc uses the human readable name for the URLs
instead of the machine readable one. If the name has multiple words,
this causes the URLs to have spaces or %20 in them.

This commits remove all spaces from the "kinds" and then use `:gsub()`
in the template to convert underscores to spaces.

**WARNING** This breaks all URLs again. But this is necessary to prevent
broken links when the user paste them with spaces instead of %20.
2019-07-09 16:28:42 -04:00
Emmanuel Lepage Vallée f459296747
doc: Fix index links. (#2803)
Fixes #2797
2019-06-28 09:34:32 -04:00
Emmanuel Lepage Vallee 12a7236e2b doc: Add support for property types to ldoc.
Rather that abusing of how the arguments are displayed to convey the
type, add native support.

It still uses the @param for the doc, so this doesn't cause a million
little noisy changes, but the rendered HTML now have a real section for
the type. This is added to both the summary and the expanded description.

Additionally, if the type has a description string, a second is added.
2019-06-08 18:14:14 -04:00
Emmanuel Lepage Vallee 43799aec02 doc: Hardcode the header instead of using "machine readable".
"classmod" is not useful for a humain.
2019-06-08 18:14:14 -04:00
Daniel Hahler aae9b25457 ldoc.ltp: improve HTML title 2019-01-04 22:39:28 +01:00
Daniel Hahler 6792415cef ldoc: prepare for custom ldoc.ltp
ldoc.ltp is copied from ldoc (ldoc/html/ldoc_ltp.lua).
2019-01-04 22:39:28 +01:00