mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-17 12:44:40 +03:00
resolve #5, 使用 hexo 编译网站
This commit is contained in:
21
website/themes/moderncpp/layout/post.ejs
Executable file
21
website/themes/moderncpp/layout/post.ejs
Executable file
@@ -0,0 +1,21 @@
|
||||
<div class="sidebar blog">
|
||||
<div class="sidebar-inner">
|
||||
<ul class="main-menu">
|
||||
<%- partial('partials/main_menu', { context: 'nav' }) %>
|
||||
</ul>
|
||||
<div class="list">
|
||||
<ul style="padding: 0;">
|
||||
<% site.posts.sort('date', -1).limit(10).each(function (post) { %>
|
||||
<li>
|
||||
<a href="/<%- post.path %>" class="sidebar-link<%- page.title === post.title ? ' current' : '' %>"><%- post.title %></a>
|
||||
</li>
|
||||
<% }) %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content with-sidebar post">
|
||||
<h1><%- page.title %></h1>
|
||||
<h4><%- page.date.format('MMM D[,] YYYY') %></h4>
|
||||
<%- page.content %>
|
||||
</div>
|
||||
Reference in New Issue
Block a user