Moonreader - Yet another documentation generator

Moonreader

Totally original name. Yet another documentation generator for Studio. See alternatives for other options that are available.

Asset Link: https://create.roblox.com/store/asset/16621522261
Repository Link: https://github.com/PhantomShift/moonreader

Inspired by Moonwave, Moonreader is a similar tool that generates documentation from the comments within your source code. The aim is to be a supplementary tool for those who work in both Studio and external editors a lot, and can also serve as a sort of “preview” for any documentation you plan on generating through Moonwave, though you can also just use Moonreader by itself if it’s all you need.

Moonreader aims to be generally compliant with Moonwave’s commenting syntax and support most (if not all) of its tags. See src/Parser.lua for the general state of how many tags are implemented.

Usage

For a general overview of the valid syntax for doc comments, take a look at Moonwave and its documentation.

Moonreader will automatically generate documentation from all of the source containers in the place by default. This documentation can be viewed by selecting “Open Docs” from Moonreader’s plugin toolbar.

A smaller searchable version of the documentation containing only function definitions can be viewed by selecting “Quick Search”. Function definitions can be jumped to by clicking on the icon next to the function name.

As of now, the only setting to change is which paths to ignore, which can be viewed and edited by selecting “Open Settings”.

To regenerate the documentation, either after editing some source code or changing some settings, select “Generate Docs”.

There are bindable actions to open Quick Search and to search within the documentation itself. (File > Advanced > Customize Shortcuts...)

What’s with all the if game then require(...) else require("...")?

If at all possible, I’d like to keep the dependencies I’m writing “native luau compatible”,
meaning that they can work regardless of whether it’s in studio or in cli (like in a runner such as lune).
Realistically I probably won’t ever be using these outside of this plugin (except for maybe IterTools), but it has the big benefit of letting me test outside of studio (particularly with all the string manipulation that’s happening that doesn’t necessitate testing in Studio).

Acknowledgements

Moonreader is made possible by the brilliant projects and resources provided by these people

Alternatives

Screenshots

5 Likes

Update 3/12/24

Changes Since Initial Release

Fixed dashed comments (---) not being processed properly.

Added a button within the documentation viewer to open the search function (more convenient for those who don’t want to set the shortcut).

Case-sensitive search now works for searching in documentation.

Added ability to change some of the visual settings of the markdown processor.

The plugin has been updated to reflect these changes.

All changes since last update: Comparing ec50727...eefb122 · PhantomShift/moonreader · GitHub

3 Likes