feat: more performant popular posts
This commit is contained in:
parent
7e3503fbb4
commit
3ef783fd18
11 changed files with 28 additions and 32 deletions
|
@ -7,7 +7,7 @@ import markdownItFootnote from 'markdown-it-footnote'
|
|||
import htmlmin from 'html-minifier-terser'
|
||||
import filters from './config/filters/index.js'
|
||||
import { minifyJsComponents } from './config/events/index.js'
|
||||
import { allContent, searchIndex } from './config/collections/index.js'
|
||||
import { allContent, popularPosts, searchIndex } from './config/collections/index.js'
|
||||
import { DateTime } from 'luxon'
|
||||
|
||||
// load .env
|
||||
|
@ -56,6 +56,7 @@ export default async function (eleventyConfig) {
|
|||
|
||||
// collections
|
||||
eleventyConfig.addCollection('allContent', allContent)
|
||||
eleventyConfig.addCollection('popularPosts', popularPosts)
|
||||
eleventyConfig.addCollection('searchIndex', searchIndex)
|
||||
|
||||
const md = markdownIt({ html: true, linkify: true })
|
||||
|
|
Reference in a new issue