mirror of
https://github.com/PR0M3TH3AN/Archivox.git
synced 2025-09-08 06:58:43 +00:00
Merge pull request #13 from PR0M3TH3AN/codex/update-analytics.js-to-inject-snippet
Fix analytics plugin return format
This commit is contained in:
@@ -2,6 +2,6 @@ module.exports = {
|
|||||||
onPageRendered: async ({ html, file }) => {
|
onPageRendered: async ({ html, file }) => {
|
||||||
// Example: inject analytics script into each page
|
// Example: inject analytics script into each page
|
||||||
const snippet = '\n<script>console.log("Page viewed: ' + file + '")</script>';
|
const snippet = '\n<script>console.log("Page viewed: ' + file + '")</script>';
|
||||||
return html.replace('</body>', `${snippet}</body>`);
|
return { html: html.replace('</body>', `${snippet}</body>`) };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user