File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 < meta name ="theme-color " content ="#673AB8 ">
1010 < link rel ="alternate " type ="application/rss+xml " href ="https://preactjs.com/feed.xml ">
1111 < link rel ="alternate " type ="application/atom+xml " href ="https://preactjs.com/feed.atom ">
12- < meta property ="og:image " content ="%DEPLOY_URL %/og-image.png ">
12+ < meta property ="og:image " content ="%NETLIFY_DEPLOY_URL %/og-image.png ">
1313 < meta name ="twitter:card " content ="summary ">
1414 < link href ="https://cdn.jsdelivr.net " rel ="preconnect " crossorigin ="anonymous ">
1515 </ head >
Original file line number Diff line number Diff line change @@ -45,6 +45,14 @@ export function netlifyPlugin() {
4545 } ,
4646 configurePreviewServer ( server ) {
4747 server . middlewares . use ( netlifyFunctionMiddleware ) ;
48+ } ,
49+ // Vite only accesses env vars prepeneded with 'VITE_', so this
50+ // is the simplest way to access Netlify's env vars.
51+ transformIndexHtml ( html ) {
52+ return html . replace (
53+ '%NETLIFY_DEPLOY_URL%' ,
54+ process . env . DEPLOY_URL || ''
55+ ) ;
4856 }
4957 } ;
5058}
You can’t perform that action at this time.
0 commit comments