What’s new in GitHub Pages with Jekyll 3.3
GitHub Pages has upgraded to Jekyll 3.3.0, a release with some nice quality-of-life features. First, Jekyll 3.3 introduces two new convenience filters, relative_url and absolute_url. They provide an easy way…
GitHub Pages has upgraded to Jekyll 3.3.0, a release with some nice quality-of-life features.
First, Jekyll 3.3 introduces two new convenience filters, relative_url
and absolute_url
. They provide an easy way to ensure that your site’s URLs will always appear correctly, regardless of where or how your site is viewed. To make it easier to use these two new filters, GitHub Pages now automatically sets the site.url
and site.baseurl
properties, if they’re not already set.
This means that starting today {% raw %}https://blog.github.com/about/{% endraw %}
will produce /repository-name/about/
for Project Pages (and /about/
for User Pages). Additionally, {% raw %}{{ "/about/" | absolute_url }}{% endraw %}
will produce https://baxterthehacker.github.io/repository-name/about/
for Project Pages (and https://baxterthehacker.github.io/about/
for User Pages or http://example.com/about/
if you have a custom domain set up).
Second, with Jekyll 3.3, when you run jekyll serve
in development, it will override your url value with http://localhost:4000. No more confusion when your locally-modified CSS isn’t loading because the URL is set to the production site. Additionally, site.url
and absolute_url
will now yield http://localhost:4000 when running a server locally.
Finally, to make it easier to vendor third-party dependencies via package managers like Bundler or NPM (or Yarn), Jekyll now ignores the vendor
and node_modules
directories by default, speeding up build times and avoiding potential errors. If you need those directories included in your site, set exclude: []
in your site’s configuration file.
For more information, see the Jekyll changelog and if you have any questions, please let us know.
Happy publishing!
Written by
Related posts
GitHub Availability Report: November 2024
In November, we experienced one incident that resulted in degraded performance across GitHub services.
The top 10 gifts for the developer in your life
Whether you’re hunting for the perfect gift for your significant other, the colleague you drew in the office gift exchange, or maybe (just maybe) even for yourself, we’ve got you covered with our top 10 gifts that any developer would love.
Congratulations to the winners of the 2024 Gaady Awards
The Gaady Awards are like the Emmy Awards for the field of digital accessibility. And, just like the Emmys, the Gaadys are a reason to celebrate! On November 21, GitHub was honored to roll out the red carpet for the accessibility community at our San Francisco headquarters.