Attention
Possibly outdated
To make your site stand out from the default, you have to make some custom changes.
Just to let the world know, “You have started”
After migration, these are the first set of custom changes, i had made to the gatsby-starter-minimal-blog. In GatsbyJS, there are two types of custom changes shadowing and non-shadowing. Non-Shadowing is the NOT recommended one as it involves making changes to files in node_modules
folder. So if you ugrade say like npm install
. It will get overwritten. Lets see both of them one by one.
Non-shadowing
Shadowing is a neat concept in Gatsby. Here there are some rules, but they are not GatsbyJS rules but they are rules by LekoArts(theme makers). Basically you are allowed to override only certain folders and files.
This feature allows users to replace a file in the src directory that is included in the webpack bundle with their own implementation. This works for React components, pages in src/pages, JSON files, TypeScript files, as well as any other imported file (such as .css) in your site.
**Note : ** You cannot override gatsby-theme-minimal-blog-core folder
gatsby-starter-minimal-blog\node_modules\@lekoarts\gatsby-theme-minimal-blog-core\src
- Increasing number of posts list in home page
Shadowing
All this starts with creating a folder called ‘src’ and after that create the below sub-folders.
- From src@lekoarts\gatsby-theme-minimal-blog, copy folders
components, hooks, styles, texts, gatsby-plugin-theme-ui
andutils
fromgatsby-starter-minimal-blog\node_modules\@lekoarts\gatsby-theme-minimal-blog\src
- src\pages should contain two files seo.js and 404.js otherwise there will be an error.
Here are the first set of updates,
-
Spacing updates ( reducing space between two elements )
-
Home page : Reducing the space between Latest posts and Home projects
gatsby-starter-minimal-blog\src\@lekoarts\gatsby-theme-minimal-blog\components\listing.tsx
-
Home page : Reduce space between Hi and the message below it
gatsby-starter-minimal-blog\src\@lekoarts\gatsby-theme-minimal-blog\components\homepage.tsx
-
Home page : Enabling tags in Latest posts
-
Home page : More space between multiple sections in the bottom
gatsby-starter-minimal-blog\src\@lekoarts\gatsby-theme-minimal-blog\components\list.tsx
-
Blog page : Reducing the space between Header and “Blog” title
gatsby-starter-minimal-blog\src\@lekoarts\gatsby-theme-minimal-blog\components\header.tsx
-
Blog page : “Blog” heading size
gatsby-starter-minimal-blog\src\@lekoarts\gatsby-theme-minimal-blog\components\blog.tsx
-
Blog page : Updated space between “Blog” title and list items
-
-
Code block font size updates
Path : src\@lekoarts\gatsby-theme-minimal-blog\styles\code.ts
From : Default size
To : Bit smaller. There is no decimal sizes like .7 or 1.5
From : Inline code tag background, orginally it was almost white color
To : Now a bit darker color
- Blog page title sizes
Path : gatsby-starter-minimal-blog\src\@lekoarts\gatsby-theme-minimal-blog\components\post.tsx
- About_me, T.I.L, music, iRevere title sizes
Path : gatsby-starter-minimal-blog\src\@lekoarts\gatsby-theme-minimal-blog\components\page.tsx
- Themes
Path : gatsby-starter-minimal-blog\src\@lekoarts\gatsby-theme-minimal-blog\gatsby-plugin-theme-ui\index.js
Under colors:{ /** Add this ** / }
- HR(horizontal rule) or dividers
Path : gatsby-starter-minimal-blog\src\@lekoarts\gatsby-theme-minimal-blog\gatsby-plugin-theme-ui\index.js
Under styles
All the above changes will get the primary look get better. Atleast to me.