Skip to content

Commit

Permalink
Merge pull request #3562 from magento/custom-link-check-test
Browse files Browse the repository at this point in the history
Link checker: Check for double forward slashes
  • Loading branch information
jeff-matthews committed Jan 15, 2019
2 parents 8225a9c + 2c403a7 commit edfd938
Show file tree
Hide file tree
Showing 31 changed files with 62 additions and 39 deletions.
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ require 'colorator'
# Load ruby files with helper methods from the 'rakelib/' directory
require_relative 'rakelib/link-checker.rb'
require_relative 'rakelib/converter.rb'
require_relative 'rakelib/double-slash-check.rb'

desc "Same as 'rake', 'rake preview'"
task default: %w[preview]
Expand Down
2 changes: 1 addition & 1 deletion _data/whats-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2302,7 +2302,7 @@ entries:
versions: 2.x
type: Updated
date: Mar 24 2017
- description: '[Tutorial: Order processing](https://devdocs.magento.com/guides/v2.1//rest/tutorials/orders/order-intro.html)'
- description: '[Tutorial: Order processing](https://devdocs.magento.com/guides/v2.1/rest/tutorials/orders/order-intro.html)'
versions: 2.1.x
type: New
date: Mar 23 2017
Expand Down
1 change: 1 addition & 0 deletions _plugins/html-check-hook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#
require 'html-proofer'
require 'yaml'
require_relative '../rakelib/double-slash-check.rb'

Jekyll::Hooks.register :site, :post_write do |site|
# Do nothing unless serving mode is enabled
Expand Down
2 changes: 1 addition & 1 deletion guides/v2.0/extension-dev-guide/code-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ menu_order: 8

## Overview of code generation {#codegen-over}

The Magento application generates code to create non-existent classes. As an example, look at the [\\Magento\\Customer\\Model\\Resource\\AddressRepository]({{ site.mage2000url }}/app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php){: target="_blank"} constructor. A snippet follows:
The Magento application generates code to create non-existent classes. As an example, look at the [\\Magento\\Customer\\Model\\Resource\\AddressRepository]({{ site.mage2000url }}app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php){: target="_blank"} constructor. A snippet follows:

...
public function __construct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Stylesheets are the main tool in responsive web design (RWD) implementation. Thi

## Media queries in Magento default themes {#lib_rwd}

The Blank and Luma theme styles are based on the <a href="{{ page.baseurl }}/frontend-dev-guide//css-topics/theme-ui-lib.html" target="_blank">Magento UI library</a>. The library uses <a href="http://en.wikipedia.org/wiki/Media_queries" target="_blank">CSS3 media queries</a>, an {% glossarytooltip 55774db9-bf9d-40f3-83db-b10cc5ae3b68 %}extension{% endglossarytooltip %} of the <code>@media</code> rule, to adapt the {% glossarytooltip 73ab5daa-5857-4039-97df-11269b626134 %}layout{% endglossarytooltip %} to the screen width.
The Blank and Luma theme styles are based on the <a href="{{ page.baseurl }}/frontend-dev-guide/css-topics/theme-ui-lib.html" target="_blank">Magento UI library</a>. The library uses <a href="http://en.wikipedia.org/wiki/Media_queries" target="_blank">CSS3 media queries</a>, an {% glossarytooltip 55774db9-bf9d-40f3-83db-b10cc5ae3b68 %}extension{% endglossarytooltip %} of the <code>@media</code> rule, to adapt the {% glossarytooltip 73ab5daa-5857-4039-97df-11269b626134 %}layout{% endglossarytooltip %} to the screen width.

According to the approach implemented in the library, the <code>.media-width()</code> {% glossarytooltip 1a305bdb-9be8-44aa-adad-98758821d6a7 %}mixin{% endglossarytooltip %} can be used in any <code>.less</code> file in your theme, as many times as you need, but it is invoked only once, in <code>lib/web/css/source/lib/_responsive.less</code>. The resulting <code>styles.css</code> has only one call of each media query with all the rules there, instead of multiple calls for the same query.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The Blank and Luma themes use the following scripts to responsively relocate pag

