I'm currently building a Grav theme, in which a div
should have the particle
background from particle.js.
As stated by the setup manual, the actual function call in the js
to render the particles, requires a config
file in .json
format
/* particlesJS.load(@dom-id, @path-json, @callback (optional)); */
particlesJS.load('particles-js', 'assets/particles.json', function() {
console.log('callback - particles.js config loaded');
});
However, I'm unsure how I can provide the path to the json
file.
When I tried to pass a regular html
relative path (like in the example above), the GET
command in the console returned a 404 error.
When I tried a Static Asset Path using {{ url("theme://assets/particles.json") }}
, the GET
returned a 403 (Forbidden) error.
How can I provide the path in the external script?