From 8df0bbac0318b276cf5a4b36fd2cc18027f48e74 Mon Sep 17 00:00:00 2001 From: Josh Fogg Date: Tue, 7 Sep 2021 17:00:03 +0100 Subject: [PATCH] Gem Structure (#21) * Moved Wren SASS into subfolder * Added gemspec * Updated Gemfile * Moved Wren variables into sublist * Forgot errors/ and images/ in gemspec * Minor fixes --- Gemfile | 15 ++--- _config.yml | 103 +++++++++++++++---------------- _includes/meta.html | 4 +- _includes/navigation.html | 2 +- _includes/social-list.html | 2 +- _layouts/category-list.html | 4 +- _sass/{ => wren}/content.scss | 0 _sass/{ => wren}/initialize.scss | 4 +- _sass/{ => wren}/layout.scss | 0 assets/nav-icons/Default.svg | 4 +- assets/style.scss | 2 +- jekyll-wren.gemspec | 24 +++++++ 12 files changed, 92 insertions(+), 72 deletions(-) rename _sass/{ => wren}/content.scss (100%) rename _sass/{ => wren}/initialize.scss (97%) rename _sass/{ => wren}/layout.scss (100%) mode change 120000 => 100644 assets/nav-icons/Default.svg create mode 100644 jekyll-wren.gemspec diff --git a/Gemfile b/Gemfile index 5cf66c9..d8d65e8 100644 --- a/Gemfile +++ b/Gemfile @@ -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. @@ -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 diff --git a/_config.yml b/_config.yml index aca85d8..7c3638c 100644 --- a/_config.yml +++ b/_config.yml @@ -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) @@ -43,6 +41,7 @@ exclude: - build - Gemfile - Gemfile.lock + - jekyll-wren.gemspec - LICENSE.md - README.md @@ -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 \ No newline at end of file + # 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 diff --git a/_includes/meta.html b/_includes/meta.html index 6c130d7..7a8a75b 100644 --- a/_includes/meta.html +++ b/_includes/meta.html @@ -10,13 +10,13 @@

{%- assign original_date = p.original_date -%} {%- assign modified_date = p.modified_date -%} {%- 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 -%}

diff --git a/_sass/content.scss b/_sass/wren/content.scss similarity index 100% rename from _sass/content.scss rename to _sass/wren/content.scss diff --git a/_sass/initialize.scss b/_sass/wren/initialize.scss similarity index 97% rename from _sass/initialize.scss rename to _sass/wren/initialize.scss index 2be201b..a687264 100644 --- a/_sass/initialize.scss +++ b/_sass/wren/initialize.scss @@ -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 ; diff --git a/_sass/layout.scss b/_sass/wren/layout.scss similarity index 100% rename from _sass/layout.scss rename to _sass/wren/layout.scss diff --git a/assets/nav-icons/Default.svg b/assets/nav-icons/Default.svg deleted file mode 120000 index e927153..0000000 --- a/assets/nav-icons/Default.svg +++ /dev/null @@ -1 +0,0 @@ -Comments.svg \ No newline at end of file diff --git a/assets/nav-icons/Default.svg b/assets/nav-icons/Default.svg new file mode 100644 index 0000000..38e8438 --- /dev/null +++ b/assets/nav-icons/Default.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assets/style.scss b/assets/style.scss index 43f5926..30817c1 100644 --- a/assets/style.scss +++ b/assets/style.scss @@ -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"; diff --git a/jekyll-wren.gemspec b/jekyll-wren.gemspec new file mode 100644 index 0000000..eabf745 --- /dev/null +++ b/jekyll-wren.gemspec @@ -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