Anaminus / rbxmk

A tool for processing Roblox files.
MIT License
109 stars 11 forks source link

The documentation situation #69

Open Anaminus opened 2 years ago

Anaminus commented 2 years ago

This issue tracks the progress of the current chaotic state of documentation for rbxmk.

Program

Documentation from within the program is currently expressed through "fragments", which are snippets of content embedded into the executable. They currently live here:

https://github.com/Anaminus/rbxmk/tree/imperative/fragments

Work here is still very much in progress. Further iteration is on-hold while the documentation website is developed.

Website

A work-in-progress website for documentation currently lives here:

https://anaminus.github.io/RBXMK_DOC_TEMPORARY_DO_NOT_USE_OR_YOU_WILL_BE_FIRED/

Unified theory

Currently, the program and website source their content separately, even though they contain mostly the same information. It would be much better if a single, unified source were used instead. For now, they will continue to be worked on separately until a common system emerges.

Working draft

Several inputs are provided by the user. The combination of these inputs determine the strategy used to generate the output. Some examples:

Query Output Format Result
CFrame type File HTML An HTML file with a self-contained description of CFrame the type.
Empty Directory HTML A complete multi-paged cross-linked HTML website generated under the specified directory.
Empty File HTML An entire website with all information contained within one file.
math library Unspecified Terminal A description of the math library, printed to stdout in a format suitable for the terminal.
Empty Directory Raw The raw content of all fragments are dumped to the specified directory.

In the last example, the raw content is dumped. This can be passed to a "translator" that converts the content into a format suitable for a documentation site. Because there are an endless number of ways to produce a website, the translator lives next to the website instead of near or within rbxmk.

The current documentation website is a static site generated by Hugo with the Shadocs theme. The translator is a program that receives the raw content from rbxmk and formats it for this configuration of static-site generator and theme.

For fun, here's a graph: fragment-workflow

Anaminus commented 2 years ago

After resolving a query into a fragment reference, an option specifies whether to return that reference directly. This is useful for converting a query to a canonical form.