How to get rid of the h1 tag around the Confluence logo?

Hi all,

we use Confluence to host our official product documentation and recently a SEO agency analyzed our pages.
They pointed out that from a SEO optimization point of view <h1> tags should only be used once per page. What is really bad about Confluence is that the Confluence logo is wrapped in h1.

I tried to remove the tag (or more replace it by a p tag, or so)

  • by editing the site layouts via Confluence
  • by editing decorator files directly from the file system.

Unfortunately, I did not succeed. I found a setup.vmd that seems to contain this, but editing the file (and restarting Confluence) had no effect. The h1 tags are still in  place.

Does anybody have an idea how to change this?

Cheers,
Kirstin

1 answer

1 accepted

0 votes
Answer accepted
David Simpson Community Champion Jul 13, 2017

Looking at this code in decorators/includes/common-header.vm:

<header id="header" role="banner">
$soyTemplateRendererHelper.getRenderedTemplateHtml("com.atlassian.auiplugin:aui-experimental-soy-templates", "aui.page.header.soy", $templateParameters)
<br class="clear">
</header>

It looks like that is generated in a soy template in an add-on.

Have a look for an add-on with the following key:

com.atlassian.auiplugin:aui-experimental-soy-templates

 

Thanks, David. Unfortunately, I'm not an add-on programer, but perhaps some of my colleagues can have a look at this.

It wasn't that hard, finally and I could fix it myself.

I found /opt/atlassian/confluence/confluence/WEB-INF/atlassian-bundled-plugins/auiplugin-5.9.24.jar, that contains a soy template page.soy. There, I replaced the <h1> tags in

<h1 id="logo" class="aui-header-logo{if $headerLogoImageUrl} aui-header-logo-custom{elseif $logo} aui-header-logo-{$logo}{/if}">
                <a href="{($headerLink ? $headerLink : '/')}">
                    {if $headerLogoImageUrl}
                        <img src="{$headerLogoImageUrl}" alt="{$headerLogoText}" />
                    {else}
                        <span class="aui-header-logo-device">{($headerLogoText? $headerLogoText : '')}</span>
                    {/if}
                    {if $headerText}<span class="aui-header-logo-text">{$headerText}</span>{/if}
                </a>
            </h1>

by <p> tags and restarted Confluence.

Done.

Thanks, David, for hinting at this add-on.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Tuesday in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

193 views 2 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you