How to manipulate strings in a Blogger template. Impossible?

This question is about manipulating Blogger templates . People who design / modify or manipulate Blogger templates know their syntax in some way, therefore they can provide some input.

I write a blog on Blogger, and I changed my blog template so that the posts display the HTML head name differently (first the publication name) by default (the name of the blogs first).

But. Since I format my built-in program code words in the same way as Stackoverflow (gray background with a monolayer) and do the same when I use any of them in the blog heading ... I will enclose such code words inside the <code/> element, and then I have CSS installed for this particular element to add it to a gray background and set a font with a monolayer on it. This formatting works with the blog headings and its contents.

But the problem is that these <code/> tags that I use are also displayed in the HTML head title (displayed in the title bar of the browser window). More importantly, they appear in web search results . This is even more annoying.

The default template uses <data:blog.pageTitle/> in the title element, which removes any tags, but displays all the headings as the blog name: blog post title (Google search results are completely meaningless because the blog title is disabled). That's why I use <data:blog.pageName/> instead to only display the blog title in my head, but it still has all the tags, and I have to somehow disable them.

Mark this blog comment . Download it and look at the title bar of the browser window on which the tags are still displayed. I want them to leave.

How to remove tags from message header when adding it to head element?

+4
source share
1 answer

UPDATED

ok, so far this is what I developed:

  • in settings β†’ Title β†’ put nice &nbsp;
  • use <data:blog.pageTitle/> as the name;
  • under design -> change html -> replace tez lines

 <b:section class='header' id='header' maxwidgets='1' showaddelement='no'> <b:widget id='Header1' locked='true' title=' (Intestazione)' type='Header'/> </b:section> 

with your custom title for example

 <div class="header section" id="header"> <div class="widget Header" id="Header1"> <div id="header-inner"> <div class="titlewrapper"> <h1 class="title"> <a href="http://aseptik.blogspot.com/">aSeptik Site</a></h1> </div> <div class="descriptionwrapper"> <p class="description"> <span> </span> </p> </div> </div> </div> </div> 

<title> will be obtained from:

 jQuery <em>"scroll into view"</em> plugin (with an additional <code>":scrollable"</code> selector filter) 

to

 : jQuery "scroll into view" plugin (with an additional ":scrollable" selector filter) 

hope this help demo http://aseptik.blogspot.com/2011/02/jquery-scroll-into-view-plugin-with.html


try a little javascript in your <body> like this

 <script type='text/javascript'> document.title = document.title.replace(/(&lt;([^&gt;]+)&gt;)/ig,&#39;&#39;); </script> </body> 

copy and skip, since not converting entities,

although I’m not sure if this is the right solution for you, spiders usually avoid running js, and I don’t know how the "html tags in the header" affects the search results.

+3
source

Source: https://habr.com/ru/post/1337454/


All Articles