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

Commit 39d85da

Browse files
authored
Merge pull request magento-commerce/devdocs#3230
Update the migration log generator
2 parents 8465701 + 365b358 commit 39d85da

File tree

1,402 files changed

+1424
-1415
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,402 files changed

+1424
-1415
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,4 @@ _algolia_api_key
2727

2828
/src/mbi/
2929
/src/page-builder/
30-
/src/page-builder-migration/
31-
/src/guides/m1x/
3230
/src/mftf/

_plugins/generators/migrated_log.rb

+23-13
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
# See COPYING.txt for license details.
55

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

1417
module Jekyll
1518
# Custom generator for MRG pages
@@ -19,14 +22,21 @@ class MigratedLog < Generator
1922
def generate(site)
2023
@site = site
2124
pages = @site.pages
22-
migrated_pages = pages.select { |page| page.data['layout']&.include? 'migrated' }
25+
migrated_pages = pages.select { |page| page.data['status']&.include? 'migrated' }
2326
v2_3_pages = pages.select { |page| page.data['guide_version'] == '2.3' }
2427
remained_pages = pages - v2_3_pages
25-
deprecated_pages = remained_pages.select { |page| page.data['group'].nil? || page.data['redirect_to'] }
28+
deprecated_pages = remained_pages.select { |page| page.data['group'].nil? || (page.data['redirect_to'] && !page.data['status']) }
2629
all_migrating_pages = remained_pages - deprecated_pages
2730
remained_migrating_pages = all_migrating_pages - migrated_pages
2831
migrated_pages_data = []
2932

33+
if (site.config['migrated_log']&.include? 'generate_file')
34+
# Create a CSV file that contains links 'from' and 'to' for migrated pages
35+
migrated_pages = pages.select { |pages| pages.data['status']&.include? 'migrated' }
36+
redirects = migrated_pages.map { |page| "https://devdocs.magento.com#{page.data['redirect']['from']},#{page.data['redirect']['to']}" }
37+
File.write('tmp/migrated-from-to.csv', redirects.join("\n"))
38+
end
39+
3040
# Create an array of JSON objects that contain metadata for migrated pages
3141
migrated_pages.each do |page|
3242
migrated_page = {
@@ -39,27 +49,27 @@ def generate(site)
3949
'label') || abort("Error in '#{page.path}'.\n Check 'group' in the file's frontmatter or 'label' in the corresponding TOC.".red)
4050
end,
4151
migrated_from: site.baseurl + page.url,
42-
migrated_to: page.data['migrated_to'] || abort("Error in '#{page.path}'.\n Check 'migrated_to' in the file's frontmatter.".red),
43-
migrated_to_source: if page.data['migrated_to'].start_with?('https://experienceleague.adobe.com')
44-
'Adobe Experience League'
45-
elsif page.data['migrated_to'].start_with?('https://developer.adobe.com')
46-
'Adobe Developer'
47-
else
48-
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
49-
end
52+
redirected_to: page.data['redirect_to'] || abort("Error in '#{page.path}'.\n Check 'redirect_to' in the file's frontmatter.".red),
53+
redirected_to_source: if page.data['redirect_to'].start_with?('https://experienceleague.adobe.com')
54+
'Adobe Experience League'
55+
elsif page.data['redirect_to'].start_with?('https://developer.adobe.com')
56+
'Adobe Developer'
57+
else
58+
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
59+
end
5060
}
5161
migrated_pages_data << migrated_page
5262
end
5363

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

src/catalog-service/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ group: catalog-service
33
title: Catalog Service for Adobe Commerce
44
ee_only: True
55
redirect_to: https://experienceleague.adobe.com/docs/commerce-merchant-services/catalog-service/overview.html
6-
layout: migrated
6+
status: migrated
77
---
88

99
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.

src/catalog-service/products.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ group: catalog-service
33
title: products query
44
ee_only: True
55
redirect_to: https://developer.adobe.com/commerce/webapi/graphql/schema/catalog-service/queries/products/
6-
layout: migrated
6+
status: migrated
77
---
88

99
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.

src/catalog-service/productsearch.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ group: catalog-service
33
title: productSearch query
44
ee_only: True
55
redirect_to: https://developer.adobe.com/commerce/webapi/graphql/schema/catalog-service/queries/product-search/
6-
layout: migrated
6+
status: migrated
77
---
88

99
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.

src/catalog-service/refine-product.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ group: catalog-service
33
title: refineProduct query
44
ee_only: True
55
redirect_to: https://developer.adobe.com/commerce/webapi/graphql/schema/catalog-service/queries/refine-product/
6-
layout: migrated
6+
status: migrated
77
---
88

99
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.

src/cloud/architecture/cloud-architecture.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ functional_areas:
66
redirect_from:
77
- /cloud/basic-information/cloud-plans.html
88
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/architecture/cloud-architecture.html
9-
layout: migrated
9+
status: migrated
1010
---
1111

