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`; } | Guía Completa`;
const html = await ejs.renderFile( const html = await ejs.renderFile(
layoutFile, layoutFile,
{ ...locals, title: locals.title ?? defaultTitle, body }, {
head: null,
scripts: null,
...locals,
title: locals.title ?? defaultTitle,
body,
},
{ async: true } { async: true }
); );
res.writeHead(statusCode, { res.writeHead(statusCode, {

View File

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