Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
refactor: merge exclude from search flags (#3765)
Bogdan Chadkin1c3e878ca024
diff --git a/fixtures/webstudio-cloudflare-template/app/routes/_index.tsx b/fixtures/webstudio-cloudflare-template/app/routes/_index.tsxindex ea8c7443e6..4987ac6bde 100644--- a/fixtures/webstudio-cloudflare-template/app/routes/_index.tsx+++ b/fixtures/webstudio-cloudflare-template/app/routes/_index.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",diff --git a/fixtures/webstudio-custom-template/app/routes/[script-test]._index.tsx b/fixtures/webstudio-custom-template/app/routes/[script-test]._index.tsxindex 270e61a673..a8a339ab5b 100644--- a/fixtures/webstudio-custom-template/app/routes/[script-test]._index.tsx+++ b/fixtures/webstudio-custom-template/app/routes/[script-test]._index.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",diff --git a/fixtures/webstudio-custom-template/app/routes/[world]._index.tsx b/fixtures/webstudio-custom-template/app/routes/[world]._index.tsxindex e191181261..0aec9c9eb2 100644--- a/fixtures/webstudio-custom-template/app/routes/[world]._index.tsx+++ b/fixtures/webstudio-custom-template/app/routes/[world]._index.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",diff --git a/fixtures/webstudio-custom-template/app/routes/_index.tsx b/fixtures/webstudio-custom-template/app/routes/_index.tsxindex ea8c7443e6..4987ac6bde 100644--- a/fixtures/webstudio-custom-template/app/routes/_index.tsx+++ b/fixtures/webstudio-custom-template/app/routes/_index.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",diff --git a/fixtures/webstudio-remix-netlify-edge-functions/app/routes/_index.tsx b/fixtures/webstudio-remix-netlify-edge-functions/app/routes/_index.tsxindex ea8c7443e6..4987ac6bde 100644--- a/fixtures/webstudio-remix-netlify-edge-functions/app/routes/_index.tsx+++ b/fixtures/webstudio-remix-netlify-edge-functions/app/routes/_index.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",diff --git a/fixtures/webstudio-remix-netlify-functions/app/routes/_index.tsx b/fixtures/webstudio-remix-netlify-functions/app/routes/_index.tsxindex ea8c7443e6..4987ac6bde 100644--- a/fixtures/webstudio-remix-netlify-functions/app/routes/_index.tsx+++ b/fixtures/webstudio-remix-netlify-functions/app/routes/_index.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",diff --git a/fixtures/webstudio-remix-vercel/app/routes/[_route_with_symbols_]._index.tsx b/fixtures/webstudio-remix-vercel/app/routes/[_route_with_symbols_]._index.tsxindex 0172e0534d..3719c7868a 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[_route_with_symbols_]._index.tsx+++ b/fixtures/webstudio-remix-vercel/app/routes/[_route_with_symbols_]._index.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",diff --git a/fixtures/webstudio-remix-vercel/app/routes/[form]._index.tsx b/fixtures/webstudio-remix-vercel/app/routes/[form]._index.tsxindex b58046d4f3..f9d4ee6ab0 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[form]._index.tsx+++ b/fixtures/webstudio-remix-vercel/app/routes/[form]._index.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",diff --git a/fixtures/webstudio-remix-vercel/app/routes/[heading-with-id]._index.tsx b/fixtures/webstudio-remix-vercel/app/routes/[heading-with-id]._index.tsxindex d91b50ccbc..b6dbae013b 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[heading-with-id]._index.tsx+++ b/fixtures/webstudio-remix-vercel/app/routes/[heading-with-id]._index.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",diff --git a/fixtures/webstudio-remix-vercel/app/routes/[nested].[nested-page]._index.tsx b/fixtures/webstudio-remix-vercel/app/routes/[nested].[nested-page]._index.tsxindex 426b367a98..be58b73e09 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[nested].[nested-page]._index.tsx+++ b/fixtures/webstudio-remix-vercel/app/routes/[nested].[nested-page]._index.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",diff --git a/fixtures/webstudio-remix-vercel/app/routes/[radix]._index.tsx b/fixtures/webstudio-remix-vercel/app/routes/[radix]._index.tsxindex 7b891cbe64..35829b7683 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[radix]._index.tsx+++ b/fixtures/webstudio-remix-vercel/app/routes/[radix]._index.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",diff --git a/fixtures/webstudio-remix-vercel/app/routes/[resources]._index.tsx b/fixtures/webstudio-remix-vercel/app/routes/[resources]._index.tsxindex 1c09cd463b..035fbff60f 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[resources]._index.tsx+++ b/fixtures/webstudio-remix-vercel/app/routes/[resources]._index.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",diff --git a/fixtures/webstudio-remix-vercel/app/routes/_index.tsx b/fixtures/webstudio-remix-vercel/app/routes/_index.tsxindex ea8c7443e6..4987ac6bde 100644--- a/fixtures/webstudio-remix-vercel/app/routes/_index.tsx+++ b/fixtures/webstudio-remix-vercel/app/routes/_index.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",diff --git a/packages/cli/templates/defaults/app/route-templates/html.tsx b/packages/cli/templates/defaults/app/route-templates/html.tsxindex f9fcd888dc..3670483745 100644--- a/packages/cli/templates/defaults/app/route-templates/html.tsx+++ b/packages/cli/templates/defaults/app/route-templates/html.tsx@@ -65,11 +65,14 @@ export const loader = async (arg: LoaderFunctionArgs) => {// typecheckarg.context.EXCLUDE_FROM_SEARCH satisfies boolean;+ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }+return json({host,url: url.href,- excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,system,resources,pageMeta,@@ -133,7 +136,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {});}- if (pageMeta.excludePageFromSearch || data.excludeFromSearch) {+ if (pageMeta.excludePageFromSearch) {metas.push({name: "robots",content: "noindex, nofollow",