feat: upgrade to 11ty 3.0.0@alpha
This commit is contained in:
parent
2cd8e4a380
commit
e16633653a
43 changed files with 578 additions and 5039 deletions
|
@ -1,8 +1,8 @@
|
|||
const { DateTime } = require('luxon')
|
||||
const tagAliases = require('../data/tag-aliases.json')
|
||||
const { makeYearStats, processPostFile } = require('./utils')
|
||||
import { DateTime } from 'luxon'
|
||||
import tagAliases from '../data/tag-aliases.js'
|
||||
import { makeYearStats, processPostFile } from './utils.js'
|
||||
|
||||
const tagList = (collection) => {
|
||||
export const tagList = (collection) => {
|
||||
const tagsSet = new Set()
|
||||
collection.getAll().forEach((item) => {
|
||||
if (!item.data.tags) return
|
||||
|
@ -13,7 +13,7 @@ const tagList = (collection) => {
|
|||
return Array.from(tagsSet).sort()
|
||||
}
|
||||
|
||||
const tagMap = (collection) => {
|
||||
export const tagMap = (collection) => {
|
||||
const tags = {}
|
||||
collection.getAll().forEach((item) => {
|
||||
if (item.data.collections.posts) {
|
||||
|
@ -38,7 +38,7 @@ const tagMap = (collection) => {
|
|||
return tags
|
||||
}
|
||||
|
||||
const postStats = (collectionApi) => {
|
||||
export const postStats = (collectionApi) => {
|
||||
const oneDayMilliseconds = 1000 * 60 * 60 * 24
|
||||
const statsObject = {
|
||||
avgDays: 0,
|
||||
|
@ -164,9 +164,3 @@ const postStats = (collectionApi) => {
|
|||
statsObject.highPostCount = highPostCount
|
||||
return statsObject
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
tagList,
|
||||
tagMap,
|
||||
postStats,
|
||||
}
|
||||
|
|
Reference in a new issue