File tree Expand file tree Collapse file tree 9 files changed +1614
-1417
lines changed
Expand file tree Collapse file tree 9 files changed +1614
-1417
lines changed Original file line number Diff line number Diff line change 1- import 'normalize.css' ;
21import "@fontsource/open-sans" ;
2+ import 'normalize.css' ;
33import './src/stylesheets/global.scss' ;
4- import './src/stylesheets/scales/space.scss' ;
5- import './src/stylesheets/scales/type.scss' ;
4+ import ReactDOM from "react-dom/client"
65
76// Reload the page when updates are found so that new changes are
87// visible without manual page refresh.
98export const onServiceWorkerUpdateReady = ( ) => window . location . reload ( ) ;
9+
10+ export const replaceHydrateFunction = ( ) => {
11+ return ( element , container ) => {
12+ const root = ReactDOM . createRoot ( container )
13+ root . render ( element )
14+ }
15+ }
Original file line number Diff line number Diff line change @@ -199,6 +199,63 @@ const config: GatsbyConfig = {
199199 } ) ) ,
200200 } ,
201201 } ,
202+ {
203+ resolve : "gatsby-plugin-feed" ,
204+ options : {
205+ query : `
206+ {
207+ site {
208+ siteMetadata {
209+ title
210+ description
211+ siteUrl
212+ site_url: siteUrl
213+ }
214+ }
215+ }
216+ ` ,
217+ feeds : [
218+ {
219+ serialize : ( { query : { site, allMdx } } ) => {
220+ return allMdx . edges . map ( edge => {
221+
222+ const siteUrl = site . siteMetadata . siteUrl
223+ const slug = siteUrl + edge . node . fields . slug
224+
225+ return Object . assign ( { } , edge . node . frontmatter , {
226+ url : slug ,
227+ guid : slug ,
228+ custom_elements : [
229+ { "content:encoded" : edge . node . excerpt }
230+ ] ,
231+ } )
232+ } )
233+ } ,
234+ query : `
235+ {
236+ allMdx(sort: {frontmatter: {date: DESC}}) {
237+ edges {
238+ node {
239+ excerpt(pruneLength: 340)
240+ fields {
241+ slug
242+ }
243+ frontmatter {
244+ title
245+ description
246+ date
247+ }
248+ }
249+ }
250+ }
251+ }
252+ ` ,
253+ output : "/rss.xml" ,
254+ title : "Rishi's Blog - rishikc.com" ,
255+ } ,
256+ ]
257+ }
258+ } ,
202259 "gatsby-plugin-image" ,
203260 "gatsby-plugin-sharp" ,
204261 "gatsby-transformer-sharp" ,
Original file line number Diff line number Diff line change 3737 "gatsby-plugin-canonical-urls" : " ^5.10.0" ,
3838 "gatsby-plugin-dark-mode" : " ^1.1.2" ,
3939 "gatsby-plugin-disqus" : " ^1.2.6" ,
40+ "gatsby-plugin-feed" : " ^5.11.0" ,
4041 "gatsby-plugin-image" : " ^3.10.0" ,
4142 "gatsby-plugin-local-search" : " ^2.0.1" ,
4243 "gatsby-plugin-manifest" : " ^5.10.0" ,
8081 "tailwindcss" : " ^3.3.2" ,
8182 "typescript" : " ^5.0.4"
8283 }
83- }
84+ }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ type Props = {
88} ;
99
1010const Card = ( { data } : Props ) => {
11- const image = getImage ( data . node . localFile ) ;
11+ const image = getImage ( data . node . localImage ) ;
1212
1313 return (
1414 < div className = "inline-flex w-full items-stretch cursor-pointer aspect-square instagram-gallery-image-wrapper" >
Original file line number Diff line number Diff line change @@ -17,10 +17,16 @@ const useInstagramNodes = () => {
1717 edges {
1818 node {
1919 id
20- caption
21- localFile {
20+ localImage {
21+ id
2222 childImageSharp {
23- gatsbyImageData(placeholder: BLURRED, width: 250)
23+ gatsbyImageData(
24+ aspectRatio: 1
25+ transformOptions: { cropFocus: CENTER }
26+ width: 200
27+ formats: [WEBP]
28+ placeholder: DOMINANT_COLOR
29+ )
2430 }
2531 }
2632 }
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ const NotFoundPage: React.FC<PageProps> = () => (
1515 imgStyle = { { objectFit : "contain" } }
1616 src = "../../static/assets/404.png"
1717 alt = "404image"
18+ formats = { [ "webp" ] }
19+ placeholder = "tracedSVG"
1820 />
1921 < main className = "dark:text-gray-200 grid place-items-center px-6 lg:px-8" >
2022 < div className = "text-center" >
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ const IndexPage: React.FC<PageProps> = () => {
4343 < StaticImage
4444 src = "../../static/assets/handsome-guy.webp"
4545 alt = "handsome"
46+ formats = { [ "webp" ] }
47+ placeholder = "tracedSVG"
4648 />
4749 </ div >
4850 </ div >
Original file line number Diff line number Diff line change 22@tailwind components;
33@tailwind utilities;
44@import " colors.scss" ;
5-
6- :root {
7- --fontsource-display : swap ;
8- }
5+ @import " ./scales/space.scss" ;
6+ @import " ./scales/type.scss" ;
97
108body {
119 font-family : " Open Sans" , sans-serif ;
You can’t perform that action at this time.
0 commit comments