You can load HTML files from the resource system using the following URL:
res://godot/path/file.html
In this URL, godot
is considered the "host" and should always be present. The web path in this case
is /path/file.html
which translates to res://path/file.html
in the Godot resource system.
By default, Godot's filesystem panel will not show .html
files. You can change that in the editor options:
We suggest adding both html
and jinja
To refer to Godot resources from HTML, the godot
(host) part is not needed, as it is implied when you're already
browsing that host. You can simply have an img tag as follows:
<img src="/path/image.jpg"/>
This would look for res://path/image.jpg
in your Godot project.
/
will cause this addon to load index.html
from that path