blogelator 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/blogelator/post.rb +2 -2
- data/app/views/blogelator/authors/_author.html.erb +12 -17
- data/app/views/blogelator/posts/_meta.html.erb +18 -18
- data/app/views/blogelator/posts/_post.html.erb +12 -20
- data/app/views/blogelator/posts/index.html.erb +25 -3
- data/app/views/blogelator/posts/show.html.erb +25 -22
- data/lib/blogelator/version.rb +1 -1
- metadata +3 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: d14ce517e1d29110676f14ec8b3a9fba4ebb7fb9
         | 
| 4 | 
            +
              data.tar.gz: c8e3828ba05e7bf8f27a590c776e520d172cdfbb
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 8f83782553256422ff42d93579ead7b6b238d705ac950879b94fc6abe67963d2b392a4b374e79fc6b1309164e059c245a909c52dbe8e7a9bb37e7396b5b14496
         | 
| 7 | 
            +
              data.tar.gz: eb023adff7c6932cc531e857ad2fe6c76ad13a44704f87573b43eb722617c32366998ff45c6bee346ffea6c76c15cd339dfa11c493be1e708684584bcae54684
         | 
| @@ -67,8 +67,8 @@ module Blogelator | |
| 67 67 |  | 
| 68 68 | 
             
                # Convert the Markdown for the post body and summary to HTML.
         | 
| 69 69 | 
             
                def parse_markdown
         | 
| 70 | 
            -
                  self.body_html = markdown.render(body_markdown)
         | 
| 71 | 
            -
                  self.summary_html = markdown.render(summary_markdown)
         | 
| 70 | 
            +
                  self.body_html = markdown.render(body_markdown.to_s)
         | 
| 71 | 
            +
                  self.summary_html = markdown.render(summary_markdown.to_s)
         | 
| 72 72 | 
             
                end
         | 
| 73 73 |  | 
| 74 74 | 
             
                # Touch the associated tags to update cache keys.
         | 
| @@ -1,24 +1,19 @@ | |
| 1 1 | 
             
            <div class="author">
         | 
| 2 2 | 
             
              <% if author.profile_photo.exists? %>
         | 
| 3 | 
            -
                <div class=" | 
| 4 | 
            -
                  <%= image_tag author.profile_photo | 
| 3 | 
            +
                <div class="author-image">
         | 
| 4 | 
            +
                  <%= image_tag author.profile_photo(:medium) %>
         | 
| 5 5 | 
             
                </div>
         | 
| 6 6 | 
             
              <% end %>
         | 
| 7 | 
            +
              <div class="author-bio">
         | 
| 8 | 
            +
                <h4><a href="<%= author.website %>" target="_blank"><%= author.name %></a></h4>
         | 
| 9 | 
            +
                <p><%= author.bio_markdown %></p>
         | 
| 7 10 |  | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
              <div>
         | 
| 17 | 
            -
                <small class="location">
         | 
| 18 | 
            -
                  <%= author.location %>
         | 
| 19 | 
            -
                </small>
         | 
| 20 | 
            -
                <small class="website">
         | 
| 21 | 
            -
                  <%= link_to author.website, author.website %>
         | 
| 22 | 
            -
                </small>
         | 
| 11 | 
            +
                <div class="author-meta">
         | 
| 12 | 
            +
                  <i class="icon icon-location-on"></i> <%= author.location %>
         | 
| 13 | 
            +
                  <a href="<%= author.website %>">
         | 
| 14 | 
            +
                    <i class="icon icon-link"></i>
         | 
| 15 | 
            +
                    <%= author.website %>
         | 
| 16 | 
            +
                  </a>
         | 
| 17 | 
            +
                </div>
         | 
| 23 18 | 
             
              </div>
         | 
| 24 19 | 
             
            </div>
         | 
| @@ -1,40 +1,40 @@ | |
| 1 | 
            -
            <link rel="canonical" href="<%=  | 
| 2 | 
            -
             | 
| 3 | 
            -
              <meta name="description" content="<%= @post.meta_description %>">
         | 
| 4 | 
            -
            <% end %>
         | 
| 5 | 
            -
            <% unless @post.meta_keywords.blank? %>
         | 
| 6 | 
            -
              <meta name="keywords" content="<%= @post.meta_keywords %>">
         | 
| 7 | 
            -
            <% end %>
         | 
| 1 | 
            +
            <link rel="canonical" href="<%= @post.url(request) %>" />
         | 
| 2 | 
            +
            <meta property="article:published_time" content="<%= @post.published_at %>" />
         | 
| 8 3 |  | 
| 9 | 
            -
            <meta  | 
| 10 | 
            -
            <meta  | 
| 4 | 
            +
            <meta name="description" content="<%= @post.meta_description %>">
         | 
| 5 | 
            +
            <meta name="keywords" content="<%= @post.meta_keywords %>">
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            <meta property="og:site_name" content="<%= t('titles.application') %>" />
         | 
| 11 8 | 
             
            <meta property="og:type" content="article" />
         | 
| 12 9 | 
             
            <meta property="og:title" content="<%= @post.title %>" />
         | 
