EasyDocs
v1
Join our group for updates on games, products and more!
Canary Development Group
To become a contributor, help us review code, make pull requests, help write documentation, and give us ideas regularly.
About
EasyDocs is an all new plugin aimed at assisting you creating your documentation. The reason I made this is because I am a bigger fan of an integrated workflow instead of opening websites. It’s also easier to use as well, and has basically every feature a normal documentation site would. You only need to know how to structure JSON tables and that’s it! The plugin will lay the info you gave it out into a nice and viewable page. It’s small, fast, and doesn’t run in the background. Whenever you have the plugin window closed, it will not respond to any events or functions.
Why you should (maybe?) use it
I won’t go out and say that this is the plugin or anything, but here are a few reasons why you might want to use it.
-
External File Support - Allows you to link raw JSON files from the internet and use them instead of local strings.
-
Organized - The documentation format allows you to add titles for specific sections.
-
Fast - Doesn’t do anything when the window is closed, to ensure a fast studio experience on lower-end devices.
-
Code Sample Support - Supports users being able to add code samples to their documentation, which are copyable in the window.
-
Support For All Screen Sizes - The viewport is responsive and allows for some of the smallest and largest sizes.
-
Easy Format - The documentation format the plugin uses is simple to learn, and gives a big result.
How does the documentation format work?
Here’s an example of the documentation format
{
documentationBlock: {
functionName: string,
functionDescription: string?,
functionParams: {string}?,
functionReturnType: string?,
functionCodeBlock: {string}? | string?
}
sectionDivider: string?
}
-
The name of the function is required.
-
The description of the function is not required, defaults to “No description”
-
The params are optional, leaving them nil results in a “None” block which is the preferred way to declare a function without any parameters. Here’s how you use parameters:
"param_name, param_type, param_description"
. Leave the commas with their spaces. -
The return type is not required, defaults to “void”. Leaving this nil is the preferred way to declare a function that does not return anything.
-
The code block is not required, can be a string or an array of strings. A single string represents one code block, multiple in a table represents 2 or more.
Example of it in use:
{
"Package.GetLatestPackageVersionAsync",
"Returns the latest version of a package. You can also log a warning in the console if you wish, and returns the current version of the package if the data request was successful.",
{
"package, Instance, The package to check the version of, must have a `VersionNumber` and `PackageId` attribute, and the asset must have a 'Version: (number)' in its description.",
"warnIfNotLatestVersion, boolean?, An option to log a warning if the package version isn't the latest.",
"respectDebugger, boolean?, Tells the script to respect the debugger settings if the version is the latest one, automatically true."
},
"number?",
{
'local Package = script.Parent\nlocal LatestPackageVersion = CanaryEngine.GetLatestPackageVersionAsync(Package, false)\n\nprint(LatestPackageVersion)\n-- Output: 26 (example)',
"local Package = script.Parent\nlocal LatestPackageVersion = CanaryEngine.GetLatestPackageVersionAsync(Package, true)\n\n-- Local version 24, latest 26.\n-- Output: Package 'MyPackage' is not up-to-date. Available version: 26",
}
},
Conclusion
I’ve had lots of fun designing this plugin and can’t wait for feedback!
Thanks all of you,
@lolmansReturn