Skip to content

Commit

Permalink
Update MRG 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dshevtsov committed Oct 4, 2021
1 parent 18d1024 commit bac4a10
Show file tree
Hide file tree
Showing 441 changed files with 1,933 additions and 3,231 deletions.
44 changes: 19 additions & 25 deletions _plugins/generators/mrg_v2_3.rb
Expand Up @@ -6,13 +6,11 @@
# This plugin generates module-specific topics in the 'guides/v2.3/mrg'.
# It takes data from files in '_data/codebase/mrg' and generates
# a virtual .md page for it with the same name.
# The content in data is generated internally from
# modules' READMEs of magento2ce, magento2ee, magento2b2b repositories.
#

module Jekyll
# Custom generator for MRG pages
class Mrg2_3PageGenerator < Generator
class Mrg23PageGenerator < Generator
safe true

def generate(site)
Expand All @@ -28,37 +26,33 @@ def generate(site)
# For example, for '_data/codebase/v2_3/mrg/NewModule.yml' that contains
#
# title: Magento_NewModule
# edition: ce
# content: Magento_NewModule is an awesome module
#
# this will create a new virtual page guides/v2.3/mrg/ce/NewModule.md
# this will create a new virtual page guides/v2.3/mrg/NewModule.md
# that would correspond to:
# ---
# title: Magento_NewModule
# ---
# Magento_NewModule is an awesome module.
#
mrg_data.each do |category, modules|
modules.each do |mod, metadata|
# PageWithoutAFile handles processing files without reading it.
# mrg_topic is a virtual '.md' file
# See details in https://www.rubydoc.info/gems/jekyll/Jekyll/PageWithoutAFile
# See tests in https://github.com/jekyll/jekyll/blob/master/test/test_page_without_a_file.rb
mrg_topic = PageWithoutAFile.new(
@site,
@site.source,
"guides/v2.3/mrg/#{category}",
"#{mod}.md"
)
mrg_topic.content = metadata['content']
mrg_topic.data['title'] = metadata['title']
mrg_topic.data['last_modified_at'] = metadata['last_modified_at']
mrg_topic.process("#{mod}.md")
mrg_data.each do |mod, metadata|
# PageWithoutAFile handles processing files without reading it.
# mrg_topic is a virtual '.md' file
# See details in https://www.rubydoc.info/gems/jekyll/Jekyll/PageWithoutAFile
# See tests in https://github.com/jekyll/jekyll/blob/master/test/test_page_without_a_file.rb
mrg_topic = PageWithoutAFile.new(
@site,
@site.source,
'guides/v2.3/mrg/',
"#{mod}.md"
)
mrg_topic.content = metadata['content']
mrg_topic.data['title'] = metadata['title']
mrg_topic.process("#{mod}.md")

# Add the newly constructed page object to the rest of pages
# on the site.
@site.pages << mrg_topic
end
# Add the newly constructed page object to the rest of pages
# on the site.
@site.pages << mrg_topic
end
end
end
Expand Down
2 changes: 0 additions & 2 deletions _plugins/generators/mrg_v2_4.rb
Expand Up @@ -6,8 +6,6 @@
# This plugin generates module-specific topics in the 'guides/v2.4/mrg'.
# It takes data from files in '_data/codebase/mrg' and generates
# a virtual .md page for it with the same name.
# The content in data is generated internally from
# modules' READMEs of magento2ce, magento2ee, magento2b2b repositories.
#

module Jekyll
Expand Down
30 changes: 0 additions & 30 deletions src/_data/codebase/v2_3/mrg/b2b/B2b.yml

This file was deleted.

36 changes: 0 additions & 36 deletions src/_data/codebase/v2_3/mrg/b2b/BundleNegotiableQuote.yml

This file was deleted.

50 changes: 0 additions & 50 deletions src/_data/codebase/v2_3/mrg/b2b/BundleSharedCatalog.yml

This file was deleted.

49 changes: 0 additions & 49 deletions src/_data/codebase/v2_3/mrg/b2b/Company.yml

This file was deleted.

54 changes: 0 additions & 54 deletions src/_data/codebase/v2_3/mrg/b2b/CompanyCredit.yml

This file was deleted.

46 changes: 0 additions & 46 deletions src/_data/codebase/v2_3/mrg/b2b/CompanyPayment.yml

This file was deleted.

34 changes: 0 additions & 34 deletions src/_data/codebase/v2_3/mrg/b2b/ConfigurableNegotiableQuote.yml

This file was deleted.

0 comments on commit bac4a10

Please sign in to comment.