From 1a3231f5062b7e30ddd5daa39019d43dcbac2b13 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Thu, 31 Jul 2014 09:37:41 -0400 Subject: [PATCH] Simplify and organize _config.yml variables --- 404.md | 2 +- _config.yml | 76 +++++++++---------- _data/authors.yml | 20 +++++ _includes/_author-bio.html | 42 +++++----- _includes/_disqus_comments.html | 4 +- _includes/_footer.html | 12 +++ _includes/_head.html | 57 ++------------ _includes/_open-graph.html | 19 +++++ _includes/_scripts.html | 4 +- _layouts/home.html | 6 +- _layouts/page.html | 6 +- _layouts/post-index.html | 6 +- _layouts/post.html | 8 +- _posts/2011-03-10-sample-post.md | 2 +- _posts/2012-05-22-readability-post.md | 2 +- _posts/2013-05-22-sample-post-images.md | 2 +- _posts/2013-05-23-readability-feature-post.md | 2 +- _posts/2013-08-12-sample-link-post.md | 2 +- _posts/2013-08-16-code-highlighting-post.md | 2 +- _posts/2014-07-31-author-override.md | 39 ++++++++++ index.md | 2 +- 21 files changed, 175 insertions(+), 140 deletions(-) create mode 100644 _data/authors.yml create mode 100644 _includes/_open-graph.html create mode 100644 _posts/2014-07-31-author-override.md diff --git a/404.md b/404.md index 20b2c3a..4e44442 100644 --- a/404.md +++ b/404.md @@ -1,7 +1,7 @@ --- layout: page title: "Page Not Found" -description: "Page not found. Your pixels are in another canvas." +excerpt: "Page not found. Your pixels are in another canvas." image: feature: texture-feature-01.jpg credit: Texture Lovers diff --git a/_config.yml b/_config.yml index 75cb861..16d2631 100644 --- a/_config.yml +++ b/_config.yml @@ -1,45 +1,16 @@ +# Site wide configuration + title: Site Title description: Describe your website. -# Your site's domain goes here. Leave localhost server or blank when working locally. +locale: en_US url: http://localhost:4000 -disqus_shortname: -# Owner/author information -owner: - name: Your Name - avatar: bio-photo.jpg - bio: "Describe your self." - email: your@email.com - # Social networking links are used in author-bio sidebar. Update and remove as you like. - twitter: - facebook: - github: - stackoverflow: - linkedin: - instagram: - lastfm: - tumblr: - pinterest: - foursquare: - steam: - dribbble: - # For Google Authorship https://plus.google.com/authorship - google_plus: - -# Analytics and webmaster tools stuff goes here -google_analytics: -google_verify: -# https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here -bing_verify: - -# http://en.wikipedia.org/wiki/List_of_tz_database_time_zones -timezone: America/New_York -future: true -highlighter: pygments -markdown: kramdown -# https://github.com/mojombo/jekyll/wiki/Permalinks +# Jekyll configuration + permalink: /:categories/:title/ +markdown: kramdown +highlighter: pygments kramdown: auto_ids: true @@ -48,12 +19,33 @@ kramdown: toc_levels: 1..6 use_coderay: false - coderay: - coderay_line_numbers: - coderay_line_numbers_start: 1 - coderay_tab_width: 4 - coderay_bold_every: 10 - coderay_css: class + +# Site owner +owner: + name: Your Name + avatar: bio-photo.jpg + bio: "Describe your self." + email: your@email.com + disqus-shortname: minimalmistakes + twitter: mmistakes + facebook: michaelrose + google: + plus: +MichaelRoseDesign + analytics: UA-2011187-3 + verify: UQj93ERU9zgECodaaXgVpkjrFn9UrDMEzVamacSoQ8Y + ad-client: ca-pub-7328585512091257 + ad-slot: 7855747535 + bing-verify: D81F4C18A6CB3018F64D7C827D953DFD + github: mmistakes + stackoverflow: + linkedin: + instagram: mmistakes + lastfm: + tumblr: + pinterest: + foursquare: + steam: + dribbble: include: [".htaccess"] exclude: ["lib", "config.rb", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "*.sublime-project", "*.sublime-workspace", "test", "spec", "Gruntfile.js", "package.json", "node_modules", "Gemfile", "Gemfile.lock", "LICENSE", "README.md"] diff --git a/_data/authors.yml b/_data/authors.yml new file mode 100644 index 0000000..45eafa2 --- /dev/null +++ b/_data/authors.yml @@ -0,0 +1,20 @@ +# Authors + +billy_rick: + name: Billy Rick + web: http://thewhip.com + email: billy@rick.com + bio: "What do you want, jewels? I am a very extravagant man." + avatar: bio-photo.jpg + twitter: extravagantman + google: + plus: +BillyRick + +cornelius_fiddlebone: + name: Cornelius Fiddlebone + email: cornelius@thewhip.com + bio: "I ordered what?" + avatar: bio-photo.jpg + twitter: rhymeswithsackit + google: + plus: +CorneliusFiddlebone \ No newline at end of file diff --git a/_includes/_author-bio.html b/_includes/_author-bio.html index 2e9d0c9..87d262d 100644 --- a/_includes/_author-bio.html +++ b/_includes/_author-bio.html @@ -1,22 +1,24 @@ -{% if site.owner.avatar contains 'http://' %} - {{ site.owner.name }} bio photo -{% elsif site.owner.avatar contains 'https://' %} - {{ site.owner.name }} bio photo +{% if page.author %} + {% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.owner %} +{% endif %} + +{% if author.avatar contains 'http' %} + {{ author.name }} bio photo {% else %} - {{ site.owner.name }} bio photo + {{ author.name }} bio photo {% endif %} -

