Flarum API Documentation (PHP & JS)

datitisev

You can access the documentation for both the JS and PHP at https://datitisev.github.io/FlarumAPIDocs/
Right now, I have to pull, parse, render, and push the docs when changes are made to flarum/core. I'll probably add a bot soon that will automate this process.

I hope it's a useful resource for extension developers and core contributors! I'll be using it myself
I'll probably make a script to have multiple JS documentations for each version.

Note: There are some glitches with the PHP documentation. Sometimes, the dropdown will show a version selected that is different from what the url path says. That must be a Sami bug. All the bugs mostly seem to have been fixed with the new theme.

If you have feedback other than "I like it", in which case you should like this post, please post your opinions!

datitisev

UPDATE

Added better styling to version and branch list, and also to PHP & JS documentation selection, /

Removed JavaScript source files from ESDoc, each branch/version would have ~200MB of source files

datitisev

UPDATE

Changed the PHP documentation's theme to be cleaner and more Flarum-y, if you now what I mean

I used an existing theme, https://github.com/nochso/sami-theme, and customized it. I didn't push the theme to the Github repo, if someone wants to contribute to it and make it better, I'll include it.

jordanjay29

Just got to use this today. I feel like the font style/size is too thin and small within the php class lists (for example). But I find no other flaws with it.

datitisev

jordanjay29 Sorry about the late response. I forgot about you message, however I did slightly increase the font size 28 days ago in commit 04192fa

Tankerkiller125

The PHP Docs still seems to be weird... Notably, the Http section is missing quite a bit? Like there's a Flarum/Http/WebApp namespace and it's not shown at all. And the Core namespace just goes to some Core class that doesn't even seem to exist?

datitisev

Tankerkiller125 The WebApp is shown in the master documentation, but you are right. There are many weirdos bugs with Sami's versions (using branches and tags) and its actual doc content. I'll see if I can make a weird script so I change the branch/tag, and all Sami does is parse and render...

datitisev

UPDATE

Created custom script for PHP documentation as well

Most bugs with Sami having wrong version and missing classes should be resolved

There was some trouble when I accidentally created documentation for JS instead of PHP from beta.2 to beta.6. This is the status of that commit with my error: