Skip to content

Commit 9f48a6f

Browse files
authored
Strip extra levels off page url (#2695)
* Strip extra levels off page url [CORE-708] * Remove broken links from README * 404 if path has extra levels
1 parent 21ee43b commit 9f48a6f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
[![Build Status](https://travis-ci.org/openstax/os-webview.svg?branch=master)](https://travis-ci.org/openstax/os-webview)
1010
[![Code Climate](https://codeclimate.com/github/openstax/os-webview/badges/gpa.svg)](https://codeclimate.com/github/openstax/os-webview)
11-
[![dependency Status](https://david-dm.org/openstax/os-webview.svg)](https://david-dm.org/openstax/os-webview#info=dependencies)
12-
[![devDependency Status](https://david-dm.org/openstax/os-webview/dev-status.svg)](https://david-dm.org/openstax/os-webview#info=devDependencies)
1311

1412
## Requirements
1513

src/app/components/shell/router.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function MainRoutes() {
146146
<Route path="/details/" element={<Navigate to="/subjects" replace />} />
147147
<Route path="/books/:title" element={<RedirectToCanonicalDetailsPage />} />
148148
<Route path="/textbooks/:title" element={<RedirectToCanonicalDetailsPage />} />
149-
<Route path="/subjects-preview/*" element={<ImportedPage name="subjects" />} />
149+
<Route path="/subjects/*" element={<ImportedPage name="subjects" />} />
150150
<Route path="/k12/*" element={<ImportedPage name="k12" />} />
151151
<Route path="/blog/*" element={<ImportedPage name="blog" />} />
152152
<Route path="/webinars/*" element={<ImportedPage name="webinars" />} />
@@ -158,7 +158,8 @@ function MainRoutes() {
158158
path="/edtech-partner-program"
159159
element={<ImportedPage name="/openstax-ally-technology-partner-program" />}
160160
/>
161-
<Route path="/:name/*" element={<TopLevelPage />} />
161+
<Route path="/:name/" element={<TopLevelPage />} />
162+
<Route path="/:name/*" element={<Error404 />} />
162163
<Route element={<h1>Fell through</h1>} />
163164
</Routes>
164165
</Layout>

0 commit comments

Comments
 (0)