huggingface / doc-builder

The package used to build the documentation of our Hugging Face repos
Apache License 2.0
92 stars 35 forks source link

[toctree] support renaming `local` #491

Closed mishig25 closed 8 months ago

mishig25 commented 8 months ago

This feature allows a file named abc to be published in new url/local such as hf.co/docs/library/xyz rather than hf.co/docs/library/abc. The toctree should look like this:

title: Chapter Abc
local: abc
newlocal: xyz # this is the new field this PR is using

In most cases, if you can, you should just rename the file abc to xyz rather than using newlocal inside toctree