Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
<script src="//code.tidio.co/9o9hpvuj5fqc7gu1vhialdrpp7buweu2.js" async></script>
-->

<title>comma.ai — make driving chill</title>

<!-- Google SEO -->
<script type="application/ld+json">
{
Expand All @@ -67,8 +65,6 @@

<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://comma.ai/" />
<meta property="og:title" content="comma.ai — make driving chill" />
<meta property="og:description" content="An AI upgrade for your car" />
<meta property="og:image" content="https://comma.ai/og-comma-four.png" />
<meta property="og:image:width" content="1200" />
Expand All @@ -77,7 +73,6 @@
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@comma_ai" />
<meta name="twitter:title" content="comma.ai — make driving chill" />
<meta name="twitter:description" content="An AI upgrade for your car" />
<meta name="twitter:image" content="https://comma.ai/og-comma-four.png" />
<meta name="twitter:image:alt" content="comma four" />
Expand Down
15 changes: 15 additions & 0 deletions src/lib/components/PageHead.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script>
export let title;
export let description = undefined;
</script>

<svelte:head>
<title>{title}</title>
<meta property="og:title" content={title} />
<meta name="twitter:title" content={title} />
{#if description}
<meta name="description" content={description} />
<meta property="og:description" content={description} />
<meta name="twitter:description" content={description} />
{/if}
</svelte:head>
11 changes: 11 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
import { onMount } from "svelte";
import { page } from "$app/stores";

import PageHead from "$lib/components/PageHead.svelte";

const DEFAULT_TITLE = "comma.ai — make driving chill";
const SITE_ORIGIN = "https://comma.ai";

let loading = false;

async function openCart() {
Expand Down Expand Up @@ -83,7 +88,13 @@
printConsoleBanner();
</script>

<PageHead
title={$page.data?.pageTitle ?? DEFAULT_TITLE}
description={$page.data?.pageDescription}
/>

<svelte:head>
<meta property="og:url" content="{SITE_ORIGIN}{$page.url.pathname}" />
<link
rel="preload"
href={MonumentExtendedBlack}
Expand Down
7 changes: 7 additions & 0 deletions src/routes/jobs/+page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export function load() {
return {
pageTitle: "Jobs - comma",
pageDescription:
"At comma.ai, we are solving self-driving cars while delivering shippable intermediaries.",
};
}
8 changes: 0 additions & 8 deletions src/routes/jobs/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,6 @@
}
</script>

<svelte:head>
<title>Jobs - comma</title>
<meta
name="description"
content="At comma.ai, we are solving self-driving cars while delivering shippable intermediaries."
/>
</svelte:head>

<div class="jobs-page light">
<section class="jobs-hero" aria-labelledby="jobs-title">
<div class="container">
Expand Down
3 changes: 2 additions & 1 deletion src/routes/shop/[product]/+page.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ export async function load({ url, params }) {
...productInfo,
images: resolvedImages
},
descriptionComponent
descriptionComponent,
pageTitle: `${product.title} — comma shop`,
};
}
throw error(404, {
Expand Down
4 changes: 0 additions & 4 deletions src/routes/shop/[product]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
$: ({ product, descriptionComponent } = data);
</script>

<svelte:head>
<title>{product.title} — comma shop</title>
</svelte:head>

<section class="light" id="product-item">
<div class="container">
{#if descriptionComponent}
Expand Down
5 changes: 5 additions & 0 deletions src/routes/shop/comma-four-trade-in/+page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export function load() {
return {
pageTitle: "comma four trade-in — comma shop",
};
}
4 changes: 0 additions & 4 deletions src/routes/shop/comma-four-trade-in/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<script>
</script>

<svelte:head>
<title>comma four trade-in — comma shop</title>
</svelte:head>

<section class="light" id="trade-in">
<div class="container">
<h1>comma four trade-in</h1>
Expand Down
Loading