Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aaf0efa

Browse files
committed
Update documentation
1 parent d5bbbd8 commit aaf0efa

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

_plugins/page-params/page-baseurl-generator.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
# This custom plugin dynamically sets and injects the page.baseurl variable
77
# based on the page's destination.
88
#
9-
# The hook introduces the page.baseurl and
10-
# page.guide_version data parameters for each page.
9+
# The hook introduces the page.baseurl parameter for each page.
1110
# For pages at guides/v2.x the page.baseurl parameter is set
1211
# as "{site.baseurl}/guides/v#{version}".
1312
# The {version} is taken from the 'guide_version' front matter parameter on the page;
14-
# if it is not set, then the 'guide_version' is set to version from the page path (for example, "2.2" in the "guides/v2.2/**/*.md");
15-
# if the path doesn't contain "guides/v2.x", then the version is unset and returns the nil object (same as null)
13+
# if it is not set, then the 'guide_version' is set to version from the _config.yml depending on a scope by path (for example, "2.4" at the "guides/v2.4/");
14+
# otherwise, the version is unset and returns the nil object (same as null).
1615
Jekyll::Hooks.register :pages, :post_init do |page|
1716
# Glossary. Create and assign variables to be used in the script.
1817
baseurl = page.site.baseurl

0 commit comments

Comments
 (0)