Skip to content
Advertisement

Blogger post url prefix

It looks like this when I use data:post.url in Blogger;

blogname.blogspot.com/2021/01/post-name.html

the shape I want to show; /2021/04/post-name.html

How can I achieve this?

Advertisement

Answer

You can do that with JavaScript

"<data:post.url/>".replace("<data:blog.homepageUrl/>","/");

Edit

Place the following code before </body>

<b:if cond='data:view.isMultipleItems'>
    <script>
            document.querySelectorAll('.entry-title-link').forEach(function (e) {
                e.href = e.href.replace('<data:blog.homepageUrl/>','/');
            });
    </script>
</b:if>
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement