Thanks for the amazing work in building Logseq. It is a really cool tool to work with.
One feature we actually love it the “Export graph” - “Export public pages” Feature to make parts of it via web accessable. At https://docs.logseq.com/#/whiteboard/test%20whiteboard?block-id= we see the whiteboards demo published as well. In our exports the whiteboards are listed but there is no image visible. Is there something we need to config for it to be exported?
Hey, I think I found the issue here! Did you open the webpage by double-clicking on the generated index.html file?
Check your browser’s developer console and see if there’s an error like this:
Access to XMLHttpRequest at 'file:///xxx/xxx/static/js/tldraw.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: chrome, chrome-extension, chrome-untrusted, data, http, https, isolated-app.
If so, the problem is due to the browser’s Cross-Origin Resource Sharing (CORS) policy, which doesn’t allow direct access to resources over the file:// protocol.
If you have Python installed, this is super easy to fix:
Just run this command in the root directory of the site:
python -m http.server
Then go to localhost:8000, and you should see the Whiteboards display normally!