Have a peek »»» https://www.attejuvonen.fi
You are free to use this repo to create your own blog (code is MIT licensed). You may also use the written content in this blog however you like, provided that you give appropriate credit (CC BY 4.0).
nvmto switch between Node versions. This project is confirmed to work with v12.16.3.
gatsby develop. First run will take several minutes, but subsequent runs will be faster.
gatsby build && gatsby serve(or
./fastbuild.sh). If you want to delete
publicbefore building, use
./slowbuild.sh(recommended for releases to avoid leaking development data). You may have to make the scripts executable before you are able to run them (
chmod +x filename).
static/preview.jpg(this is the image that is used when someone shares a link to your blog on a social network like Reddit). Recommended aspect ratio is 1.91.
static/_headersis fine and you just need to edit 1 line in
npm run generate-app-icons, then replace
.envfile. It's good practice to keep it in
.gitignoreso it doesn't get published to the repo. When you publish your website, find out how you can add environment variables to your host without publishing the
.envfile. If you are wondering why environment variables are used, it is to prevent people from accidentally spamming (for example, people who forked this repo used to test the contact page by sending me messages like dffdsffdsfd).
PLAUSIBLE_DOMAIN=mywebsite.comto environment variables. Note that this variable is also used for OpenGraph (social sharing) tags, so if you don't set this variable, you need to fix the OpenGraph pathing.
Subscribepage. Remove it or set up a newsletter and add the URL as an environment variable
CONTACT_POST_ADDRESS. I'm using Google Script to handle form submissions. If you also want to use Google Script, instructions are here and here is an improved version of the script.
postsfolders. By default only mock posts are used (to help you tweak the website before you have a lot of content). You can switch to real posts by creating an environment variable
POSTS_FOLDER=posts. Please try not to accidentally repost my real posts if you are only tinkering.
2020-03-05--my-book-reviewwill be published, whereas a name like
my-book-reviewwill be considered a draft and will not be published. There are ways to accidentally publish drafts. If you are worried about that, the easiest way to avoid it is to deploy your site from GitHub via Netlify and never commit draft posts to the repo.
Hi, I'm Baobab. I didn't do everything by myself; I leveraged the work of many awesome creators.