-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add docs for the WebLink component #10309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6beb4eb
Add docs for the WebLink component
dunglas 9f4ae9b
fix typo
dunglas 178821e
refactor
dunglas e3d4036
RST
dunglas 088690f
Fix link
dunglas e12e776
RST
dunglas 38fda88
fix build
xabbuh ea7b3da
@nicolas-grekas' review
dunglas 91ee3bc
Fix RST
dunglas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix build
- Loading branch information
commit 38fda884205e441463aa424e9927a6fabf621b05
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ and to enable Symfony features requiring the library. | |
It also generates a base HTML5 layout in the ``templates/`` directory. | ||
|
||
Now, download Bootstrap_, extract the archive and copy the file | ||
``dist/css/bootstrap.min.css`` in the ``public/`` directory of our | ||
``dist/css/bootstrap.min.css`` in the ``public/`` directory of our | ||
project. | ||
|
||
Symfony comes with a `nice integration with of the most popular CSS framework`_. | ||
|
@@ -123,7 +123,7 @@ Let's do it! Install the WebLink component: | |
composer req weblink | ||
|
||
As for Twig, Symfony will automatically download and register this component into our app. | ||
Now, update the template to use the ``preload`` Twig helper that | ||
Now, update the template to use the ``preload`` Twig helper that | ||
leverages the WebLink component: | ||
|
||
.. code:: html+twig | ||
|
@@ -151,7 +151,7 @@ How does it works? | |
The WebLink component tracks Link HTTP headers to add to the response. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing backticks around Link |
||
When using the ``preload()`` helper, a ``Link`` header | ||
with a `preload`_ | ||
``rel`` attribute is added to the response: | ||
``rel`` attribute is added to the response: | ||
|
||
.. image:: /_images/components/weblink/response-headers.png | ||
|
||
|
@@ -263,7 +263,7 @@ While we're speaking about interoperability, WebLink can deal with any link impl | |
|
||
Thanks to Symfony WebLink, there is no excuses to not to switch to HTTP/2! | ||
|
||
.. _`Web Linking`_: https://tools.ietf.org/html/rfc5988 | ||
.. _`Web Linking`: https://tools.ietf.org/html/rfc5988 | ||
.. _`HTTP/2 Server Push`: https://tools.ietf.org/html/rfc7540#section-8.2 | ||
.. _`Resource Hints`: https://www.w3.org/TR/resource-hints/ | ||
.. _`Twig`: https://twig.symfony.com/ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/with//