| 13 | 
            -
            <meta property="og: | 
| 14 | 
            -
            <meta property="og:url" content="<%= blogelator_post_url(@post) %>" />
         | 
| 10 | 
            +
            <meta property="og:url" content="<%= @post.url(request) %>" />
         | 
| 15 11 | 
             
            <meta property="og:image" content="<%= @post.image.url %>" />
         | 
| 12 | 
            +
            <meta property="og:description" content="<%= @post.meta_description %>" />
         | 
| 13 | 
            +
             | 
| 16 14 | 
             
            <meta name="twitter:card" content="summary_large_image" />
         | 
| 17 15 | 
             
            <meta name="twitter:title" content="<%= @post.title %>" />
         | 
| 18 | 
            -
            <meta name="twitter: | 
| 19 | 
            -
            <meta name="twitter:url" content="<%= blogelator_post_url(@post) %>" />
         | 
| 16 | 
            +
            <meta name="twitter:url" content="<%= @post.url(request) %>" />
         | 
| 20 17 | 
             
            <meta name="twitter:image:src" content="<%= @post.image.url %>" />
         | 
| 18 | 
            +
            <meta property="twitter:description" content="<%= @post.meta_description %>" />
         | 
| 21 19 |  | 
| 22 20 | 
             
            <script type="application/ld+json">
         | 
| 23 21 | 
             
              {
         | 
| 24 22 | 
             
                  "@context": "http://schema.org",
         | 
| 25 23 | 
             
                  "@type": "Article",
         | 
| 26 | 
            -
                  "publisher":  | 
| 24 | 
            +
                  "publisher": {
         | 
| 25 | 
            +
                    "name": "<%= t('titles.application') %>"
         | 
| 26 | 
            +
                  },
         | 
| 27 27 | 
             
                  "author": {
         | 
| 28 28 | 
             
                      "@type": "Person",
         | 
| 29 29 | 
             
                      "name": "<%= @post.author.name %>",
         | 
| 30 30 | 
             
                      "image": "<%= @post.author.profile_photo.url %>",
         | 
| 31 | 
            -
                      "url": " | 
| 31 | 
            +
                      "url": "<%= @post.author.website %>",
         | 
| 32 32 | 
             
                      "description": "<%= strip_tags(@post.author.bio_html) %>"
         | 
| 33 33 | 
             
                  },
         | 
| 34 34 | 
             
                  "headline": "<%= @post.title %>",
         | 
| 35 | 
            -
                  "url": "<%=  | 
| 35 | 
            +
                  "url": "<%= @post.url(request) %>",
         | 
| 36 36 | 
             
                  "datePublished": "<%= @post.created_at %>",
         | 
| 37 | 
            -
                  "image": "<%=  | 
| 38 | 
            -
                  "description": "<%= strip_tags(@post. | 
| 37 | 
            +
                  "image": "<%= @post.image.url %>",
         | 
| 38 | 
            +
                  "description": "<%= strip_tags(@post.meta_description) %>"
         | 
| 39 39 | 
             
              }
         | 
| 40 40 | 
             
            </script>
         | 
| @@ -1,21 +1,13 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
               | 
| 3 | 
            -
                 | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
                  </span>
         | 
| 13 | 
            -
                <% end %>
         | 
| 14 | 
            -
             | 
| 15 | 
            -
                <%= local_time(post.published_at, format: "%B %e, %Y", class: "published-at") %>
         | 
| 16 | 
            -
             | 
| 17 | 
            -
                <div class="tags">
         | 
| 18 | 
            -
                  <%= render post.tags %>
         | 
| 19 | 
            -
                </div>
         | 
| 1 | 
            +
            <div class="post <%= post.status %>">
         | 
| 2 | 
            +
              <%= link_to post, class: "post-image" do %>
         | 
| 3 | 
            +
                <% if post.image.exists? %>
         | 
| 4 | 
            +
                   <span class="post-image">
         | 
| 5 | 
            +
                     <%= image_tag post.image.url(:small) %>
         | 
| 6 | 
            +
                   </span>
         | 
| 7 | 
            +
                 <% end %>
         | 
| 8 | 
            +
              <% end %>
         | 
| 9 | 
            +
              <h2><%= link_to post.title, post %></h2>
         | 
| 10 | 
            +
              <div class="published-at">
         | 
| 11 | 
            +
                <%= local_time(post.published_at, format: "%B %e, %Y") %>
         | 
| 20 12 | 
             
              </div>
         | 
| 21 | 
            -
             | 
| 13 | 
            +
            </div>
         | 
| @@ -1,10 +1,32 @@ | |
| 1 | 
            -
            <%  | 
| 1 | 
            +
            <% if @featured_post %>
         | 
| 2 | 
            +
              <section class="featured-post">
         | 
| 3 | 
            +
                <span>Featured Article</span>
         | 
| 4 | 
            +
                <h3>
         | 
| 5 | 
            +
                  <%= link_to @featured_post.url(request) do %>
         | 
| 6 | 
            +
                    <%= @featured_post.title %>
         | 
