fix: corregir errores en la carga de metadatos del proyecto

This commit is contained in:
2025-10-07 12:18:05 -05:00
parent 38aab95444
commit b49e0e12e3
2 changed files with 9 additions and 3 deletions

View File

@@ -85,7 +85,13 @@ const renderTemplate = async (
} | Guía Completa`;
const html = await ejs.renderFile(
layoutFile,
{ ...locals, title: locals.title ?? defaultTitle, body },
{
head: null,
scripts: null,
...locals,
title: locals.title ?? defaultTitle,
body,
},
{ async: true }
);
res.writeHead(statusCode, {

View File

@@ -39,7 +39,7 @@
};
</script>
<link rel="stylesheet" href="/assets/css/styles.css">
<% if (head) { %>
<% if (typeof head !== 'undefined' && head) { %>
<%= head %>
<% } %>
</head>
@@ -92,7 +92,7 @@
</footer>
<script src="/assets/js/main.js" type="module"></script>
<% if (scripts) { %>
<% if (typeof scripts !== 'undefined' && scripts) { %>
<%= scripts %>
<% } %>
</body>