mirror of
https://github.com/PR0M3TH3AN/Archivox.git
synced 2025-09-08 23:18:42 +00:00
Add plugin system
This commit is contained in:
7
plugins/analytics.js
Normal file
7
plugins/analytics.js
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
onPageRendered: async ({ html, file }) => {
|
||||
// Example: inject analytics script into each page
|
||||
const snippet = '\n<script>console.log("Page viewed: ' + file + '")</script>';
|
||||
return html.replace('</body>', `${snippet}</body>`);
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user