mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-06 04:22:07 +00:00
22 lines
636 B
TypeScript
22 lines
636 B
TypeScript
import { getAllChangelogEntries } from './changelog/utils';
|
|
import { browser } from '$app/environment';
|
|
import posthog from 'posthog-js';
|
|
import { PUBLIC_POSTHOG_API_KEY } from '$env/static/public';
|
|
|
|
export const prerender = true;
|
|
export const trailingSlash = 'never';
|
|
|
|
export const load = async () => {
|
|
if (browser && PUBLIC_POSTHOG_API_KEY) {
|
|
posthog.init(PUBLIC_POSTHOG_API_KEY, {
|
|
api_host: 'https://eu.i.posthog.com',
|
|
person_profiles: 'identified_only',
|
|
persistence: 'memory'
|
|
});
|
|
}
|
|
|
|
return {
|
|
changelogEntries: (await getAllChangelogEntries()).length
|
|
};
|
|
};
|