Skip to content

Commit

Permalink
Fixing astro referrer
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljolley committed Apr 12, 2024
1 parent e66e0af commit f5b0a0e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
5 changes: 2 additions & 3 deletions netlify/edge-functions/hiya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ export default async (request: Request, context: Context) => {
let updatedPage = page;

let astroReplace =
analytic.referrer == "https://astro.build/" ? astroed : "";
console.log(analytic.referrer);
const astroRegex = /<!-- ASTROED -->/i;
analytic.referrer && analytic.referrer.indexOf("astro.build") >= 0 ? astroed : "";
const astroRegex = /\**ASTROED\**/i;
updatedPage = updatedPage.replace(astroRegex, astroReplace);

const regex = /<!-- ANALYTIC -->/i;
Expand Down
18 changes: 9 additions & 9 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ import Twitch from "@components/Twitch.astro";
const title = "Michael Jolley is the Bald Bearded Builder";
const description =
"Welcome to the home of Michael Jolley, also known as the bald, bearded, builder. Here you'll find all Michael's content curated for easier viewing.";
"Welcome to the home of Michael Jolley, also known as the bald, bearded, builder. Here you'll find all Michael's content curated for easier viewing.";
const permalink = `https://${import.meta.env.HOST}/`;
---

<BaseLayout {title} {description} {permalink}>
<Mast
title="Bald Bearded Builder"
summary="Helping developers do more...<br>and laugh along the way."
/>
<!-- ASTROED -->
<Twitch />
<BetterCode />
<BrainDumpForm />
<Mast
title="Bald Bearded Builder"
summary="Helping developers do more...<br>and laugh along the way."
/>
**ASTROED**
<Twitch />
<BetterCode />
<BrainDumpForm />
</BaseLayout>

0 comments on commit f5b0a0e

Please sign in to comment.