From 7c1c16fda4cfdfca7e5ff17f358bb7231d572e9a Mon Sep 17 00:00:00 2001 From: Todd Kummer Date: Mon, 18 Nov 2024 10:13:32 -0800 Subject: [PATCH] Add sitemap I added `sitemap: false` to the error pages as well as the about and posts index page. If the latter get updated and are ready for prime time, the flag should be removed. --- Gemfile | 2 ++ Gemfile.lock | 3 +++ config/initializers.rb | 3 +++ src/404.html | 1 + src/500.html | 1 + src/about.md | 1 + src/posts.md | 1 + 7 files changed, 12 insertions(+) diff --git a/Gemfile b/Gemfile index ec5bc1d..55a4a86 100644 --- a/Gemfile +++ b/Gemfile @@ -34,3 +34,5 @@ gem "puma", "< 7" # Or for faster parsing of HTML-only resources via Inspectors, use Nokolexbor: # gem "nokolexbor", "~> 0.4" + +gem "bridgetown-sitemap", "~> 2.0" diff --git a/Gemfile.lock b/Gemfile.lock index f603eda..3c88463 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -52,6 +52,8 @@ GEM zeitwerk (~> 2.5) bridgetown-paginate (1.3.4) bridgetown-core (= 1.3.4) + bridgetown-sitemap (2.0.2) + bridgetown (>= 1.2.0, < 2.0) colorator (1.1.0) concurrent-ruby (1.3.4) connection_pool (2.4.1) @@ -135,6 +137,7 @@ PLATFORMS DEPENDENCIES bridgetown (~> 1.3.4) + bridgetown-sitemap (~> 2.0) puma (< 7) BUNDLED WITH diff --git a/config/initializers.rb b/config/initializers.rb index 0649a17..e9c918b 100644 --- a/config/initializers.rb +++ b/config/initializers.rb @@ -60,4 +60,7 @@ # For more documentation on how to configure your site using this initializers file, # visit: https://edge.bridgetownrb.com/docs/configuration/initializers/ + + # https://github.com/ayushn21/bridgetown-sitemap + init :"bridgetown-sitemap" end diff --git a/src/404.html b/src/404.html index d92829a..bc84fde 100644 --- a/src/404.html +++ b/src/404.html @@ -1,6 +1,7 @@ --- permalink: /404.html layout: default +sitemap: false ---

404

diff --git a/src/500.html b/src/500.html index 9297771..6f1617f 100644 --- a/src/500.html +++ b/src/500.html @@ -1,6 +1,7 @@ --- permalink: /500.html layout: default +sitemap: false ---

500

diff --git a/src/about.md b/src/about.md index 93cce53..61139b4 100644 --- a/src/about.md +++ b/src/about.md @@ -1,6 +1,7 @@ --- layout: page title: About +sitemap: false --- This is the basic Bridgetown site template. You can find out more info about customizing your Bridgetown site, as well as basic Bridgetown usage documentation at [bridgetownrb.com](https://bridgetownrb.com/) diff --git a/src/posts.md b/src/posts.md index f2869c8..5fc7c06 100644 --- a/src/posts.md +++ b/src/posts.md @@ -1,6 +1,7 @@ --- layout: default title: Posts +sitemap: false ---