Easily add an STL viewer to Wiki.js 2.5 for 3D model visualization.
-
Go to Administration > Theme in the Wiki.js admin panel.
-
Copy/paste the code from
HTML_head.js
into the second injection code frame (right column). -
Copy/paste the code from
HTML_body.js
into the third injection code frame (right column). -
Click the Apply button in the top-right corner to save changes.
-
Create or edit a page, and upload the STL file (the same way you upload images).
-
In the page where you want to display the STL file, add the following HTML snippet:
<div class="stl-viewer" data-src="/PATH_TO_YOUR_FILE.stl" style="width: 100%; height: 500px;"></div>