Skip to content

Add support for :api_reference_noindex config#2252

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
robertoaloi:main
Jul 1, 2026
Merged

Add support for :api_reference_noindex config#2252
josevalim merged 1 commit into
elixir-lang:mainfrom
robertoaloi:main

Conversation

@robertoaloi

Copy link
Copy Markdown
Contributor

Adds a new :api_reference_noindex config option (default: false) that adds <meta name="robots" content="noindex"> to the generated api-reference.html, asking search engines not to index it.

Motivation

Since the individual module and function pages are already indexed, the aggregate page is redundant for search. This option lets you keep the page available for navigation while excluding it from indexing.

Usage

defp docs do
  [
    [...]
    api_reference_noindex: true
  ]
end

The default is false, so behavior is unchanged for existing projects — including those that use the API Reference page as their indexed landing page.

Notes

  • Applies to the HTML formatter.
  • Relies on crawlers honoring the noindex robots meta tag.

@josevalim josevalim merged commit 879d9cb into elixir-lang:main Jul 1, 2026
6 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants