Skip to content

Where I blog about technology, my personal life, tools that I've built and many more 🤓

License

Notifications You must be signed in to change notification settings

willianantunes/willianantunes.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My honest personal website

Netlify Status

At the beginning of 2021, I created a project called Rave of Phonetics, and you can know how I had the idea through the blog post public and useful tool to understand phonetics. With all the lessons learned I gathered from it, I thought it was time to create my very blog from scratch to discover even more things. That's how it came to life! Curiosity as always 👀

I think this couldn't have been possible without the following projects:

Hence here's my thanks! I am thankful for people that share stuff with the community 🤓

Running the project

Just issue the command docker-compose up. It will build the image and run it for you afterwards. If you have an OAuth Provider configured on Netlify, you can even access the admin page. Accessible links:

If you'd like to run it without docker, first install the packages:

npm install

Then you can just issue npm run develop, but let's say that you want to build it, for that execute the following:

GOOGLE_TAG_MANAGER_ID=YOUR_GTM_ID \
SITE_URL=http://localhost:9000/ \
NETLIFY_CMS_BACKEND_REPO=YOUR_REPO \
NETLIFY_CMS_BACKEND_BRANCH=YOUR_BRANCH \
npm run build

Now you can serve it through gatsby (not recommended for production, just as a means to evaluate what was built):

GOOGLE_TAG_MANAGER_ID=YOUR_GTM_ID \
SITE_URL=http://localhost:9000/ \
NETLIFY_CMS_BACKEND_REPO=YOUR_REPO \
NETLIFY_CMS_BACKEND_BRANCH=YOUR_BRANCH \
npm run serve

Sadly, even when serving the generated static files, gatsby reads gatsby-config.js, that's why you need to set the environment variables.

Netlify CMS locally

You need to run npm run cms and npm run develop, then you can use the CMS locally without the need of doing OAuth flow.

Consulting public folder after build through Docker

First access the container:

docker-compose run blog bash

Then you can issue ls -l public! gatsby-plugin-netlify generates _headers file for Netlify Platform. You can consult it issuing cat public/_headers.

I want to use your project. How do I use this template?

That is quite simple. Just follow the bullets:

  • You need to change siteMetadata const with you own data (see the file gatsby-config.js).
  • To run locally properly, update .env.development as well.
  • Delete the content of content/blog folder and create your own very post.

That's it!