Skip to content

Commit

Permalink
Update to latest middleman
Browse files Browse the repository at this point in the history
* Update to middleman 4.4
* Update to middleman-blog 4.0
* Update to Ruby 3.0
* Get rid of compass/css3 (not needed anymore and no longer supported)
* Update API for sitemap generator
* Get rid of Google+ and Quora from about page
* Rename blog file extensions so they are processed correctly in MM4
* Rename stylesheet file extensions so they are processed correctly in
  MM4 -- see middleman/middleman-sprockets#127
  for details
* Change previous_article to article_previous due to deprecation warning
* Change next_article to article_next due to deprecation warning
  • Loading branch information
mattolson committed Mar 4, 2023
1 parent 245fcdc commit 9ff3788
Show file tree
Hide file tree
Showing 25 changed files with 142 additions and 131 deletions.
2 changes: 0 additions & 2 deletions .rbenv-gemsets

This file was deleted.

2 changes: 0 additions & 2 deletions .rbenv-version

This file was deleted.

1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.5
8 changes: 5 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
source 'https://rubygems.org'

gem "middleman", "~> 3.1.0"
gem "middleman-blog", "~> 3.2.0"
gem "middleman", "~> 4.4"
gem "middleman-blog", "~> 4.0"
gem "middleman-sprockets", "~> 4.1"
gem "kramdown"
gem "builder", "~> 3.0.0"
gem "builder", "~> 3.2"
gem "zurb-foundation" , '~> 4.2.2', require: false
gem "forgery"
gem "sitemap_generator"
gem "tzinfo"
gem "nokogiri"
gem "sass", '~> 3.4'
205 changes: 116 additions & 89 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,111 +1,138 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (3.2.12)
i18n (~> 0.6)
multi_json (~> 1.0)
builder (3.0.4)
chunky_png (1.2.8)
coffee-script (2.2.0)
activesupport (7.0.4.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
backports (3.23.0)
builder (3.2.4)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.6.2)
compass (0.12.2)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
execjs (1.4.0)
multi_json (~> 1.0)
ffi (1.9.0)
coffee-script-source (1.12.2)
concurrent-ruby (1.2.2)
contracts (0.17)
dotenv (2.8.1)
erubis (2.7.0)
execjs (2.8.1)
fast_blank (1.0.1)
fastimage (2.2.6)
ffi (1.15.5)
forgery (0.5.0)
fssm (0.2.10)
haml (4.0.3)
haml (5.2.2)
temple (>= 0.8.0)
tilt
hike (1.2.3)
i18n (0.6.4)
kramdown (1.0.2)
listen (1.1.6)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
maruku (0.6.1)
syntax (>= 1.0.0)
middleman (3.1.1)
coffee-script (~> 2.2.0)
compass (>= 0.12.2)
execjs (~> 1.4.0)
haml (>= 3.1.6)
kramdown (~> 1.0.0)
middleman-core (= 3.1.1)
middleman-more (= 3.1.1)
middleman-sprockets (>= 3.1.2)
sass (>= 3.1.20)
uglifier (~> 2.1.0)
middleman-blog (3.2.0)
maruku (~> 0.6.0)
middleman-core (~> 3.0)
tzinfo (~> 0.3.0)
middleman-core (3.1.1)
activesupport (~> 3.2.6)
bundler (~> 1.1)
i18n (~> 0.6.1)
listen (~> 1.1.6)
rack (>= 1.4.5)
rack-test (~> 0.6.1)
thor (>= 0.15.2, < 2.0)
tilt (~> 1.3.6)
middleman-more (3.1.1)
middleman-sprockets (3.1.2)
middleman-core (>= 3.0.14)
middleman-more (>= 3.0.14)
sprockets (~> 2.1)
sprockets-helpers (~> 1.0.0)
sprockets-sass (~> 1.0.0)
mini_portile (0.5.0)
multi_json (1.7.7)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rb-fsevent (0.9.3)
rb-inotify (0.9.0)
ffi (>= 0.5.0)
rb-kqueue (0.2.0)
ffi (>= 0.5.0)
sass (3.2.9)
hamster (3.0.0)
concurrent-ruby (~> 1.0)
hashie (3.6.0)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
kramdown (2.4.0)
rexml
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
memoist (0.16.2)
middleman (4.4.3)
coffee-script (~> 2.2)
haml (>= 4.0.5, < 6.0)
kramdown (>= 2.3.0)
middleman-cli (= 4.4.3)
middleman-core (= 4.4.3)
middleman-blog (4.0.3)
addressable (~> 2.3)
middleman-core (>= 4.0.0)
tzinfo (>= 0.3.0)
middleman-cli (4.4.3)
thor (>= 0.17.0, < 2.0)
middleman-core (4.4.3)
activesupport (>= 6.1, < 7.1)
addressable (~> 2.4)
backports (~> 3.6)
bundler (~> 2.0)
contracts (~> 0.13)
dotenv
erubis
execjs (~> 2.0)
fast_blank
fastimage (~> 2.0)
hamster (~> 3.0)
hashie (~> 3.4)
i18n (~> 1.6.0)
listen (~> 3.0)
memoist (~> 0.14)
padrino-helpers (~> 0.15.0)
parallel
rack (>= 1.4.5, < 3)
sassc (~> 2.0)
servolux
tilt (~> 2.0.9)
toml
uglifier (~> 3.0)
webrick
middleman-sprockets (4.1.1)
middleman-core (~> 4.0)
sprockets (>= 3.0)
mini_portile2 (2.8.1)
minitest (5.17.0)
nokogiri (1.14.2)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
padrino-helpers (0.15.3)
i18n (>= 0.6.7, < 2)
padrino-support (= 0.15.3)
tilt (>= 1.4.1, < 3)
padrino-support (0.15.3)
parallel (1.22.1)
parslet (2.0.0)
public_suffix (5.0.1)
racc (1.6.2)
rack (2.2.6.3)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
sass (3.4.25)
sassc (2.4.0)
ffi (~> 1.9)
servolux (0.13.0)
sitemap_generator (4.1.0)
builder
sprockets (2.10.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-helpers (1.0.1)
sprockets (~> 2.0)
sprockets-sass (1.0.1)
sprockets (~> 2.0)
tilt (~> 1.1)
syntax (1.0.0)
thor (0.18.1)
tilt (1.3.7)
tzinfo (0.3.37)
uglifier (2.1.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
sprockets (4.2.0)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
temple (0.10.0)
thor (1.2.1)
tilt (2.0.11)
toml (0.3.0)
parslet (>= 1.8.0, < 3.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
webrick (1.8.1)
zurb-foundation (4.2.2)
sass (>= 3.2.0)

PLATFORMS
ruby

DEPENDENCIES
builder (~> 3.0.0)
builder (~> 3.2)
forgery
kramdown
middleman (~> 3.1.0)
middleman-blog (~> 3.2.0)
middleman (~> 4.4)
middleman-blog (~> 4.0)
middleman-sprockets (~> 4.1)
nokogiri
sass (~> 3.4)
sitemap_generator
tzinfo
zurb-foundation (~> 4.2.2)

BUNDLED WITH
2.4.1
10 changes: 1 addition & 9 deletions config.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require 'kramdown'
require 'extensions/sitemap.rb'
require 'zurb-foundation'
require 'sass'

activate :sprockets

Expand Down Expand Up @@ -57,15 +58,6 @@
# With alternative layout
# page "/path/to/file.html", :layout => :otherlayout
#
# A path which all have the same layout
# with_layout :admin do
# page "/admin/*"
# end

# Proxy (fake) files
# page "/this-page-has-no-template.html", :proxy => "/template-file.html" do
# @which_fake_page = "Rendering a fake page with a variable"
# end

###
# Helpers
Expand Down
23 changes: 10 additions & 13 deletions extensions/sitemap.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
require 'sitemap_generator'

module GoogleSitemapGenerator
class << self
def registered(app)
app.after_build do |builder|
app_sitemap = sitemap # avoid name conflict
SitemapGenerator::Sitemap.default_host = "http://mattolson.com"
SitemapGenerator::Sitemap.create(:public_path => 'build', :verbose => true) do
app_sitemap.resources.each do |r|
add(r.url) if r.ext == '.html'
end
class GoogleSitemapGenerator < Middleman::Extension
def registered(app)
app.after_build do |builder|
app_sitemap = sitemap # avoid name conflict
SitemapGenerator::Sitemap.default_host = "http://mattolson.com"
SitemapGenerator::Sitemap.create(:public_path => 'build', :verbose => true) do
app_sitemap.resources.each do |r|
add(r.url) if r.ext == '.html'
end
end
end
alias :included :registered
end
alias :included :registered
end

::Middleman::Extensions.register(:sitemap_generator, GoogleSitemapGenerator)

::Middleman::Extensions.register(:sitemap_generator, GoogleSitemapGenerator)
4 changes: 0 additions & 4 deletions source/about.markdown → source/about.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ title: About Matt Olson
<li><a class="fc-webicon linkedin" href="http://www.linkedin.com/in/mattolson">LinkedIn</a></li>
<li><a class="fc-webicon twitter" href="https://twitter.com/ahbiscuits">Twitter</a></li>
<li><a class="fc-webicon facebook" href="https://www.facebook.com/mayreasonprevail">Facebook</a></li>
<li><a class="fc-webicon googleplus" href="https://plus.google.com/108115189098546127509/posts">Google+</a></li>
<li><a class="fc-webicon quora" href="http://www.quora.com/Matt-Olson">Quora</a></li>
</ul>

## Matt Olson
Expand Down Expand Up @@ -39,5 +37,3 @@ coordinating action as never before.
<p class="centered"><a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC4333E456B005848">GPG Key</a></p>
</div>
</div>


4 changes: 2 additions & 2 deletions source/blog/_article.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

<% unless digest %>
<ul class="read_next">
<li><%= article.previous_article ? link_to("&laquo; #{article.previous_article.title}", article.previous_article) : "&nbsp;" %></li>
<li><%= article.next_article ? link_to("#{article.next_article.title} &raquo;", article.next_article) : "&nbsp;" %></li>
<li><%= article.article_previous ? link_to("&laquo; #{article.article_previous.title}", article.article_previous) : "&nbsp;" %></li>
<li><%= article.article_next ? link_to("#{article.article_next.title} &raquo;", article.article_next) : "&nbsp;" %></li>
</ul>

<div id="disqus_thread"></div>
Expand Down
4 changes: 2 additions & 2 deletions source/layouts/layout.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</head>
<body>

<!-- Hero banner -->
<!-- Hero Banner -->
<header class="hero">
<a href="#content"><img src="/images/blank.gif" alt="Skip Navigation" width="1" height="1" border="0" /></a>
<div class="row">
Expand All @@ -53,7 +53,7 @@
</div>
</header>

<!-- Sticky nav -->
<!-- Sticky Nav -->
<div class="row">
<div class="contain-to-grid sticky">
<nav class="top-bar">
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import "_foundation_settings";
@import "compass/css3";
@import "foundation_settings";
$hero-height: 350px;

/* Body */
Expand Down Expand Up @@ -129,15 +128,15 @@ footer {
/* Images */
img.right {
border: 1px solid #ddd;
@include border-radius(3px);
@include box-shadow(#ddd 1px 1px 1px);
border-radius: 3px;
box-shadow: #ddd 1px 1px 1px;
padding: 3px;
text-align: right;
margin-left: 1em;
margin-bottom: 1em;
&.plain {
border: none;
@include box-shadow(#fff 0 0 0);
box-shadow: #fff 0 0 0;
}
}

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions source/stylesheets/application.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//= require "all"

0 comments on commit 9ff3788

Please sign in to comment.