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

Kirstin Seidel-Gebert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 11, 2017

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 at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 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

 

Kirstin Seidel-Gebert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 5, 2017

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

Kirstin Seidel-Gebert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 12, 2017

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.

Kirstin Seidel-Gebert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 12, 2017

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events