I am contributing to the translation project for smolagents on the Hugging Face GitHub repository, translating from English to Spanish.
However, when I try to preview the English documentation (or any other language) using the command doc-builder preview smolagents docs/source/en, I encounter 404 errors on the main index section, which prevents me from properly previewing the documentation locally (on Mac).
Attached are screenshots illustrating the issue. I would appreciate any guidance on how to resolve this. Thanks in advance for your help!
Clone the main repository you want to work with using: git clone https://github.com/huggingface/smolagents.git
Inside the main folder, run the following commands:
pip install -e .
pip install watchdog
git clone https://github.com/huggingface/doc-builder.git
cd doc-builder
pip install -e .
cd ..
In the _toctree.yml file (inside the docs/en folder) , change the values on lines 3 and 4 from:
local: index
title: Introduction
to
local: index1
title: Introduction1
and save the file
Change the name of the index file from index.md to index1.md
Start the server by running: doc-builder preview smolagents docs/source/en/
Note: Don’t forget to change the values in _toctree.yml back before pushing your changes to avoid any issues. You can also preview the docs after opening a PR.