<% // service const categoryfilter = { main: "메인", sub: "서브" }; const transPageList = (list_) => { const result = []; for (key in categoryfilter) { const name = categoryfilter[key]; const reg = new RegExp("\\[P] " + name); result.push({ key, name, pageList: list_.filter((page) => reg.test(page.name)) }); } return result; }; const sitemapMap = transPageList(locals.sitemap); %>

사이트맵

<% sitemapMap.forEach((category)=>{%>

<%=category.name %>

<%})%>