Skip to content

Commit b5f1864

Browse files
authored
Use package.hexdocs.pm URL format instead of hexdocs.pm/package (#15429)
1 parent 8ac03ec commit b5f1864

19 files changed

Lines changed: 44 additions & 40 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ make docs
135135

136136
This will produce documentation sets for `elixir`, `eex`, `ex_unit`, `iex`, `logger`,
137137
and `mix` under the `doc` directory. If you are planning to contribute documentation,
138-
[please check our best practices for writing documentation](https://hexdocs.pm/elixir/writing-documentation.html).
138+
[please check our best practices for writing documentation](https://elixir.hexdocs.pm/writing-documentation.html).
139139

140140
## Licensing and Compliance Requirements
141141

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ clean_elixir:
189189
#==> Documentation tasks
190190

191191
SOURCE_REF = $(shell tag="$(call GIT_TAG)" revision="$(call GIT_REVISION)"; echo "$${tag:-$$revision}")
192-
DOCS_COMPILE = CANONICAL=$(CANONICAL) bin/elixir ../ex_doc/bin/ex_doc "$(1)" "$(VERSION)" "lib/$(2)/ebin" --main "$(3)" --source-url "https://github.com/elixir-lang/elixir" --source-ref "$(call SOURCE_REF)" --logo lib/elixir/pages/images/logo.png --output doc/$(2) --canonical "https://hexdocs.pm/$(2)/$(CANONICAL)" --homepage-url "https://elixir-lang.org/docs.html" $(DOCS_OPTIONS) $(4)
192+
DOCS_COMPILE = CANONICAL=$(CANONICAL) bin/elixir ../ex_doc/bin/ex_doc "$(1)" "$(VERSION)" "lib/$(2)/ebin" --main "$(3)" --source-url "https://github.com/elixir-lang/elixir" --source-ref "$(call SOURCE_REF)" --logo lib/elixir/pages/images/logo.png --output doc/$(2) --canonical "https://$(2).hexdocs.pm/$(CANONICAL)" --homepage-url "https://elixir-lang.org/docs.html" $(DOCS_OPTIONS) $(4)
193193
DOCS_CONFIG = bin/elixir lib/elixir/scripts/docs_config.exs "$(1)"
194194

195195
docs: compile ../ex_doc/bin/ex_doc docs_elixir docs_eex docs_mix docs_iex docs_ex_unit docs_logger

lib/elixir/lib/gen_event.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ defmodule GenEvent do
3636
alternative. GenStage is an external Elixir library maintained by the Elixir
3737
team; it provides a tool to implement systems that exchange events in a
3838
demand-driven way with built-in support for back-pressure. See the [GenStage
39-
documentation](https://hexdocs.pm/gen_stage) for more information.
39+
documentation](https://gen-stage.hexdocs.pm) for more information.
4040
4141
### `:gen_event`
4242

lib/elixir/lib/kernel.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6278,7 +6278,7 @@ defmodule Kernel do
62786278
step through the code it sees). For general stepping, you can set breakpoints
62796279
using `IEx.break!/4`.
62806280
6281-
For more information, [see IEx documentation](https://hexdocs.pm/iex/IEx.html#module-dbg-and-breakpoints).
6281+
For more information, [see IEx documentation](https://iex.hexdocs.pm/IEx.html#module-dbg-and-breakpoints).
62826282
62836283
## Configuring the debug function
62846284
@@ -7051,7 +7051,7 @@ defmodule Kernel do
70517051
:guard ->
70527052
raise ArgumentError,
70537053
"invalid expression in guard, #{exp} is not allowed in guards. " <>
7054-
"To learn more about guards, visit: https://hexdocs.pm/elixir/patterns-and-guards.html"
7054+
"To learn more about guards, visit: https://elixir.hexdocs.pm/patterns-and-guards.html"
70557055

70567056
_ ->
70577057
:ok

lib/elixir/lib/macro.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2699,7 +2699,7 @@ defmodule Macro do
26992699
:guard ->
27002700
raise ArgumentError,
27012701
"invalid expression in guard, dbg is not allowed in guards. " <>
2702-
"To learn more about guards, visit: https://hexdocs.pm/elixir/patterns-and-guards.html"
2702+
"To learn more about guards, visit: https://elixir.hexdocs.pm/patterns-and-guards.html"
27032703

27042704
_ ->
27052705
:ok

lib/elixir/lib/module.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ defmodule Module do
190190
191191
* a string (often a heredoc)
192192
* `false`, which will make the entity invisible to documentation-extraction
193-
tools like [`ExDoc`](https://hexdocs.pm/ex_doc/)
193+
tools like [`ExDoc`](https://ex-doc.hexdocs.pm/)
194194
* a keyword list, since Elixir 1.7.0
195195
196196
For example:
@@ -216,7 +216,7 @@ defmodule Module do
216216
217217
As can be seen in the example above, since Elixir 1.7.0 `@doc` and `@typedoc`
218218
also accept a keyword list that serves as a way to provide arbitrary metadata
219-
about the entity. Tools like [`ExDoc`](https://hexdocs.pm/ex_doc/) and
219+
about the entity. Tools like [`ExDoc`](https://ex-doc.hexdocs.pm/) and
220220
`IEx` may use this information to display annotations. A common use
221221
case is the `:since` key, which may be used to annotate in which version the
222222
function was introduced.
@@ -263,7 +263,7 @@ defmodule Module do
263263
264264
Tools may use this information to ensure the module is recompiled
265265
in case any of the external resources change, see for example:
266-
[`mix compile.elixir`](https://hexdocs.pm/mix/Mix.Tasks.Compile.Elixir.html).
266+
[`mix compile.elixir`](https://mix.hexdocs.pm/Mix.Tasks.Compile.Elixir.html).
267267
268268
The specified file path provided is interpreted as relative to
269269
the folder containing the project's `mix.exs`, which is the
@@ -321,7 +321,7 @@ defmodule Module do
321321
322322
Accepts a string (often a heredoc) or `false` where `@moduledoc false`
323323
will make the module invisible to documentation extraction tools like
324-
[`ExDoc`](https://hexdocs.pm/ex_doc/).
324+
[`ExDoc`](https://ex-doc.hexdocs.pm/).
325325
326326
Similarly to `@doc` also accepts a keyword list to provide metadata
327327
about the module. For more details, see the documentation of `@doc`

lib/elixir/pages/anti-patterns/design-anti-patterns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ end
226226

227227
While you may receive the `address` as a string from a database, web request, or a third-party, if you find yourself frequently manipulating or extracting information from the string, it is a good indicator you should convert the address into structured data:
228228

229-
Another example of this anti-pattern is using floating numbers to model money and currency, when [richer data structures should be preferred](https://hexdocs.pm/ex_money/).
229+
Another example of this anti-pattern is using floating numbers to model money and currency, when [richer data structures should be preferred](https://ex-money.hexdocs.pm/).
230230

231231
#### Refactoring
232232

@@ -350,7 +350,7 @@ The difference here is that the `struct/2` function behaves precisely the same f
350350

351351
#### Problem
352352

353-
The [*application environment*](https://hexdocs.pm/elixir/Application.html#module-the-application-environment) can be used to parameterize global values that can be used in an Elixir system. This mechanism can be very useful and therefore is not considered an anti-pattern by itself. However, library authors should avoid using the application environment to configure their library. The reason is exactly that the application environment is a **global** state, so there can only be a single value for each key in the environment for an application. This makes it impossible for multiple applications depending on the same library to configure the same aspect of the library in different ways.
353+
The [*application environment*](https://elixir.hexdocs.pm/Application.html#module-the-application-environment) can be used to parameterize global values that can be used in an Elixir system. This mechanism can be very useful and therefore is not considered an anti-pattern by itself. However, library authors should avoid using the application environment to configure their library. The reason is exactly that the application environment is a **global** state, so there can only be a single value for each key in the environment for an application. This makes it impossible for multiple applications depending on the same library to configure the same aspect of the library in different ways.
354354

355355
#### Example
356356

lib/elixir/pages/references/sbom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,4 @@ See the [ORT Mix plugin documentation](https://oss-review-toolkit.org/ort/docs/p
146146
147147
* [CycloneDX Specification](https://cyclonedx.org/specification/overview/): learn more about the SBoM format
148148
* [OWASP Dependency-Track](https://dependencytrack.org/): continuous SBoM analysis platform
149-
* [mix_sbom documentation](https://hexdocs.pm/sbom): full documentation and advanced options
149+
* [mix_sbom documentation](https://sbom.hexdocs.pm): full documentation and advanced options

lib/elixir/pages/references/typespecs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
1717
Elixir is a dynamically typed language, and as such, type specifications are never used by the compiler to optimize or modify code. Still, using type specifications is useful because:
1818

19-
* they provide documentation (for example, tools such as [`ExDoc`](https://hexdocs.pm/ex_doc/) show type specifications in the documentation)
19+
* they provide documentation (for example, tools such as [`ExDoc`](https://ex-doc.hexdocs.pm/) show type specifications in the documentation)
2020
* they're used by tools such as [Dialyzer](`:dialyzer`), that can analyze code with typespecs to find type inconsistencies and possible bugs
2121

2222
Type specifications (most often referred to as *typespecs*) are defined in different contexts using the following attributes:

lib/elixir/pages/references/unicode-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Mixed-script identifiers are not supported for security reasons. 'аdmin' is mad
3737
\u006E n {Latin}
3838
3939
Make sure all characters in the identifier resolve to a single script or a highly
40-
restrictive script. See https://hexdocs.pm/elixir/unicode-syntax.html for more information.
40+
restrictive script. See https://elixir.hexdocs.pm/unicode-syntax.html for more information.
4141
```
4242

4343
Finally, Elixir will also warn of confusable identifiers in the same file. For example, Elixir will emit a warning if you use both variables `а` (Cyrillic) and `а` (Latin) in your code.

0 commit comments

Comments
 (0)