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

Commit

Permalink
Merge pull request magento-commerce/devdocs#3230
Browse files Browse the repository at this point in the history
Update the migration log generator
  • Loading branch information
dshevtsov authored Dec 16, 2022
2 parents 8465701 + 365b358 commit 39d85da
Show file tree
Hide file tree
Showing 1,402 changed files with 1,424 additions and 1,415 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,4 @@ _algolia_api_key

/src/mbi/
/src/page-builder/
/src/page-builder-migration/
/src/guides/m1x/
/src/mftf/
36 changes: 23 additions & 13 deletions _plugins/generators/migrated_log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
# See COPYING.txt for license details.

# This plugin generates the page that contains a list of migrated topics: https://devdocs.magento.com/migrated.html
# Also, it adds global data:
# It adds global data:
# - site.data.migration.migrated_pages
# - site.data.migration.deprecated_pages
# - site.data.migration.all_migrating_pages
# - site.data.migration.remained_migrating_pages
#
# And generates the `tmp/migrated-from-to.csv` file with the list of links "from" and "to" for the migrated pages.
# To enable the file generation, add 'migrated_log: generate_file' to _config.local.yml.
#

module Jekyll
# Custom generator for MRG pages
Expand All @@ -19,14 +22,21 @@ class MigratedLog < Generator
def generate(site)
@site = site
pages = @site.pages
migrated_pages = pages.select { |page| page.data['layout']&.include? 'migrated' }
migrated_pages = pages.select { |page| page.data['status']&.include? 'migrated' }
v2_3_pages = pages.select { |page| page.data['guide_version'] == '2.3' }
remained_pages = pages - v2_3_pages
deprecated_pages = remained_pages.select { |page| page.data['group'].nil? || page.data['redirect_to'] }
deprecated_pages = remained_pages.select { |page| page.data['group'].nil? || (page.data['redirect_to'] && !page.data['status']) }
all_migrating_pages = remained_pages - deprecated_pages
remained_migrating_pages = all_migrating_pages - migrated_pages
migrated_pages_data = []

if (site.config['migrated_log']&.include? 'generate_file')
# Create a CSV file that contains links 'from' and 'to' for migrated pages
migrated_pages = pages.select { |pages| pages.data['status']&.include? 'migrated' }
redirects = migrated_pages.map { |page| "https://devdocs.magento.com#{page.data['redirect']['from']},#{page.data['redirect']['to']}" }
File.write('tmp/migrated-from-to.csv', redirects.join("\n"))
end

# Create an array of JSON objects that contain metadata for migrated pages
migrated_pages.each do |page|
migrated_page = {
Expand All @@ -39,27 +49,27 @@ def generate(site)
'label') || abort("Error in '#{page.path}'.\n Check 'group' in the file's frontmatter or 'label' in the corresponding TOC.".red)
end,
migrated_from: site.baseurl + page.url,
migrated_to: page.data['migrated_to'] || abort("Error in '#{page.path}'.\n Check 'migrated_to' in the file's frontmatter.".red),
migrated_to_source: if page.data['migrated_to'].start_with?('https://experienceleague.adobe.com')
'Adobe Experience League'
elsif page.data['migrated_to'].start_with?('https://developer.adobe.com')
'Adobe Developer'
else
abort "Error in '#{page.path}'.\nThe 'migrated_to' parameter in the front matter points to the wrong domain: #{page.data['migrated_to']}.\nShould be 'https://experienceleague.adobe.com' or 'https://developer.adobe.com'".red
end
redirected_to: page.data['redirect_to'] || abort("Error in '#{page.path}'.\n Check 'redirect_to' in the file's frontmatter.".red),
redirected_to_source: if page.data['redirect_to'].start_with?('https://experienceleague.adobe.com')
'Adobe Experience League'
elsif page.data['redirect_to'].start_with?('https://developer.adobe.com')
'Adobe Developer'
else
abort "Error in '#{page.path}'.\nThe 'redirected_to' parameter in the front matter points to the wrong domain: #{page.data['redirect_to']}.\nShould be 'https://experienceleague.adobe.com' or 'https://developer.adobe.com'".red
end
}
migrated_pages_data << migrated_page
end

