1
1
const zennBlogUrl = ( ) => "https://zenn.dev/p/wed_engineering" ;
2
- const zennArticleUrl = ( slug ) =>
3
- new URL ( slug , "https://zenn.dev/wed_engineering/articles/" ) . toString ( ) ;
2
+ const zennArticleUrl = ( slug ) => new URL ( slug , "https://zenn.dev/wed_engineering/articles/" ) . toString ( ) ;
4
3
5
4
const redirects = {
6
5
// "" => zennBlogUrl(),
7
6
// "2018-19-tech-timeline": zennArticleUrl(""),
8
7
// "2020-tech-timeline": zennArticleUrl(""),
9
8
// "2023-gig": zennArticleUrl(""),
10
9
// "20231116-log-analytics-using-ai": zennArticleUrl(""),
11
- "20231121-executor-meets-gcsfuse" : zennArticleUrl (
12
- "20231121-executor-meets-gcsfuse" ,
13
- ) ,
10
+ "20231121-executor-meets-gcsfuse" : zennArticleUrl ( "20231121-executor-meets-gcsfuse" ) ,
14
11
"20231128-ruby-wasm" : zennArticleUrl ( "use-ruby-wasm-hook" ) ,
15
12
// "20231222-my-3month-internship-record": zennArticleUrl(""),
16
13
"20240127-unoptimized-next-image" : zennArticleUrl ( "next-image-unoptimized" ) ,
@@ -28,13 +25,12 @@ const redirects = {
28
25
// "neovim-clean-config": zennArticleUrl(""),
29
26
// "neovim-like-a-vscode": zennArticleUrl(""),
30
27
"start-CloudComposer" : zennArticleUrl ( "ebdd6858394baf" ) ,
31
- // "wed-front-frameworks-2021": zennArticleUrl(""1 ),
28
+ // "wed-front-frameworks-2021": zennArticleUrl(""),
32
29
} ;
33
30
34
31
export default defineNuxtRouteMiddleware ( ( to ) => {
35
32
const path = to . path . replace ( / ^ \/ | \/ ? $ / g, "" ) ;
36
33
const url = redirects [ path ] ;
37
34
38
- if ( url !== undefined )
39
- return navigateTo ( url , { external : true , redirectCode : 301 } ) ;
35
+ if ( url !== undefined ) return navigateTo ( url , { external : true , redirectCode : 301 } ) ;
40
36
} ) ;
0 commit comments