Skip to content

Commit ec9ea2d

Browse files
committed
Generate sitemap and add to robots.txt
Signed-off-by: Ruby Iris Juric <[email protected]>
1 parent c062ac0 commit ec9ea2d

File tree

5 files changed

+19
-3
lines changed

5 files changed

+19
-3
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ ruby file: '.ruby-version'
1818
gem 'slugize', '>= 0.0.3'
1919
gem 'jekyll', '>= 3.0.3'
2020
gem 'jekyll-paginate'
21+
gem 'jekyll-sitemap'
2122
gem 'bundler', '>= 1.7.9'
2223
gem 'nokogiri', '>= 1.6.3.1'
2324
gem 'algolia', '>= 3.22.0'

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ GEM
9898
jekyll-paginate (1.1.0)
9999
jekyll-sass-converter (3.1.0)
100100
sass-embedded (~> 1.75)
101+
jekyll-sitemap (1.4.0)
102+
jekyll (>= 3.7, < 5.0)
101103
jekyll-watch (2.2.1)
102104
listen (~> 3.0)
103105
json (2.13.0)
@@ -262,6 +264,7 @@ DEPENDENCIES
262264
htmlentities (>= 4.3.2)
263265
jekyll (>= 3.0.3)
264266
jekyll-paginate
267+
jekyll-sitemap
265268
newrelic_rpm (>= 3.9.8.273)
266269
nokogiri (>= 1.6.3.1)
267270
pygments.rb

_config.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ plugins_dir: plugins/
2727

2828
debug: true
2929

30-
plugins: [jekyll-paginate]
30+
plugins:
31+
- jekyll-paginate
32+
- jekyll-sitemap
3133

3234
# Blog Options
3335
permalink: none
@@ -138,4 +140,11 @@ defaults:
138140
values:
139141
layout: sdk/changelog
140142
generate_toc: true
141-
143+
- scope:
144+
path: developer.pebble.com
145+
values:
146+
sitemap: false
147+
- scope:
148+
path: developer.getpebble.com
149+
values:
150+
sitemap: false

plugins/generator_redirects.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def initialize(site, base, dir, name, redirect_to)
7171
process(@name)
7272
read_yaml(File.join(base, '_layouts', 'utils'), 'redirect_permanent.html')
7373
data['redirect_to'] = redirect_to.delete_suffix('index.html')
74+
data['sitemap'] = false
7475
end
7576
end
7677
end

source/robots.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
User-agent: *
2-
Allow: /
2+
Allow: /
3+
4+
Sitemap: https://developer.rebble.io/sitemap.xml

0 commit comments

Comments
 (0)