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

Update link as current Devdoc Magento version #4297

Merged
merged 7 commits into from
Apr 22, 2019

Conversation

magesanjay
Copy link
Contributor

@magesanjay magesanjay commented Apr 19, 2019

This PR is a:

  • Update link as per current magento version of devdoc.

Summary

When this pull request is merged, it will Update link as per current magento version of devdoc.

Below are the lines which have updated links on text "JavaScript component" and "accordion".

  • Insert a JavaScript component in .phtml page templates.
  • To call a widget in JS code, use a notation similar to the following (accordion widget is intiialized on the [data-role=example] element as illustration)

Additional information

List all affected URLs

  1. https://devdocs.magento.com/guides/v2.1/javascript-dev-guide/javascript/js_init.html
  2. https://devdocs.magento.com/guides/v2.2/javascript-dev-guide/javascript/js_init.html
  3. https://devdocs.magento.com/guides/v2.3/javascript-dev-guide/javascript/js_init.html

@devops-devdocs
Copy link
Collaborator

An admin must run tests on this PR before it can be merged.

@ronak2ram ronak2ram self-requested a review April 19, 2019 17:54
@ronak2ram ronak2ram self-assigned this Apr 19, 2019
Copy link
Member

@ronak2ram ronak2ram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @magesanjay
Thanks for your contribution.
As per review. You did a two URL change.
For v2.1
{{ site.gdeurl }} to {{ site.gdeurl21 }}
For v2.2
{{ site.gdeurl }} to {{ site.gdeurl22 }}
For v2.3
{{ site.gdeurl }} to {{ site.gdeurl23 }}

@jeff-matthews
Copy link
Contributor

@magesanjay, are there any differences between each version of the javascript-dev-guide/javascript/js_init.md file? I haven't done a diff to check, but I will to make sure.

If there is no difference between version 2.1, 2.2, or 2.3, then we should leave the symlinks and replace the {{ site.gdeurl}} variable with the {{ page.baseurl }} variable.

For example:

