Skip to content

Commit

Permalink
Add backend/ pages to subpage handling (withastro#4170)
Browse files Browse the repository at this point in the history
Co-authored-by: Elian ☕️ <[email protected]>
  • Loading branch information
yanthomasdev and ElianCodes authored Aug 11, 2023
1 parent e5eb648 commit f1999a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/isSubPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { getPageCategory } from './getPageCategory';
/** Remove the sub-page segment of a URL string */
export function removeSubPageSegment(path: string) {
// Include new pages with sub-pages as part of this regex.
const regex = /(?:install|deploy|integrations-guide|tutorial|migrate-to-astro|recipes|cms)\//;
const regex =
/(?:install|deploy|integrations-guide|tutorial|migrate-to-astro|recipes|cms|backend)\//;
const matches = regex.exec(path);

if (matches) {
Expand Down

0 comments on commit f1999a3

Please sign in to comment.