1212
{{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.

src/cloud/architecture/pro-architecture.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ redirect_from:
88
functional_areas:
99
- Cloud
1010
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/architecture/pro-architecture.html
11-
layout: migrated
11+
status: migrated
1212
---
1313

1414
Your {{site.data.var.ece}} Pro architecture supports multiple environments that you can use to develop, test, and launch your store.

src/cloud/architecture/pro-develop-deploy-workflow.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ redirect_from:
88
functional_areas:
99
- Cloud
1010
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/architecture/pro-develop-deploy-workflow.html
11-
layout: migrated
11+
status: migrated
1212
---
1313

1414
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.

src/cloud/architecture/scaled-architecture.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Scaled architecture
44
functional_areas:
55
- Cloud
66
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/architecture/scaled-architecture.html
7-
layout: migrated
7+
status: migrated
88
---
99

1010
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.

src/cloud/architecture/starter-architecture.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ functional_areas:
66
redirect_from:
77
- /cloud/basic-information/starter-architecture.html
88
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/architecture/starter-architecture.html
9-
layout: migrated
9+
status: migrated
1010
---
1111

1212
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.

src/cloud/architecture/starter-develop-deploy-workflow.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ functional_areas:
66
redirect_from:
77
- /cloud/basic-information/starter-develop-deploy-workflow.html
88
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/architecture/starter-develop-deploy-workflow.html
9-
layout: migrated
9+
status: migrated
1010
---
1111

1212
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.

src/cloud/before/before-setup-env-2_clone.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ functional_areas:
77
- Cloud
88
- Setup
99
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/develop/cli-branches.html
10-
layout: migrated
10+
status: migrated
1111
---
1212

1313
{:.ref-header}

src/cloud/before/before-setup-env-install.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ functional_areas:
99
- Setup
1010
- Configuration
1111
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/develop/overview.html
12-
layout: migrated
12+
status: migrated
1313
---
1414

1515
{:.ref-header}

src/cloud/before/before-workspace-file-sys-owner.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ functional_areas:
55
- Cloud
66
- Setup
77
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/dev-tools/cloud-cli.html
8-
layout: migrated
8+
status: migrated
99
---
1010

1111
{:.ref-header}

src/cloud/before/before-workspace-magento-prereqs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ functional_areas:
99
- Setup
1010
- Configuration
1111
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/develop/overview.html
12-
layout: migrated
12+
status: migrated
1313
---
1414

1515
{:.ref-header}

src/cloud/before/before-workspace-ssh.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ functional_areas:
99
- Security
1010
- Config
1111
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/develop/secure-connections.html
12-
layout: migrated
12+
status: migrated
1313
---
1414

1515
{:.ref-header}

src/cloud/before/before-workspace.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ functional_areas:
55
- Cloud
66
- Setup
77
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/project/overview.html
8-
layout: migrated
8+
status: migrated
99
---
1010

1111
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.

src/cloud/bk-cloud.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Cloud guide for Commerce
44
functional_areas:
55
- Cloud
66
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/overview.html
7-
layout: migrated
7+
status: migrated
88
---
99

1010
{{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:

src/cloud/cdn/cloud-fastly-custom-response.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ functional_areas:
88
- Setup
99
- Configuration
1010
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/setup-fastly/fastly-custom-response.html
11-
layout: migrated
11+
status: migrated
1212
---
1313

1414
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.

src/cloud/cdn/cloud-fastly.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ functional_areas:
66
- Setup
77
- Security
88
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/fastly.html
9-
layout: migrated
9+
status: migrated
1010
---
1111

1212
{:.bs-callout-warning}

src/cloud/cdn/cloud-vcl-custom-snippets.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ functional_areas:
77
- Cloud
88
- Setup
99
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/custom-vcl-snippets/fastly-vcl-custom-snippets.html
10-
layout: migrated
10+
status: migrated
1111
---
1212

1313
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.

src/cloud/cdn/configure-fastly-customize-cache.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ functional_areas:
66
- Setup
77
- Configuration
88
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/setup-fastly/fastly-custom-cache-configuration.html
9-
layout: migrated
9+
status: migrated
1010
---
1111

1212
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.

src/cloud/cdn/configure-fastly.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ functional_areas:
88
- Setup
99
- Configuration
1010
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/setup-fastly/fastly-configuration.html
11-
layout: migrated
11+
status: migrated
1212
---
1313

1414
[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.

src/cloud/cdn/fastly-image-optimization.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ functional_areas:
66
- Setup
77
- Configuration
88
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/fastly-image-optimization.html
9-
layout: migrated
9+
status: migrated
1010
---
1111

1212
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:

src/cloud/cdn/fastly-vcl-allowlist.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ redirect_from:
99
- /cloud/configure/fastly-vcl-whitelist.html
1010
- /cloud/cdn/fastly-vcl-whitelist.html
1111
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/custom-vcl-snippets/fastly-vcl-allowlist.html
12-
layout: migrated
12+
status: migrated
1313
---
1414

1515
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.

src/cloud/cdn/fastly-vcl-badreferer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ functional_areas:
77
- Cloud
88
- Setup
99
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/custom-vcl-snippets/fastly-vcl-badreferer.html
10-
layout: migrated
10+
status: migrated
1111
---
1212

1313
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.

src/cloud/cdn/fastly-vcl-blocking.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ functional_areas:
88
- Cloud
99
- Setup
1010
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/custom-vcl-snippets/fastly-vcl-blocking.html
11-
layout: migrated
11+
status: migrated
1212
---
1313

1414
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.

src/cloud/cdn/fastly-vcl-bypass-to-origin.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ functional_areas:
55
- Cloud
66
- Setup
77
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/custom-vcl-snippets/fastly-vcl-bypass-to-origin.html
8-
layout: migrated
8+
status: migrated
99
---
1010

1111
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.

src/cloud/cdn/fastly-vcl-wordpress.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ functional_areas:
77
- Cloud
88
- Setup
99
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/custom-vcl-snippets/fastly-vcl-wordpress.html
10-
layout: migrated
10+
status: migrated
1111
---
1212

1313
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.

src/cloud/cdn/fastly-waf-service.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ functional_areas:
77
- Security
88
- Compliance
99
redirect_to: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/cdn/fastly-waf-service.html
10-
layout: migrated
10+
status: migrated
1111
---
1212

1313
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.

0 commit comments

Comments
 (0)