Posts

Showing posts from February, 2025

How To Build An Archive Page for Blogger

Bloggers have discussed an archive page for blogger blogs, and the posts are grouped by month. Since I don’t have many posts, an archive page with posts archived by year is fine. Method 1 I asked Google Gemini, and it provided me with a piece of JavaScript code. The code works properly, if you would like to add an archive page, follow the steps below. 1 Go to layout, add a gadget, and choose the Blog Archive gadget. 2 Add a new page, and pick a name you like. The page name will be the slug in the page URL. 3 Switch to HTML mode and paste the following code. Set the robots.txt meta tag for the page and hit the Publish button. //This code was generated by Google's Gemini AI. <div id="custom-archive"></div> <script type="text/javascript"> function createArchive() { // 1. Get blog URL (Blogger provides this automatically) var blogUrl = window.location.protocol + "//" + window.location.host; // 2. Function to fetch pos...