| 7 | 
            +
                  <% end %>
         | 
| 8 | 
            +
                </h3>
         | 
| 9 | 
            +
                <div class="darken-background"></div>
         | 
| 10 | 
            +
                <% if @featured_post.image.exists? %>
         | 
| 11 | 
            +
                  <div class="background-image">
         | 
| 12 | 
            +
                    <%= image_tag @featured_post.image.url(:large) %>
         | 
| 13 | 
            +
                  </div>
         | 
| 14 | 
            +
                <% end %>
         | 
| 15 | 
            +
              </section>
         | 
| 16 | 
            +
            <% end %>
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            <% if @tag %>
         | 
| 19 | 
            +
              <h1 class="tag-header">Articles in: <%= @tag.name %></h1>
         | 
| 20 | 
            +
            <% end %>
         | 
| 21 | 
            +
             | 
| 22 | 
            +
            <section class="post-wrap">
         | 
| 2 23 | 
             
              <% if @posts.length > 0 %>
         | 
| 3 24 | 
             
                <%= render @posts %>
         | 
| 4 | 
            -
                <%= paginate @posts, views_prefix: "blogelator" %>
         | 
| 5 25 | 
             
              <% else %>
         | 
| 6 26 | 
             
                <p>
         | 
| 7 27 | 
             
                  There are no blog posts.
         | 
| 8 28 | 
             
                </p>
         | 
| 9 29 | 
             
              <% end %>
         | 
| 10 | 
            -
             | 
| 30 | 
            +
            </section>
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            <%= paginate @posts, views_prefix: "blogelator" %>
         | 
| @@ -1,29 +1,32 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
              <div class=" | 
| 3 | 
            -
                <div class=" | 
| 4 | 
            -
             | 
| 1 | 
            +
            <div class="post <%= @post.status %>">
         | 
| 2 | 
            +
              <div class="banner" style="background-image: url(<%= @post.image.exists? ? @post.image.url(:large) : "" %>)">
         | 
| 3 | 
            +
                <div class="darken-background"></div>
         | 
| 4 | 
            +
                <div class="tags">
         | 
| 5 | 
            +
                  Found In:
         | 
| 6 | 
            +
                  <ul>
         | 
| 7 | 
            +
                    <%= render @post.tags %>
         | 
| 8 | 
            +
                  </ul>
         | 
| 5 9 | 
             
                </div>
         | 
| 10 | 
            +
                <h1><%= link_to @post.title, @post %></h1>
         | 
| 11 | 
            +
                <%= local_time(@post.published_at, format: "%B %e, %Y", class: "published-at") %>
         | 
| 12 | 
            +
              </div>
         | 
| 6 13 |  | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
                  </h1>
         | 
| 11 | 
            -
             | 
| 12 | 
            -
                  <%= local_time(@post.published_at, format: "%B %e, %Y", class: "published-at") %>
         | 
| 13 | 
            -
             | 
| 14 | 
            -
                  <div class="tags">
         | 
| 15 | 
            -
                    <%= render @post.tags %>
         | 
| 16 | 
            -
                  </div>
         | 
| 14 | 
            +
              <div class="body">
         | 
| 15 | 
            +
                <%== @post.body_html %>
         | 
| 16 | 
            +
                <%= render @post.author %>
         | 
| 17 17 |  | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 18 | 
            +
                <% if @post.related_posts.length > 0 %>
         | 
| 19 | 
            +
                  <div class="related-posts">
         | 
| 20 | 
            +
                    <h2>Related Posts</h2>
         | 
| 21 | 
            +
                    <hr>
         | 
| 22 | 
            +
                    <div class="related-posts-wrap">
         | 
| 23 | 
            +
                      <%= render @post.related_posts %>
         | 
| 24 | 
            +
                    </div>
         | 
| 20 25 | 
             
                  </div>
         | 
| 21 | 
            -
             | 
| 22 | 
            -
                  <%= render @post.author if @post.author %>
         | 
| 23 | 
            -
                </div>
         | 
| 26 | 
            +
                <% end %>
         | 
| 24 27 | 
             
              </div>
         | 
| 28 | 
            +
            </div>
         | 
| 25 29 |  | 
| 26 | 
            -
             | 
| 27 | 
            -
             | 
| 28 | 
            -
              <% end %>
         | 
| 30 | 
            +
            <% content_for :head do %>
         | 
| 31 | 
            +
              <% render "meta" %>
         | 
| 29 32 | 
             
            <% end %>
         | 
    
        data/lib/blogelator/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: blogelator
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.0. | 
| 4 | 
            +
              version: 1.0.7
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Brian Pattison
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2016- | 
| 11 | 
            +
            date: 2016-03-03 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: codelation_assets
         | 
| @@ -191,3 +191,4 @@ signing_key: | |
| 191 191 | 
             
            specification_version: 4
         | 
| 192 192 | 
             
            summary: Simple blog for Rails apps.
         | 
| 193 193 | 
             
            test_files: []
         | 
| 194 | 
            +
            has_rdoc: 
         |