godot-asset-library
godot-asset-library copied to clipboard
Support Markdown or BBCode for asset descriptions
Markdown or BBCode should be supported in asset descriptions. See below for a comparison of each. Perhaps the asset store could use Markdown, and convert it to BBCode when needed for Godot's purposes.
Markdown
Upsides
- Simple to use
- Widely used and supported
Downsides
- Currently not supported by Godot
BBCode
Upsides
- Supported by Godot through the RichTextLabel node
Downsides
- Not as easy to read and write as Markdown
- Not very popular today
PHP has a PECL extension + PEAR package for BBCode - http://php.net/manual/en/book.bbcode.php
Given that it is possible to install PEAR packages through composer, I guess we might use it just fine ^^
Not blocking for beta.
This is supported in the asset library rewrite, which will become the new official platform sometime in the future. I don't have an ETA for deploying it though.
so, without the rewrite (https://github.com/Calinou/godot-asset-library-laravel/issues/467), will it be supported in this asset lib, or only in the next full rewrite mentioned in that issue?
so, without the rewrite (Calinou/godot-asset-library-laravel#467), will it be supported in this asset lib, or only in the next full rewrite mentioned in that issue?
This could be supported in the current asset library, with two conditions:
- We find someone who's willing to integrate a Markdown parsing library in the current backend. This will require a database migration, as you need a new field to store the rendered HTML (existing field would store the source text). This HTML field would probably not be returned by the API.
- We implement Markdown to BBCode conversion in the editor (could also be exposed to projects with a static function in RichTextLabel).
Does it really need a backend parser? why not keep it in the frontend only with something like https://github.com/markedjs/marked? And, as much as I would love md to bbcode - is it really necessary? I've seen quite a few assets use markdown (mostly when the description is just the readme) and it looks completely fine
Does it really need a backend parser? why not keep it in the frontend only with something like markedjs/marked?
It can be done with a client-side library, but it may feel sluggish on low-end/mobile devices. While we may initially expect most descriptions to be short, many people will be copy-pasting their asset's entire README if we present them with an interface that allows them to do that :slightly_smiling_face:
And, as much as I would love md to bbcode - is it really necessary? I've seen quite a few assets use markdown (mostly when the description is just the readme) and it looks completely fine
For users, Markdown source is awkward to read unformatted when it contains named links. The rest is usually not too bad though.