diff --git a/TODO.md b/TODO.md index 9e3668f..0add926 100644 --- a/TODO.md +++ b/TODO.md @@ -1,9 +1,7 @@ # TODO - further post clean up -- post-article share - add descriptions and other metadata to generated pages - add rss for generated index pages -- disqus - css cleanup - remove need for jquery - extract SimpleHueman theme diff --git a/_config.yml b/_config.yml index 5950904..43345d0 100644 --- a/_config.yml +++ b/_config.yml @@ -27,6 +27,7 @@ redcarpet: simple_hueman: rss_item_limit: 10 social: + disqus_shortname: tdg5 facebook_app_id: "1190183924340795" twitter_username: dannyguinther tagline: explore, create, adapt, repeat diff --git a/_config_dev.yml b/_config_dev.yml index ddf65ba..b272a73 100644 --- a/_config_dev.yml +++ b/_config_dev.yml @@ -25,6 +25,7 @@ redcarpet: simple_hueman: rss_item_limit: 10 social: + disqus_shortname: tdg5 facebook_app_id: "1190183924340795" twitter_username: dannyguinther tagline: explore, create, adapt, repeat diff --git a/_data/authors.yml b/_data/authors.yml index b6417ad..d27d682 100644 --- a/_data/authors.yml +++ b/_data/authors.yml @@ -6,6 +6,7 @@ Danny Guinther: bio: "Hello! I'm a passionate and motivated engineer in the Boston/Cambridge area seeking challenging opportunities to utilize and extend my engineering and development skills through building new libraries, exploring community code, crafting new applications, and enhancing existing products." slug: tdg5 social: + disqus_shortname: tdg5 github_username: tdg5 facebook_username: danny.guinther linkedin_username: dannyguinther diff --git a/_includes/widget/disqus.html b/_includes/widget/disqus.html new file mode 100644 index 0000000..d6dc12b --- /dev/null +++ b/_includes/widget/disqus.html @@ -0,0 +1,28 @@ +{% assign author_data = site.data.authors[page.author] %} +{% if author_data.social.disqus_shortname %} + {% assign disqus_shortname = author_data.social.disqus_shortname %} +{% elsif site.social.disqus_shortname %} + {% assign disqus_shortname = site.social.disqus_shortname %} +{% endif %} +
+ + diff --git a/_layouts/post.html b/_layouts/post.html index 5453010..16b62d5 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -24,6 +24,7 @@

{{ page.title }}

You may also like...

{% assign related_posts = site.related_posts | slice: 0, 3 %} {% include widget/related_posts.html %} + {% include widget/disqus.html %} diff --git a/_plugins/filters/url_helper_filter.rb b/_plugins/filters/url_helper_filter.rb index 7df180d..988118d 100644 --- a/_plugins/filters/url_helper_filter.rb +++ b/_plugins/filters/url_helper_filter.rb @@ -34,6 +34,7 @@ def archive_url(*); super; end def author_url(*); super; end def category_url(*); super; end def gravatar_avatar_url(*); super; end + def pretty_absolute_url(*); super; end def pretty_url(*); super; end def pretty_post_slug_url(*); super; end def post_image_url(*); super; end diff --git a/_plugins/util/url_util.rb b/_plugins/util/url_util.rb index c808902..55cc088 100644 --- a/_plugins/util/url_util.rb +++ b/_plugins/util/url_util.rb @@ -16,6 +16,9 @@ def post_image_url(image_name, page = nil) File.join("/assets/images/posts/", page_date, image_name) end + def pretty_absolute_url(url) + absolute_url(pretty_url(url)) + end def pretty_url(url) return url unless UGLY_URL_MATCHER === url