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

Commit a0aa1b7

Browse files
authored
Merge branch 'pangolin-drafts' into MQE-336
2 parents 96c99cc + 514d635 commit a0aa1b7

File tree

164 files changed

+584
-762
lines changed

Some content is hidden

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

164 files changed

+584
-762
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Visit http://localhost:4000 in your favorite browser!
3333

3434
## <a name="build-using-docker"> Build using Docker
3535

36-
[This Docker container](https://github.com/jcalcaben/docker-for-devdocs) contains everything necessary to run Jekyll3 for working with Magento DevDocs.
36+
[This Docker container](https://github.com/magento-devdocs/docker-for-devdocs) contains everything necessary to run Jekyll3 for working with Magento DevDocs.
3737

3838
## <a name="build-using-vagrant"> Build using Vagrant
3939

Rakefile

Lines changed: 99 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'html-proofer'
2-
3-
# Write console output (stderr only) to a file. Use this if you need to also capture stdout: https://stackoverflow.com/a/2480439
4-
$stderr.reopen("tmp/bad-links.txt", "w")
2+
require 'kramdown'
3+
require 'find'
4+
require 'launchy'
55

66
##############
77
# Build #
@@ -19,15 +19,20 @@ end
1919
# Validate #
2020
################
2121

22-
# Run htmlproofer to check for broken links
22+
# Run htmlproofer to check for broken linkss
2323

2424
desc "Validate links"
25-
task :check_links do
26-
# First, generate the devdocs site.
27-
Rake::Task['build'].invoke
28-
# Then, run the link checker.
25+
task :check_links => :build do
26+
27+
# We're expecting link validation errors, but unless we rescue from StandardError, rake will abort and won't run the transform task (https://stackoverflow.com/a/10048406). Wrapping task in a begin-rescue block prevents rake from aborting. Seems to prevent printing an error count though.
28+
begin
29+
2930
puts 'Checking links with htmlproofer...'
30-
# Link checker parameters:
31+
32+
# Write console output (stderr only) to a file. Use this if you need to also capture stdout: https://stackoverflow.com/a/2480439
33+
$stderr.reopen("tmp/.htmlproofer/bad-links.md", "w")
34+
35+
# Configure htmlproofer parameters:
3136
options = {
3237
log_level: :info,
3338
only_4xx: true,
@@ -44,4 +49,89 @@ task :check_links do
4449
cache: { :timeframe => '30d' }
4550
}
4651
HTMLProofer.check_directory("./_site", options).run
52+
53+
# We're expecting link validation errors, but unless we rescue from StandardError, rake will abort and won't run the transform task (https://stackoverflow.com/a/10048406). Wrapping task in a begin-rescue block prevents rake from aborting. Seems to prevent printing an error count though.
54+
rescue StandardError => e
55+
#lifeboats
56+
end
57+
end
58+
59+
#################
60+
# Transform #
61+
#################
62+
63+
# Make 'tmp/.htmlproofer/bad-links.md' easier to read by transforming it to HTML and applying some CSS.
64+
65+
# We created this task to help us resolve the initial set of errors on the devdocs site. It shouldn't be necessary after we resolve all outstanding errors because we shouldn't expect a large number of errors after initial clean up.
66+
67+
desc "transform link validation error output to HTML"
68+
task :transform do
69+
70+
# Define the output directory.
71+
SITE_PATH = './tmp/.htmlproofer'
72+
73+
# Create the output directory if it doesn't already exist.
74+
Dir.mkdir( SITE_PATH ) unless File.exist?( SITE_PATH )
75+
76+
# Define the Kramdown method to convert markdown to HTML.
77+
def markdown( text )
78+
Kramdown::Document.new( text ).to_html
79+
end
80+
81+
# Locate the output directory, iterate over markdown files inside it, and convert those files to HTML.
82+
Find.find('./tmp/.htmlproofer') do |path|
83+
if File.extname(path) == '.md' # e.g. ./index.md => .md
84+
basename = File.basename(path, '.md') # e.g. ./index.md => index
85+
File.open( "#{SITE_PATH}/#{basename}.html", 'w') do |file|
86+
file.write markdown( File.read( path ) )
87+
end
88+
end
89+
end
90+
91+
# Automatically open the HTML report in a browser.
92+
uri = './tmp/.htmlproofer/bad-links.html'
93+
Launchy.open( uri ) do |exception|
94+
puts "Attempted to open #{uri} and failed because #{exception}"
95+
end
96+
97+
# Open the report and append CSS. When I try prepending it using the r+ mode (https://stackoverflow.com/a/3682374), which is where CSS content should go, it trucates part of the top error. This is good enough for now.
98+
File.open('./tmp/.htmlproofer/bad-links.html', 'a') { |file| file.write('<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
99+
<style>
100+
101+
/* Lists
102+
–––––––––––––––––––––––––––––––––––––––––––––––––– */
103+
104+
ul {
105+
list-style: disc;
106+
font-family: \'Roboto\', sans-serif;
107+
color: red; }
108+
ol {
109+
list-style: decimal inside; }
110+
ol, ul {
111+
padding-left: 0;
112+
margin-top: 0; }
113+
ul ul,
114+
ul ol,
115+
ol ol,
116+
ol ul {
117+
margin: 1.5rem 0 1.5rem 3rem;
118+
font-size: 90%;
119+
color: black;}
120+
li {
121+
margin-bottom: 1rem;
122+
font-weight: bold;}
123+
124+
</style>') }
125+
126+
end
127+
128+
###############
129+
# Report #
130+
###############
131+
132+
# Generate an HTML report of all link validation errors.
133+
134+
desc "generate link validation html report"
135+
task :link_report => [:check_links, :transform] do
136+
puts "generating link validation HTML report..."
47137
end

_data/toc/coding-standards.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ pages:
3333

3434
- label: Technical guidelines
3535
url: coding-standards/technical-guidelines/technical-guidelines.html
36+
versions: ["2.1","2.2", "2.3"]

_data/toc/module-reference-guide.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,26 @@ pages:
33
- label: INTRODUCTION
44
url: mrg/intro.html
55

6+
- label: Sales
7+
url: mrg/ce/Sales.html
8+
versions: ["2.0"]
9+
610
- label: Open Source
711
url: mrg/ce/ce-intro.html
12+
versions: ["2.1","2.2"]
813
children:
914

1015
- label: Sales
1116
url: mrg/ce/Sales.html
1217

1318
- label: Signifyd
1419
url: mrg/ce/Signifyd.html
20+
versions: ["2.2"]
1521

1622

1723
- label: Commerce
1824
url: mrg/ee/ee-intro.html
19-
versions: ["2.1","2.2", "2.3"]
25+
versions: ["2.1","2.2"]
2026
children:
2127

2228
- label: BundleStaging
@@ -96,7 +102,7 @@ pages:
96102

97103
- label: B2B
98104
url: mrg/b2b/b2b-intro.html
99-
versions: ["2.2", "2.3"]
105+
versions: ["2.2"]
100106
children:
101107

102108
- label: B2b

_data/toc/web-api.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ pages:
1919
- label: Order Processing with REST APIs Tutorial
2020
class: tutorial
2121
url: get-started/order-tutorial/order-intro.html
22+
versions: ["2.1", "2.2", "2.3"]
23+
2224

2325
- label: Use SOAP Services
2426
url: get-started/soap/soap-web-api-calls.html

_includes/install/sampledata/sample-data-clone.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ See the following sections:
2323
## Clone the sample data repository {#clone-sample-repo}
2424
This section discusses how to install Magento sample data by cloning the sample data repository. You can clone the sample data repository in any of the following ways:
2525

26-
* Clone with the <a href="#instgde-prereq-sample-clone-ssh">SSH protocol</a>
26+
* Clone with the <a href="#clone-sample-repo-ssh">SSH protocol</a>
2727
* Clone with the <a href="#instgde-prereq-compose-clone-https">HTTPS protocol</a>
2828

2929
### Clone with SSH {#clone-sample-repo-ssh}
@@ -56,11 +56,11 @@ fatal: The remote end hung up unexpectedly</pre>
5656
</div>
5757
7. Change to the `<your Magento sample data clone dir>/dev/tools` directory.
5858
8. Enter the following command to create symbolic links between the files you just cloned so sample data works properly:
59-
59+
6060
php -f <sample-data_clone_dir>/dev/tools/build-sample-data.php -- --ce-source="<path_to_your_magento_instance>"
6161
9. Wait for the command to complete.
6262

63-
10. See <a href="#instgde-prereq-compose-clone-perms">Set file system permissions and ownership</a>.
63+
10. See <a href="#samp-data-perms">Set file system permissions and ownership</a>.
6464

6565
### Clone with HTTPS {#instgde-prereq-compose-clone-https}
6666
To clone the Magento sample data GitHub repository using the HTTPS protocol:
@@ -78,7 +78,7 @@ To clone the Magento sample data GitHub repository using the HTTPS protocol:
7878
3. Enter `git clone` and paste the value you obtained from step 1.
7979

8080
An example follows:
81-
81+
8282
git clone https://github.com/magento/magento2-sample-data.git
8383
4. Wait for the repository to clone on your server.
8484
5. Change to the `<your Magento sample data clone dir>/dev/tools` directory.
@@ -122,7 +122,7 @@ To set file system permissions and ownership on the sample data repository:
122122

123123
cd <your {{site.data.var.ce}} install dir>/var
124124
rm -rf cache/* page_cache/* generation/*
125-
125+
126126
<!-- ABBREVIATIONS -->
127127

128128
*[contributing developer]: A developer who contributes code to the Magento 2 CE codebase

_includes/install/trouble/rc_cron.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To verify whether or not your crontab is set up:
99
2. See if the following file exists:
1010

1111
ls -al <your Magento install dir>/var/.setup_cronjob_status
12-
12+
1313
If the file exists, cron has run successfully in the past. If the file _does not_ exist, either you haven't yet installed Magento or cron isn't running. In either case, continue with the next step.
1414
3. Get more detail about cron.
1515

@@ -34,15 +34,15 @@ To verify whether or not your crontab is set up:
3434
See one of the following sections for a solution to your issue.
3535

3636
### Solution: crontab not set up
37-
To verify your cron jobs are set up properly, see [Set up cron jobs]({{page.baseurl}}install-gde/install/post-install-config.html#post-install-cron").
37+
To verify your cron jobs are set up properly, see [Set up cron jobs]({{page.baseurl}}install-gde/install/post-install-config.html#post-install-cron).
3838

3939
### Solution: cron running from incorrect PHP binary
4040
If your cron job uses a PHP binary different from the web server plug-in, PHP settings errors might display. To resolve the issue, set identical PHP settings for both the PHP command line and the PHP web server plug-in.
4141

4242
For more information about PHP settings, see [Required PHP settings]({{page.baseurl}}install-gde/prereq/php-settings.html).
4343

4444
### Solution: cron running with errors
45-
Try running each command manually because the command might display helpful error messages. See [Set up cron jobs]({{page.baseurl}}install-gde/install/post-install-config.html#post-install-cron").
45+
Try running each command manually because the command might display helpful error messages. See [Set up cron jobs]({{page.baseurl}}install-gde/install/post-install-config.html#post-install-cron).
4646

4747
<div class="bs-callout bs-callout-info" id="info">
4848
<p>You must run cron at least <em>twice</em> for the job to execute; the first time to queue jobs, the second time to execute the jobs.</p>

_includes/install/trouble/rc_php-version.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You might encounter the following issues with the PHP version readiness check:
1515

1616
<img src="{{ site.baseurl }}common/images/upgr-tshoot-no-cron.png">
1717

18-
This is a symptom of incorrect cron job setup. For more information, see [Set up cron jobs]({{page.baseurl}}install-gde/install/post-install-config.html#post-install-cron").
18+
This is a symptom of incorrect cron job setup. For more information, see [Set up cron jobs]({{page.baseurl}}install-gde/install/post-install-config.html#post-install-cron).
1919

2020
### PHP version is incorrect
2121
If the PHP version reported by the readiness check is incorrect, it's the result of a mismatch of PHP versions between the PHP CLI and the web server plug-in. Magento requires you to use *one version* of PHP for both the CLI (which runs cron) and the web server (which runs the Magento Admin, Component Manager, and System Upgrade).
@@ -32,4 +32,4 @@ To resolve the issue, try the following:
3232

3333
* [Version 2.0]({{page.baseurl}}install-gde/system-requirements.html)
3434
* [Version 2.1]({{site.gdeurl21}}install-gde/system-requirements.html)
35-
* Set the same PHP settings for both the PHP command line and the PHP web server plug-in as discussed in [PHP configuration options]({{page.baseurl}}install-gde/prereq/php-centos.html#instgde-prereq-timezone)
35+
* Set the same PHP settings for both the PHP command line and the PHP web server plug-in as discussed in [PHP configuration options]({{page.baseurl}}install-gde/prereq/php-centos.html#instgde-prereq-timezone)

_layouts/tutorial.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
{% assign parent = page.breadcrumbs[0] %}
1010
<div class="back-link">
11-
<a href="{{ page.baseurl }}{{ parent.url }}">
11+
<a href="{{parent.url}}">
1212
<i class="back-link-arrow"></i>
1313
<span class="back-link-subtitle">Return to</span>
1414
<span class="back-link-title">{{ parent.title }}</span>

guides/v2.0/cloud/access-acct/fastly.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ To create a branch:
5656
{% include cloud/cli-get-started.md %}
5757

5858
## Install Fastly in an Integration branch and deploy {#cloud-fastly-setup}
59-
You should install the Fastly module on your local, pushing the code to Integration and deploying across to your Staging and Production environments. For {{site.data.var.ece}} 2.2, install Fastly module 1.2.32 or later for all updated settings and full VCL snippet uploading support.
59+
You should install the Fastly module on your local, pushing the code to Integration and deploying across to your Staging and Production environments. For {{site.data.var.ece}} 2.2, install Fastly module 1.2.33 or later for all updated settings and full VCL snippet uploading support.
6060

6161
<div class="bs-callout bs-callout-warning" markdown="1">
6262
Don't configure the module in your local before building and deploying. You'll configure the module in those environments.
@@ -121,7 +121,7 @@ Configure the following features and enable additional [configuration options](h
121121

122122
<div class="bs-callout bs-callout-info" id="info" markdown="1">
123123
* Ignore the link to create a free Fastly account. We'll provide your Fastly credentials (Service ID and API token).
124-
* With Fastly version 1.2.0 and later (we recommend 1.2.32 or later), use the **Upload VCL to Fastly** button to upload your default [VCL snippets](#custom-vcl).
124+
* With Fastly version 1.2.0 and later (we recommend 1.2.33 or later), use the **Upload VCL to Fastly** button to upload your default [VCL snippets](#custom-vcl).
125125
</div>
126126

127127
## Upload Fastly VCL snippets {#upload-vcl-snippets}
@@ -138,7 +138,7 @@ To use snippets, you must upload the Fastly VCL using the Magento Admin as follo
138138
![Upload a Magento VCL to Fastly]({{ site.baseurl }}common/images/cloud_upload-vcl-to-fastly.png)
139139

140140
<div class="bs-callout bs-callout-info" id="info" markdown="1">
141-
If the **Upload VCL to Fastly** button does not display, you should upgrade the Fastly extension to version 1.2.0 or later. We recommend 1.2.32 or later. For details, see [Update extensions]({{ page.baseurl}}cloud/howtos/update-components.html). Fastly's Composer name is `fastly/magento2`.
141+
If the **Upload VCL to Fastly** button does not display, you should upgrade the Fastly extension to version 1.2.0 or later. We recommend 1.2.33 or later. For details, see [Update extensions]({{ page.baseurl}}cloud/howtos/update-components.html). Fastly's Composer name is `fastly/magento2`.
142142
</div>
143143

144144
2. Once the upload completes, the modal automatically closes with a success message.

guides/v2.0/cloud/basic-information/cloud-fastly.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Fastly provides the following powerful tools for Magento:
3232

3333
We highly recommend enabling and using Fastly for your caching and CDN. The only situation you may not want to enable is for a headless deployment.
3434

35-
We strongly recommend installing Fastly module 1.2.32 or later.
35+
We strongly recommend installing Fastly module 1.2.33 or later.
3636

3737
## Fastly and 503 timeouts {#timeouts}
3838
When you receive a 503 error from Fastly, it may be due to a lengthy operation or performing bulk actions. Fastly has a default 60 second time out. Any request that takes longer than 60 seconds will return a 503 error.

guides/v2.0/cloud/basic-information/starter-architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ This software is *not* upgradable but versions for the following software is con
9292
* [RabbitMQ]({{page.baseurl}}cloud/project/project-conf-files_services-rabbit.html)
9393
* [Elasticsearch]({{page.baseurl}}cloud/project/project-conf-files_services-elastic.html)
9494

95-
For Staging and Production, you will use Fastly for CDN and caching. We recommend installing Fastly module 1.2.32 or later. For details, see [Fastly in Cloud]({{page.baseurl}}cloud/basic-information/cloud-fastly.html).
95+
For Staging and Production, you will use Fastly for CDN and caching. We recommend installing Fastly module 1.2.33 or later. For details, see [Fastly in Cloud]({{page.baseurl}}cloud/basic-information/cloud-fastly.html).
9696

9797
For detailed information on supported versions and extensions, see the following information. These files allow you to configure software versions you want to use in your implementation.
9898

guides/v2.0/cloud/reference/discover-arch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ This software is *not* upgradable but versions for the following software is con
169169
* [RabbitMQ]({{page.baseurl}}cloud/project/project-conf-files_services-rabbit.html)
170170
* [Elasticsearch]({{page.baseurl}}cloud/project/project-conf-files_services-elastic.html)
171171

172-
For Staging and Production, you will use Fastly for CDN and caching. We recommend installing Fastly module 1.2.32 or later. For details, see [Fastly in Cloud]({{page.baseurl}}cloud/basic-information/cloud-fastly.html).
172+
For Staging and Production, you will use Fastly for CDN and caching. We recommend installing Fastly module 1.2.33 or later. For details, see [Fastly in Cloud]({{page.baseurl}}cloud/basic-information/cloud-fastly.html).
173173

174174
For detailed information on supported versions and extensions, see the following information. These files allow you to configure software versions you want to use in your implementation.
175175

guides/v2.0/cloud/requirements/cloud-requirements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ This software is *not* upgradable but versions for the following software is con
8989
* [RabbitMQ]({{page.baseurl}}cloud/project/project-conf-files_services-rabbit.html)
9090
* [Elasticsearch]({{page.baseurl}}cloud/project/project-conf-files_services-elastic.html)
9191

92-
For Staging and Production, you will use Fastly for CDN and caching. We recommend installing Fastly module 1.2.32 or later. For details, see [Fastly in Cloud]({{page.baseurl}}cloud/basic-information/cloud-fastly.html).
92+
For Staging and Production, you will use Fastly for CDN and caching. We recommend installing Fastly module 1.2.33 or later. For details, see [Fastly in Cloud]({{page.baseurl}}cloud/basic-information/cloud-fastly.html).
9393

9494
For detailed information on supported versions and extensions, see the following information. These files allow you to configure software versions you want to use in your implementation.
9595

0 commit comments

Comments
 (0)