File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!doctype html>
2
+ < html >
3
+ < head >
4
+ < title > 404 Page Not Found</ title >
5
+ < script src ="/en-US/_spas/404.js "> </ script >
6
+ </ head >
7
+ < body >
8
+ < h1 > 404 Page Not Found</ h1 >
9
+ </ body >
10
+ </ html >
Original file line number Diff line number Diff line change
1
+ window . addEventListener ( "DOMContentLoaded" , ( ) => {
2
+ if ( document . location . hostname . endsWith ( "content.dev.mdn.mozit.cloud" ) ) {
3
+ const link = document . createElement ( "a" ) ;
4
+ link . href = `https://developer.mozilla.org${ location . pathname } ` ;
5
+ link . textContent = "View on MDN production server" ;
6
+ document . body . appendChild ( link ) ;
7
+ }
8
+ } ) ;
Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ jobs:
105
105
# Save the PR number into the build
106
106
echo ${{ github.event.number }} > ${BUILD_OUT_ROOT}/NR
107
107
108
+ # Add the custom 404 page to provide production links to the unbuilt documents
109
+ mkdir -p ${BUILD_OUT_ROOT}/en-us/_spas/
110
+ cp -v ./.github/workflows/404.html ${BUILD_OUT_ROOT}/en-us/_spas/404.html
111
+ cp -v ./.github/workflows/404.js ${BUILD_OUT_ROOT}/en-us/_spas/404.js
112
+
108
113
# Download the raw diff blob and store that inside the build
109
114
# directory.
110
115
# The purpose of this is for the PR Review Companion to later
You can’t perform that action at this time.
0 commit comments