Skip to content

Commit

Permalink
fix(ads): do not index ads pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafatcb committed Aug 31, 2024
1 parent 369e453 commit e84323d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions pages/[username]/[slug]/index.public.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ export const getStaticProps = getStaticPropsRevalidate(async (context) => {
canonical: secureContentFound.parent_id
? undefined
: `${webserver.host}/${secureContentFound.owner_username}/${secureContentFound.slug}`,
noIndex: secureContentFound.type === 'ad',
};

let secureRootContentFound = null;
Expand Down
3 changes: 2 additions & 1 deletion pages/[username]/classificados/[page]/index.public.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export default function RootContent({ contentListFound, pagination, username })
const isAuthenticatedUser = user && user.username === username;

return (
<DefaultLayout metadata={{ title: `Classificados · Página ${pagination.currentPage} · ${username}` }}>
<DefaultLayout
metadata={{ title: `Classificados · Página ${pagination.currentPage} · ${username}`, noIndex: true }}>
<UserHeader username={username} adContentCount={pagination.totalRows} />

<ContentList
Expand Down
1 change: 1 addition & 0 deletions pages/recentes/classificados/[page]/index.public.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function ContentsPage({ contentListFound, pagination }) {
metadata={{
title: `Página ${pagination.currentPage} · Classificados Recentes`,
description: 'Classificados do TabNews ordenados pelos mais recentes.',
noIndex: true,
}}>
<RecentTabNav />
<ContentList
Expand Down

0 comments on commit e84323d

Please sign in to comment.