# Group migrated pages by guide
migrated_pages_by_group = migrated_pages_data.group_by { |page| page[:guide] }.sort.to_h
# Introductory text in the Migrated topics page
content = "The folowing #{migrated_pages.size} topics out of #{all_migrating_pages.size} have been migrated and will be redirected soon.\n\n"
content = "The following #{migrated_pages.size} topics have been migrated and redirected.\n\n"
migrated_pages_by_group.each do |guide, topics|
content += "\n## #{guide}\n\n\n"
topics.sort_by { |topic| topic[:title] }
.each do |topic|
content += "1. [#{topic[:title]}](#{topic[:migrated_from]}) has moved to [#{topic[:migrated_to_source]}](#{topic[:migrated_to]})\n"
content += "1. [#{topic[:title]}](#{topic[:migrated_from]}) has moved to [#{topic[:redirected_to_source]}](#{topic[:redirected_to]})\n"
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/catalog-service/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ group: catalog-service
title: Catalog Service for Adobe Commerce
ee_only: True
redirect_to: https://experienceleague.adobe.com/docs/commerce-merchant-services/catalog-service/overview.html
layout: migrated
status: migrated
---

Catalog Service uses GraphQL queries to provide rich view-model (read-only) catalog data to quickly and fully render product-related content on storefront, including product detail pages and product list pages. Catalog Service, along with [Live Search]({{site.baseurl}}/live-search/overview.html), each implement queries that return information that is not available to the [`products` query]({{site.baseurl}}/guides/v2.4/graphql/queries/products.html) on Adobe Commerce and Magento Open Source. For example, the Catalog Service [`products` query](products.html) treats all products as either simple or complex. Simple products have a single price, while complex products have a price range. The Live Search [`productSearch` query](../live-search/product-search.html) returns detailed facet information.
Expand Down
2 changes: 1 addition & 1 deletion src/catalog-service/products.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ group: catalog-service
title: products query
ee_only: True
redirect_to: https://developer.adobe.com/commerce/webapi/graphql/schema/catalog-service/queries/products/
layout: migrated
status: migrated
---

The Catalog Service for Adobe Commerce `products` query returns details about the SKUs specified as input. Although this query has the same name as the [`products` query]({{site.baseurl}}/guides/v2.4/graphql/queries/products.html) that is provided with core Adobe Commerce and Magento Open Source, there are some differences.
Expand Down
2 changes: 1 addition & 1 deletion src/catalog-service/productsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ group: catalog-service
title: productSearch query
ee_only: True
redirect_to: https://developer.adobe.com/commerce/webapi/graphql/schema/catalog-service/queries/product-search/
layout: migrated
status: migrated
---

The Catalog Service for Adobe Commerce `productSearch` query can use LiveSearch to return details about the SKUs specified as input. Although this query is the same as the [`productSearch` query]({{site.baseurl}}/live-search/product-search.html), LiveSearch returns a `productView` object. See the [`productSearch` query]({{site.baseurl}}/live-search/product-search.html) topic for reference information.
Expand Down
2 changes: 1 addition & 1 deletion src/catalog-service/refine-product.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ group: catalog-service
title: refineProduct query
ee_only: True
redirect_to: https://developer.adobe.com/commerce/webapi/graphql/schema/catalog-service/queries/refine-product/
layout: migrated
status: migrated
---

The `refineProduct` query narrows the results of a `products` query that was run against a complex product. Before you run the `refineProduct` query, you must run the `products` query and construct the response so that it returns a list of `options` within a `ComplexProductView` inline fragment. When a shopper selects a product option (such as size or color) on the storefront, run the `refineProduct` query, specifying the SKU and selected option value IDs as input. Depending on the number of product options the complex product has, you might need to run the `refineProduct` query multiple times, until the shopper has selected a specific variant.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/architecture/cloud-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ functional_areas:
redirect_from:
- /cloud/basic-information/cloud-plans.html
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/architecture/cloud-architecture.html
layout: migrated
status: migrated
---

{{site.data.var.ece}} has a Starter and a Pro plan. Each plan has a unique architecture to drive your {{site.data.var.ee}} development and deployment process. Both the Starter plan and the Pro plan architecture deploy databases, web server, and caching servers across multiple environments for end-to-end testing while supporting continuous integration.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/architecture/pro-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ redirect_from:
functional_areas:
- Cloud
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/architecture/pro-architecture.html
layout: migrated
status: migrated
---