Insert a [JavaScript component]({{ page.baseurl }}/javascript-dev-guide/bk-javascript-dev-guide.html#js_terms) in `.phtml` page templates.

AND

To call a widget in JS code, use a notation similar to the following ([accordion]({{ page.baseurl }}frontend-dev-guide/javascript/widget_accordion.html) widget is intiialized on the `[data-role=example]` element as illustration):

@jeff-matthews jeff-matthews added 2.1.x 2.2.x 2.3.x Magento 2.3 related changes Editorial Typo and grammar fixes or minor rewrites to correct inaccuracies labels Apr 19, 2019
@magesanjay
Copy link
Contributor Author

@jeff-matthews, No there is not any other changes between each version.
I have replaced {{ site.gdeurl }} variable with the {{ page.baseurl }} variable.
Can you please check and confirm it.

@jeff-matthews
Copy link
Contributor

Perfect! Thanks @magesanjay.

@jeff-matthews
Copy link
Contributor

running tests

@jeff-matthews
Copy link
Contributor

Link checking failed:

+ rake test:cicd
�[35mChecking links with htmlproofer...�[0m
Running ["LinkChecker::DoubleSlashCheck", "ImageCheck", "LinkCheck", "ScriptCheck"] on ["_site"] on *.html... 


Ran on 3824 files!


- internally linking to /guides/v2.1frontend-dev-guide/javascript/widget_accordion.html, which does not exist
  *  _site/guides/v2.1/javascript-dev-guide/javascript/js_init.html (line 2259)
     <a href="/guides/v2.1frontend-dev-guide/javascript/widget_accordion.html">accordion</a>
- internally linking to /guides/v2.1javascript-dev-guide/bk-javascript-dev-guide.html#js_terms, which does not exist
  *  _site/guides/v2.1/javascript-dev-guide/javascript/js_init.html (line 2139)
     <a href="/guides/v2.1javascript-dev-guide/bk-javascript-dev-guide.html#js_terms">JavaScript component</a>
- internally linking to /guides/v2.2frontend-dev-guide/javascript/widget_accordion.html, which does not exist
  *  _site/guides/v2.2/javascript-dev-guide/javascript/js_init.html (line 2321)
     <a href="/guides/v2.2frontend-dev-guide/javascript/widget_accordion.html">accordion</a>
- internally linking to /guides/v2.2javascript-dev-guide/bk-javascript-dev-guide.html#js_terms, which does not exist
  *  _site/guides/v2.2/javascript-dev-guide/javascript/js_init.html (line 2201)
     <a href="/guides/v2.2javascript-dev-guide/bk-javascript-dev-guide.html#js_terms">JavaScript component</a>
- internally linking to /guides/v2.3frontend-dev-guide/javascript/widget_accordion.html, which does not exist
  *  _site/guides/v2.3/javascript-dev-guide/javascript/js_init.html (line 2377)
     <a href="/guides/v2.3frontend-dev-guide/javascript/widget_accordion.html">accordion</a>
- internally linking to /guides/v2.3javascript-dev-guide/bk-javascript-dev-guide.html#js_terms, which does not exist
  *  _site/guides/v2.3/javascript-dev-guide/javascript/js_init.html (line 2257)
     <a href="/guides/v2.3javascript-dev-guide/bk-javascript-dev-guide.html#js_terms">JavaScript component</a>
- trying to find hash of /guides/v2.1javascript-dev-guide/bk-javascript-dev-guide.html#js_terms, but /apps/jenkins/latest/workspace/devdocs-test/_site/guides/v2.1javascript-dev-guide/bk-javascript-dev-guide.html does not exist
  *  _site/guides/v2.1/javascript-dev-guide/javascript/js_init.html (line 2139)
     <a href="/guides/v2.1javascript-dev-guide/bk-javascript-dev-guide.html#js_terms">JavaScript component</a>
- trying to find hash of /guides/v2.2javascript-dev-guide/bk-javascript-dev-guide.html#js_terms, but /apps/jenkins/latest/workspace/devdocs-test/_site/guides/v2.2javascript-dev-guide/bk-javascript-dev-guide.html does not exist
  *  _site/guides/v2.2/javascript-dev-guide/javascript/js_init.html (line 2201)
     <a href="/guides/v2.2javascript-dev-guide/bk-javascript-dev-guide.html#js_terms">JavaScript component</a>
- trying to find hash of /guides/v2.3javascript-dev-guide/bk-javascript-dev-guide.html#js_terms, but /apps/jenkins/latest/workspace/devdocs-test/_site/guides/v2.3javascript-dev-guide/bk-javascript-dev-guide.html does not exist
  *  _site/guides/v2.3/javascript-dev-guide/javascript/js_init.html (line 2257)
     <a href="/guides/v2.3javascript-dev-guide/bk-javascript-dev-guide.html#js_terms">JavaScript component</a>
rake aborted!
HTML-Proofer found 9 failures!```

@jeff-matthews jeff-matthews self-requested a review April 22, 2019 12:37
Copy link
Contributor

@jeff-matthews jeff-matthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add a forward slash between the {{ page.baseurl }} variable and the path to the file. See my suggested edits.

jeff-matthews and others added 2 commits April 22, 2019 18:11
Slash Added in URL

Co-Authored-By: magesanjay <[email protected]>
@magesanjay
Copy link
Contributor Author

@jeff-matthews I have added suggestion.

@jeff-matthews
Copy link
Contributor

running tests

@jeff-matthews
Copy link
Contributor

Link checking failed again:

+ rake test:cicd
�[35mChecking links with htmlproofer...�[0m
Running ["LinkChecker::DoubleSlashCheck", "ImageCheck", "ScriptCheck", "LinkCheck"] on ["_site"] on *.html... 


Ran on 3824 files!


- internally linking to /guides/v2.1/frontend-dev-guide/javascript/widget_accordion.html, which does not exist
  *  _site/guides/v2.1/javascript-dev-guide/javascript/js_init.html (line 2259)
     <a href="/guides/v2.1/frontend-dev-guide/javascript/widget_accordion.html">accordion</a>
- internally linking to /guides/v2.2/frontend-dev-guide/javascript/widget_accordion.html, which does not exist
  *  _site/guides/v2.2/javascript-dev-guide/javascript/js_init.html (line 2321)
     <a href="/guides/v2.2/frontend-dev-guide/javascript/widget_accordion.html">accordion</a>
- internally linking to /guides/v2.3/frontend-dev-guide/javascript/widget_accordion.html, which does not exist
  *  _site/guides/v2.3/javascript-dev-guide/javascript/js_init.html (line 2377)
     <a href="/guides/v2.3/frontend-dev-guide/javascript/widget_accordion.html">accordion</a>
rake aborted!
HTML-Proofer found 3 failures!```

@magesanjay
Copy link
Contributor Author

@jeff-matthews I have corrected url paths.

@jeff-matthews
Copy link
Contributor

running tests

@jeff-matthews
Copy link
Contributor

Tests are still failing

+ rake test:cicd
�[35mChecking links with htmlproofer...�[0m
Running ["LinkChecker::DoubleSlashCheck", "ImageCheck", "LinkCheck", "ScriptCheck"] on ["_site"] on *.html... 


Ran on 3824 files!


- internally linking to /guides/v2.1/javascript-dev-guide/javascript/widget_accordion.html, which does not exist
  *  _site/guides/v2.1/javascript-dev-guide/javascript/js_init.html (line 2259)
     <a href="/guides/v2.1/javascript-dev-guide/javascript/widget_accordion.html">accordion</a>
- internally linking to /guides/v2.2/javascript-dev-guide/javascript/widget_accordion.html, which does not exist
  *  _site/guides/v2.2/javascript-dev-guide/javascript/js_init.html (line 2321)
     <a href="/guides/v2.2/javascript-dev-guide/javascript/widget_accordion.html">accordion</a>
- internally linking to /guides/v2.3/javascript-dev-guide/javascript/widget_accordion.html, which does not exist
  *  _site/guides/v2.3/javascript-dev-guide/javascript/js_init.html (line 2377)
     <a href="/guides/v2.3/javascript-dev-guide/javascript/widget_accordion.html">accordion</a>
rake aborted!
HTML-Proofer found 3 failures!```

@magesanjay
Copy link
Contributor Author

magesanjay commented Apr 22, 2019

Hi @jeff-matthews i have updated link now.

@jeff-matthews
Copy link
Contributor

running tests

@jeff-matthews jeff-matthews merged commit 1159ecc into magento:master Apr 22, 2019
@ghost
Copy link

ghost commented Apr 22, 2019

Hi @magesanjay, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2.1.x 2.2.x 2.3.x Magento 2.3 related changes Editorial Typo and grammar fixes or minor rewrites to correct inaccuracies Partner: Krish TechnoLabs partners-contribution PR created by Magento partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants