Error with Doc-Builder in smolagents documentation NotFound[Error]

Hey there :hugs: !

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!

P.S. I also checked the post on Error with Doc-Builder: Error 404 on Section Pages in Doc-Builder Preview , but it didn’t help.

1 Like

There seems to be a version mismatch in the JavaScript version of DocBuilder

1 Like

Thank you :hugs:! I tried both version 0.6.0.dev0 and commit 3de0a0e ( GitHub - huggingface/doc-builder at 3de0a0e9f824fc50e78c873732ef4a4ebaeb005b ), but neither worked for me. However, I found a possible temporary workaround to test the documentation locally.

Steps:

  1. Clone the main repository you want to work with using:
    git clone https://github.com/huggingface/smolagents.git

  2. 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 ..
    
  3. 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

  4. Change the name of the index file from index.md to index1.md

  5. 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.

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.