Skip to content

Commit

Permalink
Update href_links documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Jul 24, 2022
1 parent 00d545e commit 95e10b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ This is the changelog for Cldr Routes version 0.6.0 released on July 24th, 2022.

* Adds `MyApp.Router.LocalizedHelpers.<helper>_links` functions to the generated `LocalizedHelpers` module. These `_links` functions are 1:1 correspondents to the `_path` and `_url` helpers. The `_link` helpers generate link headers that help identify the other language versions of a page. They are used like this:
```elixir
iex> alias MyApp.Router.LocalizedHelpers
iex> LocalizedHelpers.user_links(conn, :show, 1)
...> |> LocalizedHelpers.hreflang_links()
iex> alias MyApp.Router.LocalizedHelpers, as: Routes
iex> Routes.user_links(conn, :show, 1) |> Routes.hreflang_links()
{
:safe,
[
Expand Down
6 changes: 3 additions & 3 deletions lib/cldr/routes/helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ defmodule Cldr.Route.LocalizedHelpers do
end

@doc """
Generates an HTTP `Link` header for a given map of locale => URLs
Generates HTML `link` tags for a given map of locale => URLs
This function generates `<link .../>` tags that should be placed in the
`<head>` section of an HTML document to indicate the different language
Expand Down Expand Up @@ -477,9 +477,9 @@ defmodule Cldr.Route.LocalizedHelpers do
end

@doc """
Generates an HTTP `Link` header for a given map of locale => URLs
Generates HTML `link` tags for a given map of locale => URLs
This function generates `<link ... />` headers that should be placed in the
This function generates `<link ... />` tags that should be placed in the
`<head>` section of an HTML document to indicate the different language
versions of a given page.
Expand Down

0 comments on commit 95e10b5

Please sign in to comment.