Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit d4e8399

Browse files
authored
Merge branch 'master' into imported-magento-devdocs-9131
2 parents 3b80128 + 96200ca commit d4e8399

File tree

1,452 files changed

+53413
-22908
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,452 files changed

+53413
-22908
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
GIT
22
remote: https://github.com/magento-devdocs/devdocs-theme.git
3-
revision: db7dbc1cc59ebacdc293be883683a3351cf84a8f
3+
revision: c437253c75119e8c890b7e8e968ddf812205085c
44
specs:
5-
devdocs (15)
5+
devdocs (16)
66
jekyll (>= 4.0)
77

88
GEM

_plugins/generators/mrg_v2_4.rb

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
module Jekyll
1414
# Custom generator for MRG pages
15-
class Mrg2_4PageGenerator < Generator
15+
class Mrg24PageGenerator < Generator
1616
safe true
1717

1818
def generate(site)
@@ -28,37 +28,33 @@ def generate(site)
2828
# For example, for '_data/codebase/v2_4/mrg/NewModule.yml' that contains
2929
#
3030
# title: Magento_NewModule
31-
# edition: ce
3231
# content: Magento_NewModule is an awesome module
3332
#
34-
# this will create a new virtual page guides/v2.4/mrg/ce/NewModule.md
33+
# this will create a new virtual page guides/v2.4/mrg/NewModule.md
3534
# that would correspond to:
3635
# ---
3736
# title: Magento_NewModule
3837
# ---
3938
# Magento_NewModule is an awesome module.
4039
#
41-
mrg_data.each do |category, modules|
42-
modules.each do |mod, metadata|
43-
# PageWithoutAFile handles processing files without reading it.
44-
# mrg_topic is a virtual '.md' file
45-
# See details in https://www.rubydoc.info/gems/jekyll/Jekyll/PageWithoutAFile
46-
# See tests in https://github.com/jekyll/jekyll/blob/master/test/test_page_without_a_file.rb
47-
mrg_topic = PageWithoutAFile.new(
48-
@site,
49-
@site.source,
50-
"guides/v2.4/mrg/#{category}",
51-
"#{mod}.md"
52-
)
53-
mrg_topic.content = metadata['content']
54-
mrg_topic.data['title'] = metadata['title']
55-
mrg_topic.data['last_modified_at'] = metadata['last_modified_at']
56-
mrg_topic.process("#{mod}.md")
40+
mrg_data.each do |mod, metadata|
41+
# PageWithoutAFile handles processing files without reading it.
42+
# mrg_topic is a virtual '.md' file
43+
# See details in https://www.rubydoc.info/gems/jekyll/Jekyll/PageWithoutAFile
44+
# See tests in https://github.com/jekyll/jekyll/blob/master/test/test_page_without_a_file.rb
45+
mrg_topic = PageWithoutAFile.new(
46+
@site,
47+
@site.source,
48+
'guides/v2.4/mrg/',
49+
"#{mod}.md"
50+
)
51+
mrg_topic.content = metadata['content']
52+
mrg_topic.data['title'] = metadata['title']
53+
mrg_topic.process("#{mod}.md")
5754

58-
# Add the newly constructed page object to the rest of pages
59-
# on the site.
60-
@site.pages << mrg_topic
61-
end
55+
# Add the newly constructed page object to the rest of pages
56+
# on the site.
57+
@site.pages << mrg_topic
6258
end
6359
end
6460
end

0 commit comments

Comments
 (0)