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

v3 - remove redirect support #773

Merged
merged 3 commits into from
Oct 14, 2024
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
5 changes: 0 additions & 5 deletions src/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import { NextRequest } from "next/server";

import { languageMiddleware } from "./middlewares/languageMiddleware";
import { redirectMiddleware } from "./middlewares/redirectMiddleware";

export async function middleware(request: NextRequest) {
const response = await redirectMiddleware(request);
if (response !== undefined) {
return response;
}
return languageMiddleware(request);
}

Expand Down
46 changes: 0 additions & 46 deletions src/middlewares/redirectMiddleware.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/utils/http.ts

This file was deleted.

6 changes: 0 additions & 6 deletions studio/deskStructure.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
CaseIcon,
CogIcon,
DoubleChevronRightIcon,
EarthGlobeIcon,
HeartIcon,
ImagesIcon,
Expand All @@ -24,7 +23,6 @@ import { compensationsId } from "./schemas/documents/compensations";
import { languageSettingsID } from "./schemas/documents/languageSettings";
import { pageBuilderID } from "./schemas/documents/pageBuilder";
import { brandAssetsID } from "./schemas/documents/siteSettings/brandAssets";
import { brokenLinkID } from "./schemas/documents/siteSettings/brokenLink";
import { localeID } from "./schemas/documents/siteSettings/locale";
import { soMeLinksID } from "./schemas/documents/siteSettings/socialMediaProfiles";
import { customerCasesPageID } from "./schemas/documents/specialPages/customerCasesPage";
Expand Down Expand Up @@ -122,10 +120,6 @@ const siteSettingSection = (S: StructureBuilder) =>
.documentId(defaultSeoID)
.title("Default SEO"),
),
S.listItem()
.title("Broken Links")
.icon(DoubleChevronRightIcon)
.child(S.documentTypeList(brokenLinkID).title("Redirects")),
]),
);

Expand Down
3 changes: 0 additions & 3 deletions studio/lib/interfaces/redirect.ts

This file was deleted.

10 changes: 0 additions & 10 deletions studio/lib/queries/redirects.ts

This file was deleted.

2 changes: 0 additions & 2 deletions studio/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import compensations from "./schemas/documents/compensations";
import languageSettings from "./schemas/documents/languageSettings";
import pageBuilder from "./schemas/documents/pageBuilder";
import brandAssets from "./schemas/documents/siteSettings/brandAssets";
import brokenLink from "./schemas/documents/siteSettings/brokenLink";
import locale from "./schemas/documents/siteSettings/locale";
import navigationManager from "./schemas/documents/siteSettings/navigationManager";
import socialMediaLinks from "./schemas/documents/siteSettings/socialMediaProfiles";
Expand All @@ -34,7 +33,6 @@ export const schema: { types: SchemaTypeDefinition[] } = {
legalDocument,
compensations,
customerCasesPage,
brokenLink,
benefitsByLocation,
companyLocation,
defaultSeo,
Expand Down
135 changes: 0 additions & 135 deletions studio/schemas/documents/siteSettings/brokenLink.ts

This file was deleted.

3 changes: 1 addition & 2 deletions studio/schemas/schemaTypes/slug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ function createSlugField(source: string) {
description:
"Enter a unique URL path for the page. This path will be used in the website's address bar. " +
"A URL path, also known as a slug, is a URL-friendly version of the page title, used to create " +
"a human-readable and search engine optimized URL for the content. " +
"Note that the slug can not be changed after publication, but alternative slugs can be defined via Redirects.",
"a human-readable and search engine optimized URL for the content. ",
options: {
source,
maxLength: SLUG_MAX_LENGTH,
Expand Down