Skip to content

Commit

Permalink
automatic slug
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDTR committed Oct 10, 2024
1 parent 289beeb commit 9e085f6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion src/components/Header.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
import "../styles/global.css";
const currentPath = Astro.url.pathname;
console.log(currentPath);
---

<div class="header-container">
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/Blog.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import BaseLayout from "./BaseLayout.astro";
const { frontmatter } = Astro.props;
const hasTags = frontmatter.tags && frontmatter.tags.length > 0;
const imgLink = `${Astro.site.origin}/og/${frontmatter.slug}.png`;
const imgLink = `${Astro.site.origin}/og/${Astro.url.pathname}.png`;
---

<BaseLayout
Expand Down
1 change: 0 additions & 1 deletion src/pages/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ title: "Hello World"
subtitle: "Things I've learned from saying Hello to the world"
author: Andrew
tags: ["one", "two", "three"]
slug: "about"
---

![Example image](/og/index.png)
Expand Down
1 change: 0 additions & 1 deletion src/pages/blog/upl-people-counter.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ date: "2024-09-28"
subtitle: "who knew figuring out whether the lab's open would be so much work...?"
tags: ["python", "opencv", "zigbee", "upl"]
author: "Andrew"
slug: "blog/upl-people-counter"
---

## A History of UPL's Cameras
Expand Down

0 comments on commit 9e085f6

Please sign in to comment.