File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,12 @@ const withNextra = require("nextra")({
10
10
} ) ;
11
11
12
12
function parseRedirectPartsFromFile ( filecontent ) {
13
- return filecontent . trim ( ) . split ( `\n` ) . map ( ( line , idx ) => {
13
+ const rawRedirects = filecontent
14
+ . split ( `\n` )
15
+ . filter ( ( line ) => line . trim ( ) !== `` ) // Ignore empty lines
16
+ . filter ( ( line ) => ! line . startsWith ( `#` ) ) ; // Ignore comments
17
+
18
+ return rawRedirects . map ( ( line , idx ) => {
14
19
const parts = line . split ( ` ` ) ;
15
20
if ( parts . length !== 2 ) {
16
21
throw Error (
Original file line number Diff line number Diff line change
1
+ # Top Level Redirects. (No Sorting. Place with intention)
1
2
https://help.mixpanel.com/ /
3
+ https://help.mixpanel.com/hc/en-us /
2
4
https://help.mixpanel.com/docs/search /docs/getting-started/what-is-mixpanel
5
+ https://help.mixpanel.com/:path(docs.*) /:path
3
6
https://help.mixpanel.com/hc docs/getting-started/what-is-mixpanel
4
7
https://help.mixpanel.com/hc/admin/general_settings /docs/admin/organizations-projects
5
- https://help.mixpanel.com/hc/en-us /
8
+
9
+ # send support attachments back to original source
10
+ https://help.mixpanel.com/:zendesk_attachment(attachments/token/.*) https://mixpanelsupport.zendesk.com/:zendesk_attachment
11
+
12
+ # Help Center - Content Redirects (Sort Alphabetically)
6
13
https://help.mixpanel.com/hc/en-us/articles/10147279357076(.*) /docs/tracking/how-tos/debugging#data-discrepancies
7
14
https://help.mixpanel.com/hc/en-us/articles/10503460589972(.*) /changelogs
8
15
https://help.mixpanel.com/hc/en-us/articles/10997736335892(.*) https://github.com/mixpanel/mixpanel-js/blob/master/doc/readme.io/javascript-full-api-reference.md#mixpaneltime_event
You can’t perform that action at this time.
0 commit comments