File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 4141 run : npm run build
4242 env :
4343 VITE_SUPPORT_EMAIL : ${{ secrets.SUPPORT_EMAIL }}
44+ VITE_CUSTOM_HTML_TAGS : ${{ secrets.CUSTOM_HTML_TAGS }}
4445 - name : Setup Pages
4546 uses : actions/configure-pages@v5
4647 - name : Upload artifact
Original file line number Diff line number Diff line change 1818 < title > GaliGuessr - Quiz de xeografía de Galicia</ title >
1919 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
2020 < meta name ="description " content ="Quiz de xeografía de Galicia ">
21+ <!-- INJECT_CUSTOM_TAGS -->
2122</ head >
2223
2324< body >
Original file line number Diff line number Diff line change @@ -14,7 +14,16 @@ export default defineConfig(({ mode }) => {
1414 const env = loadEnv ( mode , process . cwd ( ) , "VITE_" ) ;
1515
1616 return {
17- plugins : [ react ( ) ] ,
17+ plugins : [
18+ react ( ) ,
19+ {
20+ name : "custom-html-tags-injector" ,
21+ transformIndexHtml ( html ) {
22+ const tags = env . VITE_CUSTOM_HTML_TAGS || "" ;
23+ return html . replace ( "<!-- INJECT_CUSTOM_TAGS -->" , tags ) ;
24+ }
25+ }
26+ ] ,
1827 base : "/galiguessr/" ,
1928 define : {
2029 "process.env" : {
You can’t perform that action at this time.
0 commit comments