GitHub

Upgrading to Jekyll 4

Jekyll 4.0 is out in the world, and brings upon many improvements over 3.x.

Notably, your site should build much faster now thanks to super-powered caching and content transformations. You can see a full list of changes here.

While GitHub Pages is still pinned to Jekyll 3.8.x, it’s possible to start using Jekyll 4 today with a little help from Siteleaf.

Check out our upgrade guide to get started:
Upgrading from Jekyll 3.x to 4.x

Here’s to speedy rendering! 🍃

Introducing remote themes

Some exciting news! GitHub Pages has announced support for loading remote themes from any GitHub-hosted repository. This is also supported on Siteleaf as of today, whether you publish to GitHub or anywhere else.

Remote themes are similar to Gem-based themes, but do not require Gemfile changes or whitelisting. This means you can now use any of the hundreds of community-curated themes available on GitHub.com, or create your own without having to publish a Gem.

Jekyll themes package layouts, includes, and stylesheets in a way that can be overridden by your site’s content. It’s a great way to maintain a separation of content and code, and makes it possible to share themes across multiple sites.

Preberi več →

See you at GitHub Universe

Next week the Siteleaf team is heading west for the GitHub Universe conference, October 11th and 12th in San Francisco.

If you are attending the conference or in the nearby area, hit us up! We’d love to meet up and chat with as many Siteleaf users as possible.

A few talks we’re excited to see at GitHub Universe:

  • Real-time collaborative editing: the science behind the magic
  • Caring for your fellow developers
  • Tools as a catalyst for culture change
  • Accessibility: it’s more than just screen readers
  • Balancing identity & privacy: building tools to help users

As a proud sponsor of the conference, we’re excited to offer 15% discount on tickets. Use the promo code COMMUNITYU1715 and come hang with us!

Jekyll 3.5.2 is here

Recently GitHub Pages upgraded to Jekyll 3.5.2, and we’ve now made it our default to match.

This update includes a few enhancements and bug fixes, most notably one which should dramatically speed up generation of your site! In testing jekyllrb.com, generation went from 18 seconds down to 8.

For a full list of revisions check out the release notes.

If you are still using Jekyll 3.4, here’s everything that’s new in 3.5 so far:

  • Jekyll now uses Liquid 4, the latest! It comes with whitespace control, new filters concat and compact, loop performance improvements and many fixes.
  • Themes can specify dependencies and Jekyll will require those. This makes it easier for theme writers to use plugins.
  • The gems key in the _config.yml is now plugins. This is backwards-compatible, as Jekyll will gracefully upgrade gems to plugins if you use the former.
  • Filters like sort now allow you to sort based on a subvalue, e.g. {% assign sorted = site.posts | sort: "image.alt_text" %}.
  • You can now use tab-separated data files.
  • Using layout: none will now produce a file with no layout. Equivalent to layout: null, with the exception that none is a truthy value and won’t be overwritten by front matter defaults.
  • Dramatically faster site generation!
  • Lots more bug fixes.
Preberi več →

More whitelisted plugins

Hot on the heels of the Jekyll 3.3.1 update earlier this week, four additional plugins have been whitelisted for GitHub Pages.

These plugins are specifically geared toward software documentation and open source code projects on GitHub, but may come in handy for any type of website.

Preberi več →

Jekyll update & new whitelisted plugins

We have updated our default Jekyll version from 3.3.0 to 3.3.1, to match the recent update at GitHub Pages.

This update includes a few minor enhancements and bug fixes. For a full list of revisions check out the release notes.

Also included in this update are two new whitelisted plugins.

Preberi več →

JAMstack e-commerce with Siteleaf & Snipcart

This is a guest post by Charles Ouellet, co-founder of Snipcart.

If you’re reading this blog, you know static web development is trendy, to say the least. Unless you just got out of a years-long meditation retreat in a cave with no Internet. If that’s your case, well, hum, welcome back!

At Snipcart, our developer-first shopping cart platform, we’ve been diving into static site generators and related tools for 2+ years now. And we believe they are the next big thing.

A short while ago, a friend of ours gave an in-depth conference on why “static” is a bad word for the modern front-end stack, aka the JAMstack (JavaScript, APIs, & Markup).

And he’s right:

Static definition

There’s nothing “undesirable” or “uninteresting” about the modern static websites & apps developers are pushing online. It’s in fact quite the opposite.

As a community, we need to give this new paradigm a name worthy of its actual value, and that’s exactly what the JAMstack is.

