mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-04 12:47:14 +02:00
21 lines
541 B
JavaScript
21 lines
541 B
JavaScript
/**
|
|
* Html
|
|
* This Html.js file acts as a template that we insert all our generated
|
|
* application code into before sending it to the client as regular HTML.
|
|
* Note we're returning a template string from this function.
|
|
*/
|
|
|
|
module.exports = function createHtml({title, body, bundlejs, lang}) {
|
|
return `
|
|
<!DOCTYPE html>
|
|
<html lang="${lang}">
|
|
<head>
|
|
<title>${title}</title>
|
|
</head>
|
|
<body>
|
|
<div id="app">${body}</div>
|
|
<script src="${bundlejs}"></script>
|
|
</body>
|
|
</html>
|
|
`;
|
|
};
|