-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate site to Astro #346
Conversation
✅ Deploy Preview for zero-to-nix ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
src/components/CookieConsent.tsx
Outdated
import { posthog } from "posthog-js"; | ||
import { useEffect, useState } from "react"; | ||
|
||
const CookieConsent = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not seeing the cookie consent banner show up, but I am seeing event data going to PostHog.
Co-authored-by: Graham Christensen <[email protected]>
This is looking good to me. I'm still not seeing the cookie consent popup, but beyond that, I don't see any obvious problems. I think we should move forward with a merge as soon as the consent window comes up. |
I cannot for the life of me get it to work, so this will probably be a while |
Have you poked around this repo? https://github.com/jop-software/astro-cookieconsent/blob/main/src/main.ts ...poking around a bit I noticed a weird flash of content on every refresh, which turns out to be all the user-initiated things: ...maybe that's a clue? |
@grahamc There isn't really a way out of the flash of unstyled content with dark mode and a fully static site. Vue + iles has some JS magic built into it that prevents that but we don't have access to that here. As for the cookie consent plugin, I don't see a way to integrate that with Posthog. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I completed a side-by-side read-through, and the Astro version is spot on.
@lucperkins I think if you pin posthog to just before v1.136.0 our posthog conditions will work correctly. |
@grahamc Alas, that doesn't work either. I just cannot get |
@lucperkins I think it is because posthog is getting its .js from us.i.posthog.com, instead of the bundled version we've pinned. Is that possible? |
The iles framework has essentially been abandoned so it's time to re-platform.
TODOs:
:rocket:
)