But this post isn’t a philosophical essay on the benefits of the API economy and the modular development approach. It’s about putting together a killer e-commerce workflow that ticks all of the boxes on the JAMstack checklist:

  • Entire site on a CDN
  • Atomic deploys
  • Instant cache invalidation
  • Everything lives in Git
  • Automated builds

So today, I’m going to show you how to build an API-centric, fast and secure e-commerce project in 5 simple steps. And I’m going to use the right JAMstack tools to do so.

Let’s do it!

Preberi več →

Customizing the Siteleaf admin

Watch Customizing the Siteleaf admin on Vimeo

Siteleaf v2 was built to be customized. In this tutorial, we’ll dive deeper into the Siteleaf admin and learn some tricks on how to tweak the interface to suit our needs. We’ll cover collections, permalinks, metadata, smart fields, defaults, and user roles.

If you followed the previous tutorials, you should now have a basic understanding of Jekyll and the Siteleaf admin. Feel free to check those out first if you haven’t.

Watch the video above, or follow along with the text version below.

Collections

By default, you should have 2 content areas: Pages and Posts.

Pages is your home for standalone content like your about page, contact, FAQ, and so on. Pages can be drag and drop ordered, and nested using the move icon next to each page.

Posts is a default Jekyll collection that’s blog-aware, so each piece of content here (called documents) is stamped with a date, and generally shown in date-descending order.

The Posts collection also comes with some special features: drafts, tags, and categories.

If these features are useful to you, but the name “Posts” isn’t quite doing it for you, you’re welcome to rename this collection under Collection settings. For example, I might want to call mine “Stories” instead.

Preberi več →

Connecting GitHub and Siteleaf

Watch Connecting GitHub and Siteleaf on Vimeo

This tutorial will show you how to connect and sync an existing Jekyll site from GitHub to Siteleaf, so you can edit content and preview your site in the cloud.

If you are new to Jekyll, you may want to start with our Jekyll from Scratch first tutorial to catch up on the basics.

What is GitHub sync?

When developing your site, you’ll generally want to keep your theme and content in sync so you can see how everything looks in context.

By enabling GitHub sync, any changes you make in your Git repo will be immediately saved to Siteleaf, and vice versa. So any edit you or anyone on your team makes in Siteleaf is synced and backed up. You can see a log of all changes in GitHub, and revert to any state in case anyone makes a mistake.

We like to think of it as a time machine for your content.

Preberi več →

Jekyll from scratch

Watch Jekyll from Scratch on Vimeo

This tutorial was created using Jekyll version 3.1.6. Newer versions (3.2+) will give you a theme by default instead of _layouts and _includes. For the purpose of this tutorial you may want to downgrade to Jekyll 3.1.6 (to remove other versions, run gem uninstall jekyll). Stay tuned for a future tutorial on themes!

In this tutorial, we’ll show you how to get set up and develop websites locally using Jekyll. We’ll cover installation, creating a new site, file structure, and finally we’ll commit the new site to GitHub.

This will give you a functional website that you can edit offline. Also make sure to check out the next tutorial where we’ll connect our site to the new Siteleaf v2 so we can edit content in the cloud.

What is Jekyll?

Jekyll is a static website generator built on Ruby. It takes Markdown text (your site’s content) and Liquid templates (your site’s theme) and outputs simple HTML that can be hosted pretty much anywhere.

It’s also what powers GitHub Pages, which serves more than half a million websites.

Getting started

To get started, we are going to install Jekyll, which is available to download as a Ruby gem. We’ll be following the quick-start instructions on Jekyll’s website.

So let’s open the trusty command line.

First, you’ll want to make sure you are running a recent version of Ruby. You can confirm by running the following command:

$ ruby -v

The latest stable version is 2.3.1, but anything above 2.2 should be fine. If you need to upgrade, we recommend using something like rbenv to make it easy.

Preberi več →

Now publishing to GitHub Pages

Now publishing to GitHub Pages

Exciting news! Starting today you can now publish your sites from Siteleaf to GitHub Pages.

GitHub Pages is a solid choice for static web hosting, especially if you already use GitHub to manage your theme code—and it’s clear a lot of our users already do.

Why GitHub Pages?

  • It’s fast! Check out this comparison by Jeremy Morgan.
  • It’s powered by a global CDN, from the folks at Fastly.
  • It’s version controlled! Every publish is a commit, so you can see revisions and revert back to any publish state.
  • And there’s no extra cost, GitHub Pages is included with your GitHub account.
Every publish from Siteleaf shows as a commit on GitHub.com
Preberi več →