0
我跟着本教程sctoch.io使用ejs文件,但我正在尋找包括當前頁面的主索引。節點js .ejs文件主索引
在教程中,我們將在所有新聞頁面中添加頭部,頁眉和頁腳。
但我想寫一次。例如:
<html lang="en">
<head>
<% include ../partials/head %>
</head>
<body class="container">
<header>
<% include ../partials/header %>
</header>
<main>
<!-- Here is that I want -->
<% include ../partials/main %>
</main>
<footer>
<% include ../partials/footer %>
</footer>
</body>
</html>
當我在我的導航欄的不同鏈接上點擊時,如何在主文件中加載好的頁面?