feat: add site search
This commit is contained in:
parent
dd98b01bbd
commit
74699d618c
8 changed files with 129 additions and 32 deletions
|
@ -14,6 +14,7 @@ const dateFilters = require('./config/dateFilters.js')
|
|||
const mediaFilters = require('./config/mediaFilters.js')
|
||||
const CleanCSS = require('clean-css')
|
||||
const now = String(Date.now())
|
||||
const { execSync } = require('child_process')
|
||||
|
||||
// load .env
|
||||
require('dotenv-flow').config()
|
||||
|
@ -126,6 +127,10 @@ module.exports = function (eleventyConfig) {
|
|||
return Image.generateHTML(metadata, imageAttributes)
|
||||
})
|
||||
|
||||
eleventyConfig.on('eleventy.after', () => {
|
||||
execSync(`npx pagefind --source _site --glob "**/*.html"`, { encoding: 'utf-8' })
|
||||
})
|
||||
|
||||
return {
|
||||
passthroughFileCopy: true,
|
||||
dir: {
|
||||
|
|
Reference in a new issue