diff --git a/docs/content/doc/advanced/customizing-gitea.en-us.md b/docs/content/doc/advanced/customizing-gitea.en-us.md index 2c06de67b54..b52a713e40a 100644 --- a/docs/content/doc/advanced/customizing-gitea.en-us.md +++ b/docs/content/doc/advanced/customizing-gitea.en-us.md @@ -180,6 +180,89 @@ You can then add blocks like the following to your markdown: The script will detect tags with `class="language-plantuml"`, but you can change this by providing a second argument to `parsePlantumlCodeBlocks`. +#### Example: STL Preview + +You can display STL file directly in Gitea by adding: +```html + +``` +to the file `templates/custom/footer.tmpl` + +You also need to download the content of the library [Madeleine.js](https://jinjunho.github.io/Madeleine.js/) and place it under `custom/public/` folder. + +You should end-up with a folder structucture similar to: +``` +custom/templates +-- custom + `-- footer.tmpl +custom/public +-- Madeleine.js + |-- LICENSE + |-- README.md + |-- css + | |-- pygment_trac.css + | `-- stylesheet.css + |-- examples + | |-- ajax.html + | |-- index.html + | `-- upload.html + |-- images + | |-- bg_hr.png + | |-- blacktocat.png + | |-- icon_download.png + | `-- sprite_download.png + |-- models + | |-- dino2.stl + | |-- ducati.stl + | |-- gallardo.stl + | |-- lamp.stl + | |-- octocat.stl + | |-- skull.stl + | `-- treefrog.stl + `-- src + |-- Madeleine.js + |-- css + | `-- Madeleine.css + |-- icons + | |-- logo.png + | |-- madeleine.eot + | |-- madeleine.svg + | |-- madeleine.ttf + | `-- madeleine.woff + `-- lib + |-- MadeleineConverter.js + |-- MadeleineLoader.js + |-- detector.js + |-- stats.js + `-- three.min.js +``` + +Then restart gitea and open a STL file on your gitea instance. + ## Customizing Gitea mails The `custom/templates/mail` folder allows changing the body of every mail of Gitea.