Skip to content

Commit b7f3d0b

Browse files
committed
Try fixing robots setup
Signed-off-by: Olga Bulat <[email protected]>
1 parent 3715639 commit b7f3d0b

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

frontend/nuxt.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const disallowedBots = [
5151
*/
5252
const robots = {
5353
userAgent: "*",
54-
disallow: ["/search/audio/", "/search/image/", "/search/"],
54+
disallow: ["/search", "/search/audio", "/search/image"],
5555
groups: [
5656
...disallowedBots.map((bot) => ({
5757
userAgent: [bot],

frontend/src/utils/og.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@ export const createDetailPageMeta = ({
1616
isSensitive: boolean
1717
}) => {
1818
const head: { meta: Meta } = { meta: [] }
19-
const meta: Meta = [
20-
{
21-
key: "robots",
22-
name: "robots",
23-
content: "all",
24-
},
25-
]
19+
const meta: Meta = []
2620
if (title) {
2721
meta.push({
2822
key: "og:title",

frontend/test/playwright/e2e/seo.spec.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ test.describe.configure({ mode: "parallel" })
66
const DESCRIPTION =
77
"Search over 800 million free and openly licensed images, photos, audio, and other media types for reuse and remixing."
88
const NO_INDEX = "noindex, nofollow"
9+
const INDEX =
10+
"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"
911
const DEFAULT_IMAGE = "/openverse-default.jpg"
1012

1113
const pages = {
@@ -14,7 +16,7 @@ const pages = {
1416
title: "Openly Licensed Images, Audio and More | Openverse",
1517
ogImage: DEFAULT_IMAGE,
1618
ogTitle: "Openverse",
17-
robots: NO_INDEX,
19+
robots: INDEX,
1820
},
1921
allSearch: {
2022
url: "/search/?q=birds",
@@ -44,7 +46,7 @@ const pages = {
4446
"/v1/images/da5cb478-c093-4d62-b721-cda18797e3fb/thumb/"
4547
),
4648
ogTitle: "bird",
47-
robots: "all",
49+
robots: INDEX,
4850
},
4951
audioDetail: {
5052
url: "/audio/7e063ee6-343f-48e4-a4a5-f436393730f6",
@@ -53,35 +55,35 @@ const pages = {
5355
"/v1/audio/7e063ee6-343f-48e4-a4a5-f436393730f6/thumb/"
5456
),
5557
ogTitle: "I Love My Dog You Love your Cat",
56-
robots: "all",
58+
robots: INDEX,
5759
},
5860
about: {
5961
url: "/about",
6062
title: "About Openverse | Openverse",
6163
ogImage: DEFAULT_IMAGE,
6264
ogTitle: "Openverse",
63-
robots: NO_INDEX,
65+
robots: INDEX,
6466
},
6567
tag: {
6668
url: "/image/collection?tag=cat",
6769
title: "cat images | Openverse",
6870
ogImage: DEFAULT_IMAGE,
6971
ogTitle: "cat images | Openverse",
70-
robots: NO_INDEX,
72+
robots: INDEX,
7173
},
7274
source: {
7375
url: "/image/collection?source=flickr",
7476
title: "Flickr images | Openverse",
7577
ogImage: DEFAULT_IMAGE,
7678
ogTitle: "Flickr images | Openverse",
77-
robots: NO_INDEX,
79+
robots: INDEX,
7880
},
7981
creator: {
8082
url: "/image/collection?source=flickr&creator=strogoscope",
8183
title: "strogoscope | Openverse",
8284
ogImage: DEFAULT_IMAGE,
8385
ogTitle: "strogoscope | Openverse",
84-
robots: NO_INDEX,
86+
robots: INDEX,
8587
},
8688
}
8789
test.describe("page metadata", () => {

frontend/test/playwright/playwright.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { PRODUCTION } from "~/constants/deploy-env"
2+
13
import type { PlaywrightTestConfig } from "@playwright/test"
24

35
const UPDATE_TAPES = process.env.UPDATE_TAPES || "false"
@@ -28,6 +30,7 @@ const config: PlaywrightTestConfig = {
2830
API_URL,
2931
NUXT_PUBLIC_API_URL: API_URL,
3032
UPDATE_TAPES: UPDATE_TAPES,
33+
DEPLOYMENT_ENV: PRODUCTION,
3134
PW: "true",
3235
},
3336
},

0 commit comments

Comments
 (0)