jpescador / hugo-future-imperfect

A ported theme with some extras for the Hugo static website engine
MIT License
308 stars 227 forks source link

Recent posts should be a class not ID #105

Closed rlees85 closed 6 years ago

rlees85 commented 6 years ago

Prerequisites:

Expected Behaviour

Output HTML is valid. Elements with an ID should only appear once. For elements that appear more than once should use CLASS.

Current Behavior

recent-posts section appears in the HTML code twice, with an ID rather than class. This causes HTML validation to fail. The section appears twice on all rendered pages.

<section id="recent-posts">

  <div class="mini-posts">
  <header>
  <h3>Recent Posts</h3>
  </header>
   
   
    
    
    
    
    
  <article class="mini-post">
  <header>
  <h3><a href="/blog/welcome/">Home</a></h3>
    
  <time class="published" datetime=
  '2017-11-12'>
  November 12, 2017</time>
  </header>
   
   
  </article>
   
    
   
  </div>
  </section>

Possible Solution

<section class="recent-posts">

With CSS updated to match.

Steps to Reproduce or Template with Error (for bugs)

Context

Attempting to use Hugo with CI. For the testing stage trying to use HTML proofer. So far this theme as a few failures, this being one of them. I really like the theme, so would like to try and get them resolved. I am happy to submit a PR if it helps?

Your Environment

https://gitlab.com/rlees85-hugo/bitservices/

Fixes

https://github.com/jpescador/hugo-future-imperfect/issues/102

pacollins commented 6 years ago

Good catch. Merging now.