Your {{site.data.var.ece}} Pro architecture supports multiple environments that you can use to develop, test, and launch your store.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/architecture/pro-develop-deploy-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ redirect_from:
functional_areas:
- Cloud
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/architecture/pro-develop-deploy-workflow.html
layout: migrated
status: migrated
---

The {{site.data.var.ece}} Pro plan includes a single Git repository with a Global Master and three main environments: the **Integration** environment for development and testing, the **Staging** environment for testing with all services, and the **Production** environment for launching and maintaining your live site. See [Pro architecture]({{ site.baseurl }}/cloud/architecture/pro-architecture.html) for an overview.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/architecture/scaled-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Scaled architecture
functional_areas:
- Cloud
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/architecture/scaled-architecture.html
layout: migrated
status: migrated
---

The Cloud infrastructure scales according to your resource needs to achieve greater efficiency. The {{site.data.var.ece}} monitors your applications and can adjust capacity to maintain steady, predictable performance. Converting to this architecture helps to mitigate problems, such as latency or large spikes in traffic.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/architecture/starter-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ functional_areas:
redirect_from:
- /cloud/basic-information/starter-architecture.html
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/architecture/starter-architecture.html
layout: migrated
status: migrated
---

Your {{site.data.var.ece}} Starter architecture supports up to **four** environments, including a Master environment that contains the initial project code, the Staging environment, and up to two Integration environments.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/architecture/starter-develop-deploy-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ functional_areas:
redirect_from:
- /cloud/basic-information/starter-develop-deploy-workflow.html
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/architecture/starter-develop-deploy-workflow.html
layout: migrated
status: migrated
---

The {{site.data.var.ece}} includes a single Git repository with a master branch for the Production environment that can be branched to create Staging and Integration environments for testing and development work. You can have up to four active environments, including a `master` environment for your production server. See [Starter architecture]({{ site.baseurl }}/cloud/architecture/starter-architecture.html) for an overview.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/before/before-setup-env-2_clone.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ functional_areas:
- Cloud
- Setup
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/develop/cli-branches.html
layout: migrated
status: migrated
---

{:.ref-header}
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/before/before-setup-env-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ functional_areas:
- Setup
- Configuration
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/develop/overview.html
layout: migrated
status: migrated
---

{:.ref-header}
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/before/before-workspace-file-sys-owner.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ functional_areas:
- Cloud
- Setup
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/dev-tools/cloud-cli.html
layout: migrated
status: migrated
---

{:.ref-header}
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/before/before-workspace-magento-prereqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ functional_areas:
- Setup
- Configuration
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/develop/overview.html
layout: migrated
status: migrated
---

{:.ref-header}
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/before/before-workspace-ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ functional_areas:
- Security
- Config
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/develop/secure-connections.html
layout: migrated
status: migrated
---

{:.ref-header}
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/before/before-workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ functional_areas:
- Cloud
- Setup
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/project/overview.html
layout: migrated
status: migrated
---

To develop, deploy, and test {{site.data.var.ece}}, you need to setup your local environment and clone your project's master Git branch. This local environment provides a development system for your custom code, extensions, and configurations to push for active testing in one of the Integration environments.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/bk-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Cloud guide for Commerce
functional_areas:
- Cloud
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/overview.html
layout: migrated
status: migrated
---

{{site.data.var.ece}} is a managed, automated hosting platform for the {{site.data.var.ee}} software. {{site.data.var.ece}} comes with additional features that set it apart from the on-premises {{site.data.var.ee}} and {{site.data.var.ce}} platforms:
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/cdn/cloud-fastly-custom-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ functional_areas:
- Setup
- Configuration
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/setup-fastly/fastly-custom-response.html
layout: migrated
status: migrated
---

When a request to the Fastly origin fails, Fastly returns default response pages with basic formatting and generic messaging that can be confusing for users. For example, Fastly returns the following default error page when a request to the Fastly origin fails because of a 503 error.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/cdn/cloud-fastly.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ functional_areas:
- Setup
- Security
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/fastly.html
layout: migrated
status: migrated
---

{:.bs-callout-warning}
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/cdn/cloud-vcl-custom-snippets.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ functional_areas:
- Cloud
- Setup
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/custom-vcl-snippets/fastly-vcl-custom-snippets.html
layout: migrated
status: migrated
---

