Hi,
Welcome to forums.
The way I have solved it was to circumvent Wordpress. If anybody knows how to solve it better I’m interested to know too.
- So I’ve created a folder for for HTML-files and subfolder for Javascript files under the root of HTTP-server. Java based processing should work in similar manner. I wanted to try p5xjs and to make things a bit easier.
- On my website I have created a redirection to the folder above. So on my website meditations.harrikemppainen.com is directed to https://harrikemppainen.com/meditations/.
- for each script there is a HTML-file and related processing javascript file. NOTE! html file needs to have .shtml filename extension.
HTML itself is very basic
`<?xml version="1.0" encoding="UTF-8?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Homage to HC Berg</title>
<script src="https://discourse.processing.org/[https://cdn.jsdelivr.net/npm/%3Ca%20href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="33430673021d031d03">[email protected]/lib/p5.js](view-source:https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js)"></script>
<script language="javascript" type="text/javascript" src="https://discourse.processing.org/[js/homage_to_hcberg.js](view-source:http://harrikemppainen.com/meditations/js/homage_to_hcberg.js)"></script>
<style> body { padding: 0; margin: 0; } </style>
</head>
<body> </body>
</html>`