Empress is a feature complete static blog starter based on the Gatsby tutorial. So if you finished the Gatsby tutorial and you think Gatsby is great, but you don't want to waste time re-inventing basic features like tags, then this might be the right starter for you.
The goal is a blog for the 21st century that has all the core features of a static blog, without any bloat.
Empress is a fully featured Gatsby blog starter.
- Gatsby 4 (latest major version)
- React 18 (latest major version)
- Tags
- Menus
- Themes
- Pinned posts
- Deployment to S3/CloudFront via GitHub Actions
- Redirects
- Hero banner
- Google Analytics
- BlogPosting schema tags (SEO)
When I tried to set up a Gatsby blog using other starters, I found that I couldn't upgrade to the latest version of major dependencies, such as Gatsby, due to a broken web of dependencies. For this reason I wanted to keep this blog as vanilla as possible.
You can add any libraries that you like.
To use it out-of-the-box as a blog, you need the following things.
- a free GitHub account
- a free AWS account
- knowledge of git and markdown
Fork this repository. Pull to your local computer.
Gatsby now suggests that you use "themes" rather than starters. Empress is also available as a "theme" here: https://github.com/PaulMorel1/gatsby-theme-empress
It's a minimalist gatsby project, so you can run it using the same npm commands you'd use to run any Node.js project.
npm install
npm run dev
To test a production build locally, use the following commands.
npm run build
npm run serve
If you are using the built-in GitHub Actions integration, then just commit your new stuff and push to master on GitHub. Make sure you go through the setup on AWS and GitHub. You must create a public S3 bucket and a CloudFront distribution then save secret keys into your repo settings on GitHub.
Deploy this starter with one click on Gatsby Cloud:
See src\styles\themes\dark.css
for example.
- Copy
dark.css
into a new file. - Update the css file. Add the new rules for your theme. The class name at the top is the name of your theme.
- Modify
src\styles\themes\themes.js
. Add the import for your new theme. - Modify
gatsby-config.js
. UpdatesiteMetadata.theme
to match your new theme name. So if your theme name ismarks-dark-theme
then you should set theme tomarks-dark-theme
.
- Set
headerType
tohero
ingatsby-config.js
. - Then set the fields
desktopHeroImage
andmobileHeroImage
to the filenames of the images in/static/images
.
- Update the
trackingIds
field ingatsby-config.js
. You must have signed up for Google Analytics already. Like everything else in an Empress Blog, it is free.
I'm trying for the fewest dependencies possible here. NPM is a requirement. Yarn would be an additional package. Add yarn to your own fork if you like.
CC BY-NC 3.0: https://creativecommons.org/licenses/by-nc/3.0/