From 4f394e602c40ef7d796114d7382c6969d4ad11d1 Mon Sep 17 00:00:00 2001 From: Dmytro Shevtsov Date: Tue, 7 Jun 2022 17:26:33 -0500 Subject: [PATCH] Mark the MRG as migrated Update MRG url in main navigation --- _config.yml | 2 +- _plugins/generators/migrated_log.rb | 3 +-- _plugins/generators/mrg_v2_4.rb | 1 + src/_data/main-nav.yml | 5 +++++ src/guides/v2.4/mrg/intro.md | 15 ++++++++++++++- 5 files changed, 22 insertions(+), 4 deletions(-) mode change 120000 => 100644 src/guides/v2.4/mrg/intro.md diff --git a/_config.yml b/_config.yml index b534866884b..3c2ffc81fb2 100644 --- a/_config.yml +++ b/_config.yml @@ -127,7 +127,7 @@ defaults: path: guides/v2.4/mrg values: group: module-reference-guide-2_4 - github_link: false + layout: migrated - scope: diff --git a/_plugins/generators/migrated_log.rb b/_plugins/generators/migrated_log.rb index 06b51415c57..e35101005f1 100644 --- a/_plugins/generators/migrated_log.rb +++ b/_plugins/generators/migrated_log.rb @@ -36,8 +36,7 @@ def generate(site) migrated_pages_data << migrated_page end - migrated_pages_by_group = migrated_pages_data.group_by { |page| page[:guide] } - + migrated_pages_by_group = migrated_pages_data.group_by { |page| page[:guide] }.sort.to_h content = "The folowing is the list of topics that have been migrated and will be redirected soon.\n\n" migrated_pages_by_group.each do |guide, topics| content += "\n## #{guide}\n\n\n" diff --git a/_plugins/generators/mrg_v2_4.rb b/_plugins/generators/mrg_v2_4.rb index 55fe063135f..d2040b0e402 100644 --- a/_plugins/generators/mrg_v2_4.rb +++ b/_plugins/generators/mrg_v2_4.rb @@ -48,6 +48,7 @@ def generate(site) ) mrg_topic.content = metadata['content'] mrg_topic.data['title'] = metadata['title'] + mrg_topic.data['migrated_to'] = 'https://developer.adobe.com/commerce/php/module-reference/' + mrg_topic.url.split('/').pop.sub('.html', '/') mrg_topic.process("#{mod}.md") # Add the newly constructed page object to the rest of pages diff --git a/src/_data/main-nav.yml b/src/_data/main-nav.yml index 5539531e02e..b3356604290 100644 --- a/src/_data/main-nav.yml +++ b/src/_data/main-nav.yml @@ -105,6 +105,11 @@ - label: Module Reference Guide url: /mrg/intro.html + include_versions: ["2.3"] + + - label: Module Reference Guide + url: https://developer.adobe.com/commerce/php/module-reference/ + include_versions: ["2.4"] - label: Coding Standards url: /coding-standards/bk-coding-standards.html diff --git a/src/guides/v2.4/mrg/intro.md b/src/guides/v2.4/mrg/intro.md deleted file mode 120000 index 9ab771986a3..00000000000 --- a/src/guides/v2.4/mrg/intro.md +++ /dev/null @@ -1 +0,0 @@ -../../v2.3/mrg/intro.md \ No newline at end of file diff --git a/src/guides/v2.4/mrg/intro.md b/src/guides/v2.4/mrg/intro.md new file mode 100644 index 00000000000..235fef24f0e --- /dev/null +++ b/src/guides/v2.4/mrg/intro.md @@ -0,0 +1,14 @@ +--- +title: Introduction to the Module Reference Guide +migrated_to: https://developer.adobe.com/commerce/php/module-reference/ +--- + +The [Module](https://glossary.magento.com/module) Reference Guide contains brief descriptions for the modules specific to {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.b2b}}. All module topics are generated from the corresponding README files in the codebase. + +{:.ref-header} +Related topics + +- [Building a new Magento module]({{ page.baseurl }}/extension-dev-guide/bk-extension-dev-guide.html) +- [How to enable/disable a Magento module]({{ page.baseurl }}/install-gde/install/cli/install-cli-subcommands-enable.html) +- [SOAP Reference]({{ page.baseurl }}/soap/bk-soap.html) +- [REST Reference]({{ page.baseurl }}/rest/bk-rest.html) \ No newline at end of file