No release in over a year
A simple open source theme for publishing with jekyll. This theme is a port of a theme for hugo.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.15

Runtime

 Project Readme

jekyll-swift-theme

Gem Version

This theme is designed for blogging purposes. Feel free to extend it for other use cases though.

At its core, it's minimalistic; it doesn't rely on monolithic libraries such e.g jquery, bootstrap. Instead, it uses grid css, flexbox & vanilla js to facilitate the features outlined below:

This Theme is a port of Hugo Swift Theme for Jekyll. Original credit for this theme goes to weru.

Jekyll Swift Theme

Features

  • Blog
  • Pagination
  • Dark Mode only
  • Native lazy loading of images
  • Picture & Gallery Support
  • Flickr Album Support
  • YouTube Video Support

TODO

  • Syntax Highlighting
  • Staticman
  • Tag Sites

Pictures

You can include pictures very simple.

{% include shorts/picture.html normalPath="images/read.jpg" alt="reading" %}

Gallery

You can include a gallery in your article. For this you need first to define the gallery with its images in the file _data/gallery.yml.

example:
  - image: fast-lane.jpg
    description: a fast lane
  
  - image: stuck.jpg
    description: a stuck bike

Then you can include the gallery with the used key.

{% include shorts/gallery.html name="example" %}

Flickr Album

You can include a flickr album in your article. For this you need to include flickr.album.html with the flickr id of the album.

{% include shorts/flickr-album.html albumId="72157711928042766" %}

YouTube Video Support

You can include a youtube video very simple.

{% include shorts/youtube.html videoId="mgiWeQI0_nM" %

Installation

Add this line to your Jekyll site's Gemfile:

gem "jekyll-swift-theme"

And add this line to your Jekyll site's _config.yml:

theme: jekyll-swift-theme

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-swift-theme

Configuration

You need to configure the following settings in your _config.yml:

title: Your awesome title
description: Some example description

pagination:
  enabled: true
  per_page: 10
  title: ''
  permalink: '/page/:num/'
  sort_field: 'date'
  sort_reverse: true
  trail:
    before: 2
    after: 2

permalink: '/:year/:month/:title:output_ext'

plugins:
  - jekyll-feed
  - jekyll-seo-tag
  - jekyll-paginate-v2

theme: jekyll-swift-theme

Authors (written by block)

An author block can be automatically included in every post. To do this, only the following line must be inserted in the upper block of a post:

author: foo

You can configure the author information in the file _data/authors.yaml. An entry for an author should be like:

example:
  name: Max Mustermann
  bio: Foo bar
  pic: /assets/images/avatar.png
  website: https://elyday.net
  twitter: whitehouse
  github: onweru

Navigation Bar

You can configure the navigation bar entries in the file _data/nav.yaml.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/elyday/jekyll-swift-theme. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Development

To set up your environment to develop this theme, run bundle install.

Your theme is setup just like a normal Jekyll site! To test your theme, run bundle exec jekyll serve and open your browser at http://localhost:4000. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.

When your theme is released, only the files in _layouts, _includes, _sass and assets tracked with Git will be bundled. To add a custom directory to your theme-gem, please edit the regexp in jekyll-swift-theme.gemspec accordingly.

License

The theme is available as open source under the terms of the MIT License.