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
JavaScript
x
2
1
"<data:post.url/>".replace("<data:blog.homepageUrl/>","/");
2
Edit
Place the following code before </body>
JavaScript
1
8
1
<b:if cond='data:view.isMultipleItems'>
2
<script>
3
document.querySelectorAll('.entry-title-link').forEach(function (e) {
4
e.href = e.href.replace('<data:blog.homepageUrl/>','/');
5
});
6
</script>
7
</b:if>
8