File tree Expand file tree Collapse file tree 3 files changed +29
-12
lines changed Expand file tree Collapse file tree 3 files changed +29
-12
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,10 @@ import {
99import menuData from '@dvcorg/gatsby-theme/src/data/menu'
1010import { logEvent } from '@dvcorg/gatsby-theme/src/utils/front/plausible'
1111
12+ import { ReactComponent as MailIcon } from '../../../../../static/img/community/icon-mail.svg'
1213import HamburgerIcon from '../HamburgerIcon'
1314import Link from '../Link'
15+ import { ReactComponent as DiscordSVG } from '../SocialIcon/discord.svg'
1416import { ReactComponent as GithubIcon } from '../SocialIcon/github.svg'
1517import { ReactComponent as TwitterIcon } from '../SocialIcon/twitter.svg'
1618
@@ -154,11 +156,7 @@ export const HamburgerMenu: React.FC<
154156 target = "_blank"
155157 onClick = { ( ) => handleItemClick ( 'mail' ) }
156158 >
157- < img
158- className = { styles . subSectionLinkImage }
159- src = "/img/community/icon-mail.svg"
160- alt = ""
161- />
159+ < MailIcon className = { styles . subSectionLinkImage } />
162160 < span className = { styles . subSectionLinkTitle } > E-Mail</ span >
163161 </ Link >
164162 </ li >
@@ -180,11 +178,7 @@ export const HamburgerMenu: React.FC<
180178 onClick = { ( ) => handleItemClick ( 'chat' ) }
181179 target = "_blank"
182180 >
183- < img
184- className = { styles . subSectionLinkImage }
185- src = "/img/community/icon-discord.svg"
186- alt = ""
187- />
181+ < DiscordSVG className = { styles . subSectionLinkImage } />
188182 < span className = { styles . subSectionLinkTitle } > Discord</ span >
189183 </ Link >
190184 </ li >
Original file line number Diff line number Diff line change @@ -8,5 +8,4 @@ ln -s $NEWPWD $OLDPWD
88cd $NEWPWD
99yarn build
1010rm -rf static .cache
11- # Copy the 404 HTML file from public into the root dir for Heroku
1211./scripts/clear-cloudfront-cache.js
Original file line number Diff line number Diff line change @@ -84,12 +84,36 @@ app.use(
8484)
8585app . use ( helmet ( helmetOptions ) )
8686
87+ const mustRevalidate = 'public, max-age=0, must-revalidate'
88+ const cacheForever = 'public, max-age=31536000, immutable'
8789const serveMiddleware = async ( req , res ) => {
8890 await serveHandler ( req , res , {
8991 public : 'public' ,
9092 cleanUrls : true ,
9193 trailingSlash : false ,
92- directoryListing : false
94+ directoryListing : false ,
95+ headers : [
96+ {
97+ source : '**/*.html' ,
98+ headers : [ { key : 'Cache-Control' , value : mustRevalidate } ]
99+ } ,
100+ {
101+ source : 'page-data/**' ,
102+ headers : [ { key : 'Cache-Control' , value : mustRevalidate } ]
103+ } ,
104+ {
105+ source : 'static/**' ,
106+ headers : [ { key : 'Cache-Control' , value : cacheForever } ]
107+ } ,
108+ {
109+ source : '**/*.@(css|js)' ,
110+ headers : [ { key : 'Cache-Control' , value : cacheForever } ]
111+ } ,
112+ {
113+ source : '**/*.@(jpg|jpeg|gif|png|svg)' ,
114+ headers : [ { key : 'Cache-Control' , value : 'max-age=86400' } ]
115+ }
116+ ]
93117 } )
94118}
95119app . use ( serveMiddleware )
You can’t perform that action at this time.
0 commit comments