<ul>
<li><a href="{{ site.mage2000url }}app/design/frontend/Magento/blank/web/js/responsive.js" target="_blank"><code>responsive.js</code></a></li>
<li><a href="{{ site.mage2000url }}/lib/web/mage/menu.js" target="_blank"><code>menu.js</code></a></li>
<li><a href="{{ site.mage2000url }}lib/web/mage/menu.js" target="_blank"><code>menu.js</code></a></li>

<li><a href="https://github.com/paulirish/matchMedia.js/" target="_blank"><code>matchMedia.js</code></a>, used by <code>responsive.js</code> and <code>menu.js</code></li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion guides/v2.0/frontend-dev-guide/themes/theme-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,4 @@ For information on how to apply the theme for the storefront, see the [Apply and

## See also

* [Uninstall a theme]({{ site.gdeurl }}/install-gde/install/cli/install-cli-theme-uninstall.html)
* [Uninstall a theme]({{ site.gdeurl }}install-gde/install/cli/install-cli-theme-uninstall.html)
2 changes: 1 addition & 1 deletion guides/v2.1/config-guide/config/config-php.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Unlike other [module configuration files]({{ page.baseurl }}/config-guide/config

On the top level of this array are *configuration segments*. A segment has arbitrary content (a scalar value or a nested array) distinguished by an arbitrary key&mdash;where both the key and its value are defined by the Magento framework.

[Magento\Framework\App\DeploymentConfig]({{ site.mage2000url }}/lib/internal/Magento/Framework/App/DeploymentConfig.php) merely provides access to these sections but does not allow you to extend them.
[Magento\Framework\App\DeploymentConfig]({{ site.mage2000url }}lib/internal/Magento/Framework/App/DeploymentConfig.php) merely provides access to these sections but does not allow you to extend them.

On the next hierarchy level, items in each segment are ordered according to the {% glossarytooltip c1e4242b-1f1a-44c3-9d72-1d5b1435e142 %}module{% endglossarytooltip %} sequence definition, which is obtained by merging all modules' configuration files, with the {% glossarytooltip 53da11f1-d0b8-4a7e-b078-1e099462b409 %}exception{% endglossarytooltip %} of disabled modules.

Expand Down
2 changes: 1 addition & 1 deletion guides/v2.1/extension-dev-guide/code-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ When code changes as discussed in the preceding section, the Object Manager comp
The code compiler compiler creates `var/di/global.ser`, which is a PHP serialized map of all constructor definitions mixed with object linking configuration defined in di.xml. `di.xml` is the dependency injection configuration. There is a global `app/etc/di.xml` and there can one defined for every {% glossarytooltip c1e4242b-1f1a-44c3-9d72-1d5b1435e142 %}module{% endglossarytooltip %}.

<!-- Link Definitions -->
[Magento/Customer/Model/Resource/AddressRepository]: {{ site.mage2000url }}/app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php
[Magento/Customer/Model/Resource/AddressRepository]: {{ site.mage2000url }}app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php
{:target="_blank"}
[production mode]: {{ page.baseurl }}/config-guide/bootstrap/magento-modes.html#production-mode
[Instantiating objects with factories]: {{ page.baseurl }}/extension-dev-guide/factories.html
Expand Down
4 changes: 2 additions & 2 deletions guides/v2.1/frontend-dev-guide/css-topics/css_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ The following table describes the grunt commands you can use performing differen
Grunt task | Action
---------- | -------
grunt clean | Removes the theme related static files in the `pub/static` and `var` directories.
grunt exec | Republishes symlinks to the source files to the `pub/static/frontend///` directory.
grunt less | Compiles `.css` files using the symlinks published in the `pub/static/frontend///` directory.
grunt exec | Republishes symlinks to the source files to the `pub/static/frontend/` directory.
grunt less | Compiles `.css` files using the symlinks published in the `pub/static/frontend/` directory.
grunt watch | Tracks the changes in the source files, recompiles `.css` files, and reloads the page in the browser.
{:style="table-layout:auto"}
Expand Down
10 changes: 5 additions & 5 deletions guides/v2.1/frontend-dev-guide/css-topics/theme-ui-lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ The documentation is available in a convenient {% glossarytooltip a2aff425-07dd-

<!-- Link definitions -->

[`lib/web/css/docs/source/README.md`]: {{ site.mage2100url }}/lib/web/css/docs/source/README.md
[`lib/web/css/docs/source/README.md`]: {{ site.mage2100url }}lib/web/css/docs/source/README.md

[`lib/web/css/docs`]: {{ site.mage2100url }}/lib/web/css/docs
[`lib/web/css/docs`]: {{ site.mage2100url }}lib/web/css/docs

[`lib/web/css/source/lib/variables/_breadcrumbs.less`]: {{ site.mage2100url }}/lib/web/css/source/lib/variables/_breadcrumbs.less
[`lib/web/css/source/lib/variables/_breadcrumbs.less`]: {{ site.mage2100url }}lib/web/css/source/lib/variables/_breadcrumbs.less

[`lib/web/css/source/lib/variables`]: {{ site.mage2100url }}/lib/web/css/source/lib/variables
[`lib/web/css/source/lib/variables`]: {{ site.mage2100url }}lib/web/css/source/lib/variables

[`lib/web/css`]: {{ site.mage2100url }}/lib/web/css
[`lib/web/css`]: {{ site.mage2100url }}lib/web/css

[embedded documentation]: #docs
[inherits]: {{ page.baseurl }}/frontend-dev-guide/themes/theme-inherit.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You can change these breakpoints and add new ones in your custom theme. For inst

## Media queries in Magento default themes {#lib_rwd}

The Blank and Luma theme styles are based on the [Magento UI library]({{ page.baseurl }}/frontend-dev-guide//css-topics/theme-ui-lib.html). The library uses [CSS3 media queries](http://en.wikipedia.org/wiki/Media_queries), an extension of the `@media` rule, to adapt the layout to the screen width.
The Blank and Luma theme styles are based on the [Magento UI library]. The library uses [CSS3 media queries](http://en.wikipedia.org/wiki/Media_queries), an extension of the `@media` rule, to adapt the layout to the screen width.

The approach implemented in the Magento UI library, uses `@media-common` style group separation and `.media-width()` mixins which can be used in any `.less` file in a theme, as many times as needed, but it is invoked only once, in `lib/web/css/source/lib/_responsive.less`. The resulting `styles-m.css` and `styles-l.css` both have only one call of each media query with all the rules there, instead of multiple calls for the same query.

Expand Down
2 changes: 1 addition & 1 deletion guides/v2.1/frontend-dev-guide/themes/theme-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,4 @@ For information on how to apply the theme for the storefront, see the [Apply and

## See also

* [Uninstall a theme]({{ site.gdeurl }}/install-gde/install/cli/install-cli-theme-uninstall.html)
* [Uninstall a theme]({{ site.gdeurl }}install-gde/install/cli/install-cli-theme-uninstall.html)
2 changes: 1 addition & 1 deletion guides/v2.1/javascript-dev-guide/javascript/js_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ There is no `mage/menu.js` in the current theme or parent theme JS files, so the
[Using the Inspect Element define the id]: {{site.baseurl}}/common/images/fdg_js_debug1.png
[Search the page source for the store.menu string]: {{site.baseurl}}/common/images/fdg_js_debug2.png
[assets fallback rules]: {{page.baseurl}}/frontend-dev-guide/themes/theme-inherit.html#theme-inherit-static
[`lib/web/mage/menu.js`]: {{site.mage2100url}}/lib/web/mage/menu.js
[`lib/web/mage/menu.js`]: {{site.mage2100url}}lib/web/mage/menu.js
[JavaScript initialization]: {{site.baseurl}}/videos/fundamentals/add-a-javascript-module/
[assets fallback]: {{page.baseurl}}/frontend-dev-guide/themes/theme-inherit.html#theme-inherit-static
2 changes: 1 addition & 1 deletion guides/v2.1/payments-integrations/vault/payment-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Magento does not store any private credit card details. It only stores the data

This information is stored in Payment Token.

The basic interface for Payment Token is [PaymentTokenInterface]({{ site.mage2100url }}/app/code/Magento/Vault/Api/Data/PaymentTokenInterface.php).
The basic interface for Payment Token is [PaymentTokenInterface]({{ site.mage2100url }}app/code/Magento/Vault/Api/Data/PaymentTokenInterface.php).

To retrieve and store token details, you need to implement a [response handler]({{ page.baseurl }}/payments-integrations/payment-gateway/response-handler.html). In the response handler a Payment Token {% glossarytooltip a9027f5d-efab-4662-96aa-c2999b5ab259 %}entity{% endglossarytooltip %} is created and stored in the payment {% glossarytooltip 55774db9-bf9d-40f3-83db-b10cc5ae3b68 %}extension{% endglossarytooltip %} attributes.

Expand Down
4 changes: 2 additions & 2 deletions guides/v2.1/ui_comp_guide/concepts/ui_comp_linking_concept.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Example of setting `exports` in a component's configuration `.xml` file:
</argument>
```

For an example of `exports` usage in Magento code see [`product_form.xml`, line 81]({{ site.mage2100url }}/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml#L81)
For an example of `exports` usage in Magento code see [`product_form.xml`, line 81]({{ site.mage2100url }}app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml#L81)

### `imports`

Expand Down Expand Up @@ -83,7 +83,7 @@ Example of using `imports` in a component's configuration `.xml` file:
</argument>
```

For an example of `imports` usage in Magento code see [`product_form.xml`, line 103]({{ site.mage2100url }}/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml#L103)
For an example of `imports` usage in Magento code see [`product_form.xml`, line 103]({{ site.mage2100url }}app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml#L103)

### `links`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: About PHP modifiers in UI components

## What's in this topic

This topic describes how to use {% glossarytooltip bf703ab1-ca4b-48f9-b2b7-16a81fd46e02 %}PHP{% endglossarytooltip %} modifiers that are the server-side part of [UI components configuration]({{ page.baseurl }}/ui_comp_guide/concepts//ui_comp_config_flow_concept.html). Using modifiers is optional and might be necessary when [static declaration in XML configuration files]({{ page.baseurl }}/ui_comp_guide/concepts/ui_comp_xmldeclaration_concept.html) is not suitable for the tasks. For example, in cases when additional data should be loaded from database. Or the other specific example is the [default product creation form]({{ page.baseurl }}/howdoi/customize_product.html), for which the modifier is a place where validations are added to display only certain fields for certain {% glossarytooltip 6e836354-0067-48ac-84ce-a4ab7c0c492e %}product types{% endglossarytooltip %}.
This topic describes how to use {% glossarytooltip bf703ab1-ca4b-48f9-b2b7-16a81fd46e02 %}PHP{% endglossarytooltip %} modifiers that are the server-side part of [UI components configuration]({{ page.baseurl }}/ui_comp_guide/concepts/ui_comp_config_flow_concept.html). Using modifiers is optional and might be necessary when [static declaration in XML configuration files]({{ page.baseurl }}/ui_comp_guide/concepts/ui_comp_xmldeclaration_concept.html) is not suitable for the tasks. For example, in cases when additional data should be loaded from database. Or the other specific example is the [default product creation form]({{ page.baseurl }}/howdoi/customize_product.html), for which the modifier is a place where validations are added to display only certain fields for certain {% glossarytooltip 6e836354-0067-48ac-84ce-a4ab7c0c492e %}product types{% endglossarytooltip %}.

## General implementation overview

Expand Down
2 changes: 1 addition & 1 deletion guides/v2.2/cloud/release-notes/CloudReleaseNotes2.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ When upgrading to {{site.data.var.ece}} 2.2, consider the following changes in d

* The command for generating `config.php` changed in 2.2 from `php bin/magento magento-cloud:scd-dump` to `php vendor/bin/m2-ece-scd-dump`.

* `.magento.app.yaml` has new build and deploy hooks. As part of your upgrade, you should update the `.magento.app.yaml` file with new build and deploy hooks and a set of environment variables. All actions completed by build and deploy are completed by these hooks. For instructions, see [Update .magento.app.yaml]({{ site.baseurl }}/guides/v2.2/cloud/project//project-upgrade.html#update-the-magentoappyaml-file). For additional technical information, we have removed pre-deployment tasks, refined build and deploy tasks, and modified build and deploy variables.
* `.magento.app.yaml` has new build and deploy hooks. As part of your upgrade, you should update the `.magento.app.yaml` file with new build and deploy hooks and a set of environment variables. All actions completed by build and deploy are completed by these hooks. For instructions, see [Update .magento.app.yaml]({{ site.baseurl }}/guides/v2.2/cloud/project/project-upgrade.html#update-the-magentoappyaml-file). For additional technical information, we have removed pre-deployment tasks, refined build and deploy tasks, and modified build and deploy variables.

* The deploy variable `GENERATED_CODE_SYMLINK` has been removed. The generated folders `var/generation` and `var/di` have been moved to a `generated/` read-only directory. The folder `var/generation` is now `generated/code` and `var/di` is now `generated/metapackage`.

Expand Down
2 changes: 1 addition & 1 deletion guides/v2.2/extension-dev-guide/code-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ When code changes as discussed in the preceding section, the Object Manager comp
The code compiler creates `generated/metadata/global.php`, which is a PHP serialized map of all constructor definitions mixed with object linking configuration defined in di.xml. `di.xml` is the dependency injection configuration. There is a global `app/etc/di.xml` and there can one defined for every {% glossarytooltip c1e4242b-1f1a-44c3-9d72-1d5b1435e142 %}module{% endglossarytooltip %}.

<!-- Link Definitions -->
[Magento/Customer/Model/Resource/AddressRepository]: {{ site.mage2000url }}/app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php
[Magento/Customer/Model/Resource/AddressRepository]: {{ site.mage2000url }}app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php
{:target="_blank"}
[production mode]: {{ page.baseurl }}/config-guide/bootstrap/magento-modes.html#production-mode
[Instantiating objects with factories]: {{ page.baseurl }}/extension-dev-guide/factories.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This means that every method call should not rely on previous calls nor should i
Any field contained in the repository class must also be stateless.

If your repository needs to provide functionality that requires state, such as for caching, use the registry pattern.
A good example that uses this pattern is the [`CustomerRepository`]({{ site.mage2100url }}/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php){:target="_blank"} class.
A good example that uses this pattern is the [`CustomerRepository`]({{ site.mage2100url }}app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php){:target="_blank"} class.

### Search Criteria {#m2devgde-search-criteria}

Expand Down
4 changes: 2 additions & 2 deletions guides/v2.2/frontend-dev-guide/css-topics/css_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ The following table describes the grunt commands you can use to perform differen
Grunt task | Action
---------- | -------
grunt clean | Removes the theme related static files in the `pub/static` and `var` directories.
grunt exec | Republishes symlinks to the source files to the `pub/static/frontend///` directory.
grunt less | Compiles `.css` files using the symlinks published in the `pub/static/frontend///` directory.
grunt exec | Republishes symlinks to the source files to the `pub/static/frontend/` directory.
grunt less | Compiles `.css` files using the symlinks published in the `pub/static/frontend/` directory.
grunt watch | Tracks the changes in the source files, recompiles `.css` files, and reloads the page in the browser.
{:style="table-layout:auto"}
Expand Down
2 changes: 1 addition & 1 deletion guides/v2.2/frontend-dev-guide/themes/theme-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,4 @@ For information on how to apply the theme for the storefront, see the [Apply and

## See also

* [Uninstall a theme]({{ site.gdeurl }}/install-gde/install/cli/install-cli-theme-uninstall.html)
* [Uninstall a theme]({{ site.gdeurl }}install-gde/install/cli/install-cli-theme-uninstall.html)
2 changes: 1 addition & 1 deletion guides/v2.2/payments-integrations/vault/payment-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Magento does not store any private credit card details. It only stores the data

This information is stored in Payment Token.

The basic interface for Payment Token is [PaymentTokenInterface]({{ site.mage2100url }}/app/code/Magento/Vault/Api/Data/PaymentTokenInterface.php).
The basic interface for Payment Token is [PaymentTokenInterface]({{ site.mage2100url }}app/code/Magento/Vault/Api/Data/PaymentTokenInterface.php).

To retrieve and store token details, you need to implement a [response handler]({{ page.baseurl }}/payments-integrations/payment-gateway/response-handler.html). In the response handler a Payment Token {% glossarytooltip a9027f5d-efab-4662-96aa-c2999b5ab259 %}entity{% endglossarytooltip %} is created and stored in the payment {% glossarytooltip 55774db9-bf9d-40f3-83db-b10cc5ae3b68 %}extension{% endglossarytooltip %} attributes.

Expand Down
Loading

0 comments on commit edfd938

Please sign in to comment.