Commit 1be94f46 authored by wu-lee's avatar wu-lee

metalsmith.js / theme - add a sitemap index

parent 5be63a63
......@@ -142,12 +142,19 @@ module.exports = () => {
pattern: 'posts/*.md',
sortBy: postCreation,
},
pages: {
pattern: ['**/*.md','!posts/*.md'],
},
}))
.use(collectionIndexes({
'posts/index.html': {
collection: 'posts',
layout: 'index.hbs',
},
'index.html': {
collection: 'pages',
layout: 'sitemap.hbs',
},
}))
.use(markdown())
.use(addMeta({
......
{{#> default}}
<div id="post-index" class="container">
<ol class="post-list">
{{#each pages}}
<li class="post-stub {{post_class}}" >
<a class="js-ajax-link" title="{{title}}" href="{{url}}">
<h5 class="post-stub-title">{{longtitle}}</h4>
(<time class="page-stub-date" datetime="{{date git.last.authored format='x'}}">modified {{date git.first.authored format="MMMM Do YYYY"}}</time>)
</a>
</li>
{{/each}}
</ol>
<div class="post-navigation">
{{!pagination}}
</div>
</div>
{{/default}}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment