Skip to content

Commit

Permalink
Move plausible replace to HTML generation task
Browse files Browse the repository at this point in the history
  • Loading branch information
vgeorge committed Mar 26, 2024
1 parent de4b401 commit 9b5182c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ function serve() {
},
{ match: /{{appTitle}}/g, replace: appTitle },
{ match: /{{appDescription}}/g, replace: appDescription },
{
match: /{{plausibleDomain}}/g,
replace: process.env.NODE_ENV === 'production' ? plausibleDomain : '',
},
],
});

Expand Down Expand Up @@ -246,6 +242,12 @@ function html() {
.pipe($.replace('{{baseurl}}', baseurl))
.pipe($.replace('{{appTitle}}', appTitle))
.pipe($.replace('{{appDescription}}', appDescription))
.pipe(
$.replace(
'{{plausibleDomain}}',
process.env.NODE_ENV === 'production' ? plausibleDomain : ''
)
)
.pipe(gulp.dest('dist'))
);
}
Expand Down

0 comments on commit 9b5182c

Please sign in to comment.