Fastly supports a customized version of the Varnish Configuration Language (VCL) to customize the Fastly service configuration. For example, you can allow, block, or redirect access for specific users or IPs using VCL code blocks in combination with edge and ACL dictionaries.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/cdn/configure-fastly-customize-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ functional_areas:
- Setup
- Configuration
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/setup-fastly/fastly-custom-cache-configuration.html
layout: migrated
status: migrated
---

After you enable and verify the Fastly service in your Staging and Production environments, you can review and customize cache configuration settings like enabling force TLS to redirect HTTP requests to Fastly, updating purge settings, enabling basic authentication to password-protect your site during development, and setting up GeoIP support.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/cdn/configure-fastly.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ functional_areas:
- Setup
- Configuration
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/setup-fastly/fastly-configuration.html
layout: migrated
status: migrated
---

[Fastly]({{ site.baseurl }}/cloud/cdn/cloud-fastly.html) is required for {{site.data.var.ece}}, and is used in Staging and Production environments. It works with Varnish to provide fast caching capabilities and a [Content Delivery Network](https://glossary.magento.com/content-delivery-network) (CDN) for static assets. Fastly also provides a Web Application Firewall (WAF) to secure your site and Cloud infrastructure. You must route all incoming site traffic through Fastly to protect your site and Cloud infrastructure from malicious traffic and attacks.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/cdn/fastly-image-optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ functional_areas:
- Setup
- Configuration
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/fastly-image-optimization.html
layout: migrated
status: migrated
---

Fastly image optimization (Fastly IO) provides real-time image manipulation and optimization to speed up image delivery and simplify maintenance of image source sets for responsive web applications. Once configured Fastly IO provides the following image optimization features:
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/cdn/fastly-vcl-allowlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ redirect_from:
- /cloud/configure/fastly-vcl-whitelist.html
- /cloud/cdn/fastly-vcl-whitelist.html
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/custom-vcl-snippets/fastly-vcl-allowlist.html
layout: migrated
status: migrated
---

You can use a Fastly Edge ACL list in combination with a custom VCL code snippet to filter incoming requests and allow access by IP address. The ACL list specifies the IP addresses to allow.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/cdn/fastly-vcl-badreferer.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ functional_areas:
- Cloud
- Setup
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/custom-vcl-snippets/fastly-vcl-badreferer.html
layout: migrated
status: migrated
---

The following example shows how to configure [Fastly Edge Dictionary](https://docs.fastly.com/guides/edge-dictionaries/working-with-dictionaries-using-the-api) with a custom VCL snippet to block referral spam from your {{ site.data.var.ece }} site.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/cdn/fastly-vcl-blocking.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ functional_areas:
- Cloud
- Setup
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/custom-vcl-snippets/fastly-vcl-blocking.html
layout: migrated
status: migrated
---

You can use the Fastly CDN module for Magento 2 to create an Edge ACL with a list of IP addresses that you want to block. Then, you can use that list in combination with a VCL snippet to block incoming requests. The code checks the IP address of the incoming request. If it matches an IP address included in the ACL list, Fastly blocks the request from accessing your site and returns a `403 Forbidden error`. All other client IPs are allowed access.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/cdn/fastly-vcl-bypass-to-origin.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ functional_areas:
- Cloud
- Setup
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/custom-vcl-snippets/fastly-vcl-bypass-to-origin.html
layout: migrated
status: migrated
---

You can create a custom VCL snippet to bypass the Fastly cache so you can troubleshoot request traffic to the origin server, for example to determine whether site issues are caused by caching, or to troubleshoot headers.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/cdn/fastly-vcl-wordpress.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ functional_areas:
- Cloud
- Setup
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/custom-vcl-snippets/fastly-vcl-wordpress.html
layout: migrated
status: migrated
---

The following procedure describes how to reroute incoming requests from a {{ site.data.var.ee }} store to a separate WordPress site using the Fastly edge module _Other CMS/backend integration_ with an Edge dictionary. You can follow a similar process to reroute requests to other CMS backends.
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/cdn/fastly-waf-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ functional_areas:
- Security
- Compliance
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/fastly-waf-service.html
layout: migrated
status: migrated
---

Powered by Fastly, the web application firewall (WAF) service for {{ site.data.var.ece }} detects, logs, and blocks malicious request traffic before it can damage your sites or network. The WAF service is available on production environments only.
Expand Down
Loading

0 comments on commit 39d85da

Please sign in to comment.