EasyDocs - The simpler way to do documentation

EasyDocs

v1

Get it on Roblox Get it on GitHub

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

35 Likes

I don’t edit code in Studio, so please take it from that perspective, but this is clearly a really well-made plugin.

Documentation is important, and it’s really good to see a lot more threads focusing on it as of late. This looks like an excellent way of bringing more advanced documentation techniques directly to Roblox Studio, which is a huge plus for making these topics accessible/reducing barrier to entry for more developers.

2 Likes

This is cool. I was thinking of making an integrated Roblox Studio docs thing, but I’m busy/lazy, so if you wanna add these features that’d be great:

  • make docs searchable
  • recently viewed docs tab
  • generate markdown docs off comments in code, have them be somehow exportable to outside of studio
    ex:
--[[
Sets the weather in the world.
*Ex:*
` ` `
WeatherController.SetWeather(WeatherEnum.Rain)
` ` `
]]
function WeatherController.SetWeather(WeatherType : WeatherEnum)
  -- bla bla bla
  return true
end

might turn into:


function WeatherController.SetWeather(WeatherType : WeatherEnum) → Boolean

Sets the weather in the world.
Ex:

WeatherController.SetWeather(WeatherEnum.Rain)

3 Likes

Was going to add this at first, but I am not the best at this kind of string stuff. I’ll try to learn, and definitely implement the other two features. The only bug I have right now is that @boatbomber’s syntax highlighter is sort of broken.

1 Like

This is a good idea, but I’m confused, in the video you provided, you were selecting the folder for CanaryEngine and it works fine, when I do so, it doesn’t work as expected

image

How do I fix this?

50/69?

1 Like

Clean ui. 10/10.

But if you are making a package thats pretty large, Moonwave will suit more for you.

2 Likes

You probably didn’t update CanaryEngine. Check if it has a ScriptDocsURL attribute.

I checked and there isn’t, this is the properties (Ignore that it’s in workspace) and It appears that it last updated at March 25th 2023

image

1 Like

Oh, you have to get the plugin. I migrated to that a while ago, check the post for more info.

Looks very good.
A small qol suggestion:
Add multiline string support, it just is better to look at than a one line string.

This looks amazing, well done! For sure will be using this in the future!

1 Like

You can already do multiline by using \n

I know that, I mean proper multi line strings. It’s just better to look at when you write docs.

Ever since I started scripting using OOP I have been wanting something like this. I thought I could do it with Github easily but I cant figure it out / cant do it. This is exactly what I was looking for. If I had money I would pay lots for this. Thank you.

1 Like

This is a cool plugins, I wanted to make something like this but you did it before! Making a website to make docs easier cool be better no? Here is an example for the plugin UI TOOLS: Theme Editor - UI Tools

1 Like

i’d like to integrate this for my notification module, however, I’m not finding how I actually integrate the metadata into the module (so it’s detected by the plugin.) am I missing something?

I’m probably going to change the format soon to support moonwave docs, so I’ll be sure to fix a few issues and add a tutorial.

2 Likes