This is the repository for my blog at eyalroth.com, containing both the code and content of the website.
It is built with GatsbyJS, based on the starter site Lumen 2, and hosted on Netlify.
sitemap.xml
and robots.txt
.encodeURI
doesn't work properly in Gatsby.featuredImage
metadata field, otherwise post pages will fail to compile.
See this Gatsby issue for more information.The site is built with Gatsby which provides both a local development server (gatsby develop
) and local serving capabilities (gatsby build && gatsby serve
).
It should be possible to develop on any OS; I myself have been developing this site using WSL on Windows 10.
The site is not only hosted on Netlify, but is also built and deployed via Netlify's CI / CD, which is connected directly to this repository and uses Gatsby's tools to build the site.
The site uses several environment variables during its build process:
URL
- the site's URL.GOOGLE_ANALYTICS
- the Google Analytics site ID.UTTERANCES_REPO
- the path (not entire URL) of the GitHub repository containing the utteranc.es comments / issues (it is useful to use one for development purposes and one for production).AUTO_RELOAD
- determines whether the service worker should automatically reload the browser's page upon detecting site updates; if set to false
, the site will prompt a window asking the user for permission to reload the site (useful when testing a staging site and wanting to make sure updates have been deployed and served locally).Note the .env.development
file which sets these variables for development mode (gatsby develop
). There is no such file for "production" mode (gatsby build
) and they have to be set manually (via export
).
Also note the netlify.toml
file which configures some of these variables on Netlify CI (URL
is automatically set by Netlify).
The site is compatible with all modern browsers. It is not compatible with Internet Explorer (the site will not load and instead will display a message saying just that).
There are no automatic tests for the site.
It was manually tested by me and mostly on:
It was also partially tested on:
It was not tested on any Apple product (Mac / iPad / iPhone) as I do not own any of these.
Language prefixes are either en
(English) or he
(Hebrew).
/{lang}
- home page for each language./
redirects to /en
./{lang}/blog/{year}/{month}/{name}
- blog post page. These links are intended to never change; hence, a permalink./{lang}/blog/{category}
- post list page for every language's category./{lang}/blog/series/{series-name}
- post series list page. /blog
redirects to the main English category page./{lang}/about
- about page for each language./about
redirects to the main English about page./404
- 404 Page./{lang}/rss.xml
- RSS feed for each language./rss.xml
redirects to /en/rss.xml
.The design and structure of this site draw much inspiration from many other sites out there, so here's a shout-out to them:
The content of this project itself is licensed under the Creative Commons Attribution 4.0 International license, and the underlying source code used to format and display that content is licensed under the MIT license.