You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The entry that came in at Performance Rank Number 42 exists in the author's page and the fastestSites.json, but is missing from the Performance Leaderboard. Probably because the site's data filename has a . in it.
So in the findSiteDataByUrl filter I added a log to see what sites looks like. Most of the key-values in sites look like:
everylayout:
{name: 'Every Layout',url: 'https://every-layout.dev/',description:
'Through a series of simple, composable layouts, Every Layout will teach you how to better harness the built-in algorithms that power browsers and CSS.',twitter: 'layoutplusplus',authoredBy: ['hankchizljaw','heydonworks'],featured: true},
but the object for timseverien's site looks like
timseverien:
{com:
{url: 'https://timseverien.com',name: 'Tim Severien’s Blog',description: 'A blog about web development and creative coding',twitter: 'timseverien',source_url: 'https://github.com/timseverien/timseverien.com'}},
I'm guessing this is because their _data/sites/ files is named timseverien.com.json and the object gets pathed by the dots in the filename. Replacing the .'s in the filename with -'s makes the site show up.
The entry that came in at Performance Rank Number 42 exists in the author's page and the
fastestSites.json
, but is missing from the Performance Leaderboard. Probably because the site's data filename has a.
in it.This bug affects a couple of other sites cough one of which is mine cough.
This is the line that populates the information for perf ranks:
11ty-website/leaderboard/perf.njk
Line 41 in d508831
So in the
findSiteDataByUrl
filter I added a log to see whatsites
looks like. Most of the key-values insites
look like:but the object for timseverien's site looks like
I'm guessing this is because their
_data/sites/
files is namedtimseverien.com.json
and the object gets pathed by the dots in the filename. Replacing the.
's in the filename with-
's makes the site show up.The Global Data Files docs mention how to make sub-objects using folders, but I wasn't sure if using dots to achieve the same thing is expected behaviour. Happy to open an issue and PR over in eleventy if this is a bug from there.
This change to how eleventy handles template data folders makes the missing sites appear on the leaderboard.
The text was updated successfully, but these errors were encountered: