Skip to content

Commit

Permalink
Gem Structure (#21)
Browse files Browse the repository at this point in the history
* Moved Wren SASS into subfolder

* Added gemspec

* Updated Gemfile

* Moved Wren variables into sublist

* Forgot errors/ and images/ in gemspec

* Minor fixes
  • Loading branch information
Foggalong authored Sep 7, 2021
1 parent b3268f2 commit 8df0bba
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 72 deletions.
15 changes: 5 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

# Tells the Gemfile where to look for gems
source "https://rubygems.org"
gemspec

# In Ruby, '~>' is a twiddle-wakka, or pessimistic version constraint;
# it bounds the last digit below and the second to last digit above.
Expand All @@ -15,19 +16,13 @@ source "https://rubygems.org"
# Use of ~> can also be compounded with >=, !=, etc for complex setups.

# This ensures the current Jekyll version is running
gem "jekyll", "~> 4.2.0" # Minima requires ">= 3.5", "< 5.0"
gem "minima", "~> 2.5" # Default Jekyll theme, here as fallback
gem "bundler" # Minima development dependency

# To use GitHub Pages, remove `gem "jekyll"` above and uncomment the
# line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
gem "jekyll", "~> 4.2.0"

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.12" # Minima requires ~> 0.9
gem "jekyll-seo-tag", "~> 2.1" # Minima requires ~> 2.1
# gem "jekyll-paginate" # BUG not working
gem "jekyll-feed", "~> 0.12"
gem "jekyll-seo-tag", "~> 2.1"
# gem "jekyll-paginate" # BUG not working
end

# Windows and JRuby do not include zoneinfo files, so bundle the
Expand Down
103 changes: 51 additions & 52 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@ title: Wren
author:
name: Renny Wrennington
email: email@email.com
# TODO replace with an updated description
description: >- # this means to ignore newlines until the next key
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
baseurl: "/Wren" # the subpath of your site, e.g. /blog, or "/" for root
# url: "http://127.0.0.1:4000" # base hostname for your site (local)
url: "https://foggalong.github.io/Wren" # base hostname for your site (hosted)
baseurl: "/Wren" # the subpath of your site, e.g. /blog, or "/" for root

# Build settings
markdown: kramdown # enables extended markdown features (e.g footnotes)
theme: minima # upstream theme to fallback on in case of gaps
theme: jekyll-wren # upstream theme to fallback on in case of gaps

# External plugins to bring in
plugins:
- jekyll-feed # rss feeds (default Jekyll)
- jekyll-seo-tag # search engine optimization (default Minima)
Expand All @@ -43,6 +41,7 @@ exclude:
- build
- Gemfile
- Gemfile.lock
- jekyll-wren.gemspec
- LICENSE.md
- README.md

Expand All @@ -52,53 +51,53 @@ exclude:
# Set to true to show blog excerpts on the posts page
show_excerpts: false

# Uses `strftime` datetime string formatting.
# date_format: "%b %-d, %Y" # Minima Default
date_format: "%Y-%m-%d" # ISO 8601
# Wren-specific settings
wren:
# Uses `strftime` datetime string formatting.
date_format: "%Y-%m-%d" # ISO 8601

# Generate social links in footer
social_links:
# devto: jekyll
# dribbble: jekyll
facebook: jekyll
# flickr: jekyll
github: jekyll
gitlab: # can have multiple hosts
- username: jekyll
instance: gitlab.com
- username: j3ky11
instance: git.gnome.org
instagram: jekyll
# keybase: jekyll
# linkedin: jekyll
# mastodon: # can have multiple hosts
# - username: jekyll
# instance: mastodon.cloud
# - username: jekyll2
# instance: mastodon.social
# microdotblog: jekyll
# pinterest: jekyll
twitter: jekyllrb
# youtube: jekyll
youtube_channel: UC8CXR0-3I70i1tfPg1PAE1g
youtube_channel_name: CloudCannon
telegram: jekyll
extra-links:
- username: jekyll
instance: https://example1.com
- username: j3ky11
instance: https://example2.com
# Generate social links in footer
social_links:
# devto: jekyll
# dribbble: jekyll
facebook: jekyll
# flickr: jekyll
github: jekyll
gitlab: # can have multiple hosts
- username: jekyll
instance: gitlab.com
- username: j3ky11
instance: git.gnome.org
instagram: jekyll
# keybase: jekyll
# linkedin: jekyll
# mastodon: # can have multiple hosts
# - username: jekyll
# instance: mastodon.cloud
# - username: jekyll2
# instance: mastodon.social
# microdotblog: jekyll
# pinterest: jekyll
twitter: jekyllrb
# youtube: jekyll
youtube_channel: UC8CXR0-3I70i1tfPg1PAE1g
youtube_channel_name: CloudCannon
telegram: jekyll
extra-links:
- username: jekyll
instance: https://example1.com
- username: j3ky11
instance: https://example2.com

# The header will always include `Home` as the first link and `RSS`
# and `Top` as the last two links. The order list below specifies
# the other pages to appear in the middle.
header_pages:
- blog.md
- about.md

# The header will always include `Home` as the first link and `RSS`
# and `Top` as the last two links. The order list below specifies
# the other pages to appear in the middle.
header_pages:
- blog.md
- about.md

# In the category-list.html include the font size of each category
# is calculated using (a*x + b)%, where x is the category size.
category_cloud:
a: 15
b: 80
# The font size of each category in the category-list.html include
# is calculated using (a*x + b)%, where x is the category size.
category_cloud:
a: 15
b: 80
4 changes: 2 additions & 2 deletions _includes/meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
<p class="post-meta" {{ align | prepend: 'style= "text-align: ' | append: ';"'}}>
<!-- Date the post was originally published -->
<time class="dt-published" datetime="{{ p.date | date_to_xmlschema }}" itemprop="datePublished">
{{ p.date | date: site.date_format }}
{{ p.date | date: site.wren.date_format }}
</time>
{%- assign original_date = p.original_date -%}
{%- assign modified_date = p.modified_date -%}
<!-- If post was modified, include that date after a tilde inside the post -->
{%- if p.modified_date -%}
{%- assign modified_date = modified_date | date: site.date_format | prepend: 'Updated on ' -%}
{%- assign modified_date = modified_date | date: site.wren.date_format | prepend: 'Updated on ' -%}
{%- assign original_date = original_date | append: '*' -%}
{%- endif -%}
<time title="{{ modified_date }}" class="dt-published" datetime="{{ p.date | date_to_xmlschema }}" itemprop="datePublished">
Expand Down
2 changes: 1 addition & 1 deletion _includes/navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</a>
{%- assign titles_size = site.pages | map: 'title' | join: '' | size -%}
{%- if titles_size > 0 -%}
{%- assign page_paths = site.header_pages -%}
{%- assign page_paths = site.wren.header_pages -%}
{%- for path in page_paths -%}
{%- assign my_page = site.pages | where: "path", path | first -%}
{%- if my_page.title -%}
Expand Down
2 changes: 1 addition & 1 deletion _includes/social-list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{%- assign s = site.social_links -%}
{%- assign s = site.wren.social_links -%}

{%- if s.devto -%}
{%- include social-link.html name="DEV" url="dev.to/" at=s.devto -%}
Expand Down
4 changes: 2 additions & 2 deletions _layouts/category-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
---

{%- assign categories = site.categories | sort -%}
{%- assign cc_a = site.category_cloud.a -%}
{%- assign cc_b = site.category_cloud.b -%}
{%- assign cc_a = site.wren.category_cloud.a -%}
{%- assign cc_b = site.wren.category_cloud.b -%}

<div class="category-page">

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions _sass/initialize.scss → _sass/wren/initialize.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ $large-width: 800px !default;
// ============

@import
"content", // Styling for the base html content
"layout" // Sets the layout of the website
"wren/content", // Styling for the base html content
"wren/layout" // Sets the layout of the website
;
File renamed without changes.
1 change: 0 additions & 1 deletion assets/nav-icons/Default.svg

This file was deleted.

3 changes: 3 additions & 0 deletions assets/nav-icons/Default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ $code-font-family: Noto Mono;
$background-color: #9b9da3;

// Bring in the rest of the SASS from the theme
@import "initialize";
@import "wren/initialize";
24 changes: 24 additions & 0 deletions jekyll-wren.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# frozen_string_literal: true

Gem::Specification.new do |spec|
spec.name = "jekyll-wren"
spec.version = "0.3"
spec.authors = ["Josh Fogg"]
spec.email = ["joshua.h.fogg@gmail.com"]

spec.summary = "A page-like theme for Jekyll."
spec.homepage = "https://github.com/Foggalong/Wren"
spec.license = "MIT"

spec.metadata["plugin_type"] = "theme"

spec.files = `git ls-files -z`.split("\x0").select do |f|
f.match(%r!^(assets|errors|images|_(includes|layouts|sass)/|(LICENSE|README)((\.(txt|md|markdown)|$)))!i)
end

spec.add_runtime_dependency "jekyll", ">= 3.5", "< 5.0"
spec.add_runtime_dependency "jekyll-feed", "~> 0.9"
spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.1"

spec.add_development_dependency "bundler"
end

0 comments on commit 8df0bba

Please sign in to comment.