jekyll-vitepress-theme 1.12.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 44d2fd26511e4e91bc4e9e51c781e5839aaba113b98a41e14d5a41679d4579ab
|
|
4
|
+
data.tar.gz: 795966c63dc7e849ed693c405869780512f9d24142f63bf2826049d175e4b1c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b9b662c2a541fc3b316a3b5a3f8753e648d68101a353833527799466888d360a140de8934027b32165a17f0232b19bbf739cd1cd0d7aa2a1ea97e1192953e9b
|
|
7
|
+
data.tar.gz: 8e57ceabe73f98152ab8a032856b8100981cfa087060a7747453e3bbf2715bb75cd86ab04dc50549444433a5f6798eec64d79a06d44177c7b9405016de92e28b
|
|
@@ -146,6 +146,7 @@ module Jekyll
|
|
|
146
146
|
def robots_for(item, page_config, config)
|
|
147
147
|
explicit = page_config['robots'] || item.data['robots']
|
|
148
148
|
return clean_text(explicit) if explicit && explicit != true
|
|
149
|
+
return 'noindex,follow' if other_version_hidden?(item.site, config)
|
|
149
150
|
|
|
150
151
|
site_index = !config.is_a?(Hash) || config.fetch('index', true) != false
|
|
151
152
|
noindex = page_config['noindex'] == true || item.data['noindex'] == true || !site_index
|
|
@@ -540,6 +541,14 @@ module Jekyll
|
|
|
540
541
|
nil
|
|
541
542
|
end
|
|
542
543
|
|
|
544
|
+
# Next and older versions repeat most of the stable pages, so search
|
|
545
|
+
# engines should index only the stable docs unless the site opts in.
|
|
546
|
+
def other_version_hidden?(site, config)
|
|
547
|
+
return false if Versions.stable?(site)
|
|
548
|
+
|
|
549
|
+
!(config.is_a?(Hash) && config['index_versions'] == true)
|
|
550
|
+
end
|
|
551
|
+
|
|
543
552
|
def sitemap_enabled?(config)
|
|
544
553
|
config.fetch('index', true) != false && config.fetch('sitemap', true) != false
|
|
545
554
|
end
|
|
@@ -296,13 +296,15 @@ module Jekyll
|
|
|
296
296
|
end
|
|
297
297
|
|
|
298
298
|
# Search engines find the stable sitemap through robots.txt; the other
|
|
299
|
-
# versions' sitemaps are listed beside it
|
|
299
|
+
# versions' sitemaps are listed beside it when they list any page, which
|
|
300
|
+
# they only do when `seo.index_versions` lets those versions be indexed.
|
|
300
301
|
def list_sitemaps(versions)
|
|
301
302
|
robots = File.join(destination, 'robots.txt')
|
|
302
303
|
return unless File.file?(robots) && File.read(robots).match?(/^Sitemap:/)
|
|
303
304
|
|
|
304
305
|
lines = versions.filter_map do |version|
|
|
305
|
-
|
|
306
|
+
sitemap = File.join(version.output, 'sitemap.xml')
|
|
307
|
+
next unless File.file?(sitemap) && File.read(sitemap).include?('<loc>')
|
|
306
308
|
|
|
307
309
|
"Sitemap: #{@site_url}#{baseurl}#{version.path}sitemap.xml"
|
|
308
310
|
end
|