Skip to content
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

fix: correct title tags #106

Merged
merged 1 commit into from
Sep 26, 2023
Merged
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
4 changes: 0 additions & 4 deletions apps/website/src/pages/404.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ type NotFoundPageQuery = {
};
};

export function Head() {
return <meta title="Page not found" />;
}

export default function Index({ data }: PageProps<NotFoundPageQuery>) {
return (
<LanguageNegotiator defaultLanguage={'en'}>
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/pages/__preview/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import PagePreview from '../../preview/page';

export function Head() {
return <meta title="Page preview" />;
return <title>Page preview</title>;
}

export default function PagePreviewTemplate() {
Expand Down
3 changes: 2 additions & 1 deletion apps/website/src/pages/content-hub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { ContentHub } from '@custom/ui/routes/ContentHub';
import React from 'react';

export function Head() {
return <meta title="Page not found" />;
// TODO: Add title once content hub is language aware.
return null;
}

export default function ContentHubPage() {
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/templates/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type PageTemplateQuery = {
export function Head({ data }: HeadProps<PageTemplateQuery>) {
return (
<>
<meta title={data.page.title} />
<title>{data.page.title}</title>
{data.page.metaTags?.map((metaTag, index) => {
if (metaTag?.tag === 'meta') {
return (
Expand Down