{{ site.owner.name }}

-

{{ site.owner.bio }}

-{% if site.owner.twitter %} Twitter{% endif %} -{% if site.owner.facebook %} Facebook{% endif %} -{% if site.owner.google_plus %} Google+{% endif %} -{% if site.owner.linkedin %} LinkedIn{% endif %} -{% if site.owner.instagram %} Instagram{% endif %} -{% if site.owner.tumblr %} Tumblr{% endif %} -{% if site.owner.github %} Github{% endif %} -{% if site.owner.stackoverflow %} Stackoverflow{% endif %} -{% if site.owner.lastfm %} Last.fm{% endif %} -{% if site.owner.dribbble %} Dribbble{% endif %} -{% if site.owner.pinterest %} Pinterest{% endif %} -{% if site.owner.foursquare %} Foursquare{% endif %} -{% if site.owner.steam %} Steam{% endif %} \ No newline at end of file +

{{ author.name }}

+

{{ author.bio }}

+{% if author.twitter %} Twitter{% endif %} +{% if author.facebook %} Facebook{% endif %} +{% if author.google_plus %} Google+{% endif %} +{% if author.linkedin %} LinkedIn{% endif %} +{% if author.instagram %} Instagram{% endif %} +{% if author.tumblr %} Tumblr{% endif %} +{% if author.github %} Github{% endif %} +{% if author.stackoverflow %} Stackoverflow{% endif %} +{% if author.lastfm %} Last.fm{% endif %} +{% if author.dribbble %} Dribbble{% endif %} +{% if author.pinterest %} Pinterest{% endif %} +{% if author.foursquare %} Foursquare{% endif %} +{% if author.steam %} Steam{% endif %} \ No newline at end of file diff --git a/_includes/_disqus_comments.html b/_includes/_disqus_comments.html index 95b26b3..0ce654e 100644 --- a/_includes/_disqus_comments.html +++ b/_includes/_disqus_comments.html @@ -1,7 +1,7 @@ -{% if site.disqus_shortname %} +{% if site.owner.disqus-shortname %} + + + + © {{ site.time | date: '%Y' }} {{ site.owner.name }}. Powered by Jekyll using the Minimal Mistakes theme. diff --git a/_includes/_head.html b/_includes/_head.html index d6c020a..80b89ec 100644 --- a/_includes/_head.html +++ b/_includes/_head.html @@ -1,62 +1,21 @@ {% if page.title %}{{ page.title }} – {% endif %}{{ site.title }} - +{% if page.excerpt %}{% endif %} -{% if site.owner.twitter %} - {% if page.image.feature %} - - - {% else %} - - - {% endif %} - - - +{% if page.author %} + {% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.owner %} {% endif %} - - - - - - - +{% include _open-graph.html %} -{% if site.google_verify %} -{% endif %} -{% if site.bing_verify %}{% endif %} +{% if site.owner.google.verify %} +{% endif %} +{% if site.owner.bing-verify %}{% endif %} {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %} -{% if site.owner.google_plus %}{% endif %} +{% if site.owner.google.plus %}{% endif %} diff --git a/_includes/_open-graph.html b/_includes/_open-graph.html new file mode 100644 index 0000000..74dd2bd --- /dev/null +++ b/_includes/_open-graph.html @@ -0,0 +1,19 @@ + + +{% if page.excerpt %}{% endif %} +{% if site.owner.twitter %}{% endif %} +{% if author.twitter %}{% endif %} +{% if page.image.feature %} + + +{% else %} + + +{% endif %} + + + + +{% if page.excerpt %}{% endif %} + + \ No newline at end of file diff --git a/_includes/_scripts.html b/_includes/_scripts.html index 0af0902..9fc26ff 100644 --- a/_includes/_scripts.html +++ b/_includes/_scripts.html @@ -1,14 +1,14 @@ -{% if site.google_analytics %} +{% if site.owner.google.analytics %}