Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H1 Header Tag Usage #506

Open
hugo-mcfrojd opened this issue Jul 25, 2024 · 3 comments
Open

H1 Header Tag Usage #506

hugo-mcfrojd opened this issue Jul 25, 2024 · 3 comments

Comments

@hugo-mcfrojd
Copy link

When i try my page with a SEO optimizer it complains about "H1 Header Tag Usage"

Your page has more than one H1 Tag. It is generally recommended to only use one H1 Tag on a page.
The H1 Header Tag is an important way of signaling to search engines what your content is about, and subsequently the keywords it should rank for.

I use bigimg on my landing page and when i look at the generated html code i see that there is 2 div classes in the code.

  1. <div class="intro-header big-img" xxx>
  2. <div class="intro-header no-img">

Which contains my h1 header tag twice.

<header class="header-section has-img">

      <div class="intro-header big-img" style="background-image: url(&quot;images/europa.jpg&quot;);">
        <div class="container">
          <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
              <div class="page-heading">
                <h1>HUSBILEN DORIS</h1>
              </div>
            </div>
          </div>
        </div>
        <span class="img-desc" style="display: none;"></span>
      </div>
    
    <div class="intro-header no-img">
      <div class="container">
        <div class="row">
          <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
            <div class="page-heading">
                <h1>HUSBILEN DORIS</h1>
                <hr class="small">
            </div>
          </div>
        </div>
      </div>
    </div>
  
  </header>

My guess is that the <div class="intro-header no-img"> should only be rendered when NOT using bigimg?

Is there a way to change this, or is this by design?

@hydr0nium
Copy link
Contributor

hydr0nium commented Jul 29, 2024

Did you check the source template on how the site is generated, to see if there might be a bug in the code?

@hugo-mcfrojd
Copy link
Author

When you say the "source template" do you mean the BeautifulHugo template?
I am using BeautifulHugo as an imported module.

@hydr0nium
Copy link
Contributor

Yes I mean the Beautiful Hugo Template source files, because no matter if you are using git submodules or hugo modules it should be using the files on github. I assume there might be a logic error in the files where bigimgs are being created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants