Jump to content
  • entries
    944
  • comments
    5,899
  • views
    929,413

Documentation Revision


Josh

3,942 views

 Share

The new docs system is mostly working now:

https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetPosition

 

Features:

  • Treeview list of all tutorials and API classes and functions.
  • Alphabetical index (generated automatically from the table of contents).
  • Search (with autogenerated search index).
  • Switch back and forth between languages, with cookies to remember your preference.
  • Entire examples are automatically selected when you click on them.

Todo:

  • Table of contents doesn't yet navigate.
  • I would like to pretty-up the URLs using .htaccess rewrite rules.

 

Documentation is being loaded from XML files. I find this easier than a database, which is quite opaque to me. You can access some of the XML files being used here. MartyJ even made a cool template for the data on his site here.

 

At this point I think I can outsource the actual content creation to Upwork. This will involve copying and formatting our existing documentation into XML files, as well as updating all the examples to work by just using a main() function instead of the old App() class that we don't really need. I will be posting the job on that site soon.

  • Upvote 2
 Share

16 Comments


Recommended Comments

Will we be able to comment on the pages? Some of the pages have useful comments that help people understand what's going on.

  • Upvote 1
Link to comment

No, comments are not supported.

Will there be any way to flag content? If a user spots an error they often do not report it on the forum. Instead a flag option where you can comment could prove usefull.

  • Upvote 2
Link to comment

The good part about this being xml files we can access is we are able to pull them and make our own presentation of it. If Martyj doesn't plan on it I'd like to make a desktop version that works offline and also pulls updates when available and allows comments.

Link to comment

Will there be any way to flag content? If a user spots an error they often do not report it on the forum. Instead a flag option where you can comment could prove usefull.

No, there is no connection between this and your forum account.

Link to comment

I really like XML for storing website data. It's a lot more transparent than a MySQL database.

 

Transparent for who? Normally you'd have a web API of DB data to make it transparent for the users and so it's not much difference for us. A URL returning data is the same. If more transparent for you on your web server I can see that. I think it's probably just easier to describe something like this data outside a relational database.

 

As long as we can get the data in a nice format like this I think everyone will be happy. Opens the doors for more possibilities.

Link to comment

Transparent for who? Normally you'd have a web API of DB data to make it transparent for the users and so it's not much difference for us. A URL returning data is the same. If more transparent for you on your web server I can see that. I think it's probably just easier to describe something like this data outside a relational database.

 

As long as we can get the data in a nice format like this I think everyone will be happy. Opens the doors for more possibilities.

SQL databases...are they files? Then where is the file? I can make some funny tar.gz backups, but I don't know what's in them. They get corrupted and lost. With XML everything is right there in the FTP browser. These are not ideal for stuff that gets added by PHP scripts, but they are great for anything that is edited by hand and doesn't require lots of fancy queries.

Link to comment

"SQL databases...are they files? Then where is the file? I can make some funny tar.gz backups, but I don't know what's in them. They get corrupted and lost. "

 

I for sure get the idea with this, but you could be in infomercials with an explanation like that :)

 

  • Upvote 1
Link to comment

Is there a way to stop the highlight feature? It's a bit overkill having to copy the whole thing, paste it somewhere else, then copy the line that you want. Can the example box have a button that says "Highlight Example"?

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...