Skip to content

Commit

Permalink
fix: head (#112)
Browse files Browse the repository at this point in the history
* fix: head

* Prettying

---------

Co-authored-by: Prettier <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
Phaired and github-actions[bot] authored Oct 19, 2024
1 parent a87b6c3 commit 33d495b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Import the global.css file here so that it is included on
// all pages through the use of the <BaseHead /> component.
import "../styles/global.css";
import { ViewTransitions } from "astro:transitions";
interface Props {
title: string;
Expand Down
3 changes: 0 additions & 3 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
import HeaderLink from "./HeaderLink.astro";
import { SITE_TITLE } from "../consts";
import Theme from "./ThemeIcon.astro";
import { ViewTransitions } from "astro:transitions";
---

<header>
<ViewTransitions />

<nav>
<h2><a href="/">{SITE_TITLE}</a></h2>
<div class="internal-links">
Expand Down
2 changes: 2 additions & 0 deletions src/layouts/Post.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import BaseHead from "../components/BaseHead.astro";
import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
import FormattedDate from "../components/FormattedDate.astro";
import { ViewTransitions } from "astro:transitions";
type entry = "blog" | "projects";
type Props = CollectionEntry<entry>["data"];
Expand All @@ -14,6 +15,7 @@ const { title, description, pubDate, updatedDate, heroImage, heroGif }: Props =

<html lang="en">
<head>
<ViewTransitions />
<BaseHead
title={title}
description={description}
Expand Down
2 changes: 2 additions & 0 deletions src/pages/blog/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { SITE_TITLE, SITE_DESCRIPTION } from "../../consts";
import { getCollection } from "astro:content";
import FormattedDate from "../../components/FormattedDate.astro";
import ReadingTime from "../../components/ReadingTime.astro";
import { ViewTransitions } from "astro:transitions";
const posts = (await getCollection("blog")).sort(
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
Expand All @@ -15,6 +16,7 @@ const posts = (await getCollection("blog")).sort(
<!doctype html>
<html lang="en">
<head>
<ViewTransitions />
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
<style>
main {
Expand Down
2 changes: 2 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import BaseHead from "../components/BaseHead.astro";
import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
import { ViewTransitions } from "astro:transitions";
import { SITE_TITLE, SITE_DESCRIPTION } from "../consts";
const age = () => {
const birthdate = new Date("2001-03-25");
Expand All @@ -14,6 +15,7 @@ const age = () => {
<!doctype html>
<html lang="en">
<head>
<ViewTransitions />
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
</head>
<body>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/projects/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { SITE_TITLE, SITE_DESCRIPTION } from "../../consts";
import { getCollection } from "astro:content";
import FormattedDate from "../../components/FormattedDate.astro";
import ReadingTime from "../../components/ReadingTime.astro";
import { ViewTransitions } from "astro:transitions";
const posts = (await getCollection("projects")).sort(
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
Expand All @@ -15,6 +16,7 @@ const posts = (await getCollection("projects")).sort(
<!doctype html>
<html lang="en">
<head>
<ViewTransitions />
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
<style>
main {
Expand Down

0 comments on commit 33d495b

Please sign in to comment.