From da0189e641aed10174a21b430172923d6fde4519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 27 Jan 2024 11:45:59 +0100 Subject: [PATCH] Fix docs link Related to #13284. --- Makefile | 1 - lib/elixir/lib/enum.ex | 2 +- lib/elixir/pages/anti-patterns/design-anti-patterns.md | 2 +- lib/elixir/pages/getting-started/basic-types.md | 2 +- lib/elixir/pages/getting-started/enumerable-and-streams.md | 2 +- lib/elixir/pages/meta-programming/macros.md | 2 +- lib/elixir/pages/mix-and-otp/dynamic-supervisor.md | 2 +- lib/elixir/pages/references/operators.md | 2 +- lib/elixir/pages/references/patterns-and-guards.md | 2 +- lib/elixir/pages/references/typespecs.md | 2 +- lib/elixir/pages/references/unicode-syntax.md | 2 +- lib/elixir/scripts/elixir_docs.exs | 1 + 12 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index c885b10be4f..d1725414637 100644 --- a/Makefile +++ b/Makefile @@ -189,7 +189,6 @@ docs_elixir: compile ../ex_doc/bin/ex_doc $(Q) rm -rf doc/elixir $(call DOCS_COMPILE,Elixir,elixir,Kernel,--config "lib/elixir/scripts/elixir_docs.exs") $(call DOCS_CONFIG,elixir) - cp -R lib/elixir/pages/images doc/elixir docs_eex: compile ../ex_doc/bin/ex_doc @ echo "==> ex_doc (eex)" diff --git a/lib/elixir/lib/enum.ex b/lib/elixir/lib/enum.ex index e34d665ca4a..373da0a6636 100644 --- a/lib/elixir/lib/enum.ex +++ b/lib/elixir/lib/enum.ex @@ -261,7 +261,7 @@ defmodule Enum do traversed as if it was an enumerable. For a general overview of all functions in the `Enum` module, see - [the `Enum` cheatsheet](enum-cheat.html). + [the `Enum` cheatsheet](enum-cheat.cheatmd). The functions in this module work in linear time. This means that, the time it takes to perform an operation grows at the same rate as the length diff --git a/lib/elixir/pages/anti-patterns/design-anti-patterns.md b/lib/elixir/pages/anti-patterns/design-anti-patterns.md index 22407c87472..9ca98aeb521 100644 --- a/lib/elixir/pages/anti-patterns/design-anti-patterns.md +++ b/lib/elixir/pages/anti-patterns/design-anti-patterns.md @@ -167,7 +167,7 @@ defmodule MyModule do end ``` -This is only possible because the `File` module provides APIs for reading files with tuples as results (`File.read/1`), as well as a version that raises an exception (`File.read!/1`). The bang (exclamation point) is effectively part of [Elixir's naming conventions](naming-conventions.html#trailing-bang-foo). +This is only possible because the `File` module provides APIs for reading files with tuples as results (`File.read/1`), as well as a version that raises an exception (`File.read!/1`). The bang (exclamation point) is effectively part of [Elixir's naming conventions](naming-conventions.md#trailing-bang-foo). Library authors are encouraged to follow the same practices. In practice, the bang variant is implemented on top of the non-raising version of the code. For example, `File.read!/1` is implemented as: diff --git a/lib/elixir/pages/getting-started/basic-types.md b/lib/elixir/pages/getting-started/basic-types.md index 6b26fba71c7..525d9bb1293 100644 --- a/lib/elixir/pages/getting-started/basic-types.md +++ b/lib/elixir/pages/getting-started/basic-types.md @@ -325,6 +325,6 @@ iex> 1 === 1.0 false ``` -The comparison operators in Elixir can compare across any data type. We say these operators perform _structural comparison_. For more information, you can read our documentation on [Structural vs Semantic comparisons](Kernel.html#module-structural-comparison). +The comparison operators in Elixir can compare across any data type. We say these operators perform _structural comparison_. For more information, you can read our documentation on [Structural vs Semantic comparisons](`Kernel#module-structural-comparison`). Elixir also provides data-types for expressing collections, such as lists and tuples, which we learn next. When we talk about concurrency and fault-tolerance via processes, we will also discuss ports, pids, and references, but that will come on later chapters. Let's move forward. diff --git a/lib/elixir/pages/getting-started/enumerable-and-streams.md b/lib/elixir/pages/getting-started/enumerable-and-streams.md index bc4f81516f0..07526b16292 100644 --- a/lib/elixir/pages/getting-started/enumerable-and-streams.md +++ b/lib/elixir/pages/getting-started/enumerable-and-streams.md @@ -13,7 +13,7 @@ iex> Enum.map(%{1 => 2, 3 => 4}, fn {k, v} -> k * v end) [2, 12] ``` -The `Enum` module provides a huge range of functions to transform, sort, group, filter and retrieve items from enumerables. It is one of the modules developers use frequently in their Elixir code. For a general overview of all functions in the `Enum` module, see [the `Enum` cheatsheet](enum-cheat.html). +The `Enum` module provides a huge range of functions to transform, sort, group, filter and retrieve items from enumerables. It is one of the modules developers use frequently in their Elixir code. For a general overview of all functions in the `Enum` module, see [the `Enum` cheatsheet](enum-cheat.cheatmd). Elixir also provides ranges (see `Range`), which are also enumerable: diff --git a/lib/elixir/pages/meta-programming/macros.md b/lib/elixir/pages/meta-programming/macros.md index ceed3c21531..1f04a344c8c 100644 --- a/lib/elixir/pages/meta-programming/macros.md +++ b/lib/elixir/pages/meta-programming/macros.md @@ -26,7 +26,7 @@ defmodule Unless do end ``` -The function receives the arguments and passes them to `if/2`. However, as we learned in the [previous guide](quote-and-unquote.html), the macro will receive quoted expressions, inject them into the quote, and finally return another quoted expression. +The function receives the arguments and passes them to `if/2`. However, as we learned in the [previous guide](quote-and-unquote.md), the macro will receive quoted expressions, inject them into the quote, and finally return another quoted expression. Let's start `iex` with the module above: diff --git a/lib/elixir/pages/mix-and-otp/dynamic-supervisor.md b/lib/elixir/pages/mix-and-otp/dynamic-supervisor.md index e353133372d..da3789c7d51 100644 --- a/lib/elixir/pages/mix-and-otp/dynamic-supervisor.md +++ b/lib/elixir/pages/mix-and-otp/dynamic-supervisor.md @@ -183,7 +183,7 @@ A GUI should pop up containing all sorts of information about our system, from g In the Applications tab, you will see all applications currently running in your system alongside their supervision tree. You can select the `kv` application to explore it further: -Observer GUI screenshot +Observer GUI screenshot Not only that, as you create new buckets on the terminal, you should see new processes spawned in the supervision tree shown in Observer: diff --git a/lib/elixir/pages/references/operators.md b/lib/elixir/pages/references/operators.md index 41642f0a9f5..73806521124 100644 --- a/lib/elixir/pages/references/operators.md +++ b/lib/elixir/pages/references/operators.md @@ -64,7 +64,7 @@ Finally, these operators appear in the precedence table above but are only meani * `=>` - see [`%{}`](`%{}/1`) * `when` - see [Guards](patterns-and-guards.md#guards) * `<-` - see [`for`](`for/1`) and [`with`](`with/1`) - * `\\` - see [Default arguments](Kernel.html#def/2-default-arguments) + * `\\` - see [Default arguments](`Kernel#def/2-default-arguments`) ## Comparison operators diff --git a/lib/elixir/pages/references/patterns-and-guards.md b/lib/elixir/pages/references/patterns-and-guards.md index f5728f5c6ed..a1fde72414e 100644 --- a/lib/elixir/pages/references/patterns-and-guards.md +++ b/lib/elixir/pages/references/patterns-and-guards.md @@ -274,7 +274,7 @@ Not all expressions are allowed in guard clauses, but only a handful of them. Th ### List of allowed functions and operators -You can find the built-in list of guards [in the `Kernel` module](Kernel.html#guards). Here is an overview: +You can find the built-in list of guards [in the `Kernel` module](`Kernel#guards`). Here is an overview: * comparison operators ([`==`](`==/2`), [`!=`](`!=/2`), [`===`](`===/2`), [`!==`](`!==/2`), [`<`](``](`>/2`), [`>=`](`>=/2`)) diff --git a/lib/elixir/pages/references/typespecs.md b/lib/elixir/pages/references/typespecs.md index 163219d88d3..040d97dcf73 100644 --- a/lib/elixir/pages/references/typespecs.md +++ b/lib/elixir/pages/references/typespecs.md @@ -321,7 +321,7 @@ end ``` This code generates a warning letting you know that you are mistakenly implementing `parse/0` instead of `parse/1`. -You can read more about `@impl` in the [module documentation](Module.html#module-impl). +You can read more about `@impl` in the [module documentation](`Module#module-impl`). ### Using behaviours diff --git a/lib/elixir/pages/references/unicode-syntax.md b/lib/elixir/pages/references/unicode-syntax.md index 40dbfdc6775..8a29f80f010 100644 --- a/lib/elixir/pages/references/unicode-syntax.md +++ b/lib/elixir/pages/references/unicode-syntax.md @@ -81,7 +81,7 @@ Unicode atoms in Elixir follow the identifier rule above with the following modi * `` additionally includes the code point `_` (005F) * `` additionally includes the code point `@` (0040) -Note atoms can also be quoted, which allows any characters, such as `:"hello elixir"`. All Elixir operators are also valid atoms, such as `:+`, `:@`, `:|>`, and others. The full description of valid atoms is available in the ["Atoms" section in the syntax reference](syntax-reference.html#atoms). +Note atoms can also be quoted, which allows any characters, such as `:"hello elixir"`. All Elixir operators are also valid atoms, such as `:+`, `:@`, `:|>`, and others. The full description of valid atoms is available in the ["Atoms" section in the syntax reference](syntax-reference.md#atoms). #### Variables, local calls, and remote calls diff --git a/lib/elixir/scripts/elixir_docs.exs b/lib/elixir/scripts/elixir_docs.exs index 1f7303d91e1..fd20e730c91 100644 --- a/lib/elixir/scripts/elixir_docs.exs +++ b/lib/elixir/scripts/elixir_docs.exs @@ -2,6 +2,7 @@ canonical = System.fetch_env!("CANONICAL") [ + assets: "lib/elixir/pages/images", extras: [ "lib/elixir/pages/getting-started/introduction.md", "lib/elixir/pages/getting-started/basic-types.md",