Skip to content

Commit f8f2e2a

Browse files
authored
Add anchor tags to README headers (#13083)
## Summary This pull request adds anchor tags to the elements referenced in the table of contents section of the readme used on [PyPI](https://pypi.org/project/ruff/) as an attempt to fix #7257. This update follows [this suggestion](pypa/readme_renderer#169 (comment)) to add anchor tags (with no spaces) after the title that is to be linked to. ## Test Plan - This has been tested on GitHub to check that the additional tags do not interfere with how the read me is rendered; see: https://github.com./calumy/ruff/blob/add-links-to-pypi-docs/README.md - MK docs were generated using the `generate_mkdocs.py` script; however as the added tags are beyond the comment `<!-- End section: Overview -->`, they are excluded so will not change how the docs are rendered. - I was unable to verify how PyPI renders this change, any suggestions would be appreciated and I can follow up on this. Hopefully, the four thumbs up/heart on [this comment](pypa/readme_renderer#169 (comment)) and [this suggestion](pypa/readme_renderer#169 (comment)) all suggest that this approach should work.
1 parent 0b5828a commit f8f2e2a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ For more, see the [documentation](https://docs.astral.sh/ruff/).
110110
1. [Who's Using Ruff?](#whos-using-ruff)
111111
1. [License](#license)
112112

113-
## Getting Started
113+
## Getting Started<a id="getting-started"></a>
114114

115115
For more, see the [documentation](https://docs.astral.sh/ruff/).
116116

@@ -195,7 +195,7 @@ jobs:
195195
- uses: chartboost/ruff-action@v1
196196
```
197197

198-
### Configuration
198+
### Configuration<a id="configuration"></a>
199199

200200
Ruff can be configured through a `pyproject.toml`, `ruff.toml`, or `.ruff.toml` file (see:
201201
[_Configuration_](https://docs.astral.sh/ruff/configuration/), or [_Settings_](https://docs.astral.sh/ruff/settings/)
@@ -291,7 +291,7 @@ features that may change prior to stabilization.
291291
See `ruff help` for more on Ruff's top-level commands, or `ruff help check` and `ruff help format`
292292
for more on the linting and formatting commands, respectively.
293293

294-
## Rules
294+
## Rules<a id="rules"></a>
295295

296296
<!-- Begin section: Rules -->
297297

@@ -367,21 +367,21 @@ quality tools, including:
367367

368368
For a complete enumeration of the supported rules, see [_Rules_](https://docs.astral.sh/ruff/rules/).
369369

370-
## Contributing
370+
## Contributing<a id="contributing"></a>
371371

372372
Contributions are welcome and highly appreciated. To get started, check out the
373373
[**contributing guidelines**](https://docs.astral.sh/ruff/contributing/).
374374

375375
You can also join us on [**Discord**](https://discord.com/invite/astral-sh).
376376

377-
## Support
377+
## Support<a id="support"></a>
378378

379379
Having trouble? Check out the existing issues on [**GitHub**](https://github.com./astral-sh/ruff/issues),
380380
or feel free to [**open a new one**](https://github.com./astral-sh/ruff/issues/new).
381381

382382
You can also ask for help on [**Discord**](https://discord.com/invite/astral-sh).
383383

384-
## Acknowledgements
384+
## Acknowledgements<a id="acknowledgements"></a>
385385

386386
Ruff's linter draws on both the APIs and implementation details of many other
387387
tools in the Python ecosystem, especially [Flake8](https://github.com./PyCQA/flake8), [Pyflakes](https://github.com./PyCQA/pyflakes),
@@ -405,7 +405,7 @@ Ruff is the beneficiary of a large number of [contributors](https://github.com./a
405405

406406
Ruff is released under the MIT license.
407407

408-
## Who's Using Ruff?
408+
## Who's Using Ruff?<a id="whos-using-ruff"></a>
409409

410410
Ruff is used by a number of major open-source projects and companies, including:
411411

@@ -524,7 +524,7 @@ If you're using Ruff, consider adding the Ruff badge to your project's `README.m
524524
<a href="https://github.com./astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff" style="max-width:100%;"></a>
525525
```
526526

527-
## License
527+
## License<a id="license"></a>
528528

529529
This repository is licensed under the [MIT License](https://github.com./astral-sh/ruff/blob/main/LICENSE)
530530

0 commit comments

Comments
 (0)