Skip to content

WARNING: 4 column based index found, and the strange background color in HTML files. (CMake Docs) #11465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hwhsu1231 opened this issue Jun 19, 2023 · 3 comments

Comments

@hwhsu1231
Copy link

hwhsu1231 commented Jun 19, 2023

Describe the bug

It is related to this topic of CMake Discourse.

Recently, I tried to use sphinx<=2.4.5 to build the documentation of cmake<=3.8. However, there are:

  • lots of WARNING: 4 column based index found messages

    image

  • the strange background color in HTML files

    image

How to Reproduce

  1. Run the following commands:

    pip install sphinx==2.4.5 docutils==0.17.1 jinja2==3.0.0
    sphinx-build --version
    git clone --depth 1 --no-single-branch https://github.com/Kitware/CMake.git
    cd CMake
    git checkout v3.5.2 --quiet
    git describe --tag
    mkdir build && cd build
    cmake ../Utilities/Sphinx -DSPHINX_HTML=ON -DSPHINX_FLAGS="-A versionswitch=1"
    cmake --build .
    
  2. Open the HTML file in the CMake/build/html directory.

Environment Information

Since the Sphinx build process is integrated into the CMake Documentation, I don't know where to run those commands (sphinx-build --bug-report or python -m sphinx --bug-report).

  • OS version: Windows 11
  • Sphinx version: 2.4.5
  • Gettext version: 0.21.0

Sphinx extensions

No response

Additional context

No response

@picnixz
Copy link
Member

picnixz commented Jul 11, 2023

It appears that the documentation you are building uses an old syntax for index entries1, although not marked as deprecated (see 76b9992 and #2633).

I think you can just ignore the warning.

Footnotes

  1. https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-index

@hwhsu1231
Copy link
Author

@picnixz - Thansk for your replies.

However, I want to know which versions of Sphinx or its dependencies should I use to:

  • remove these warning messages, and
  • make the background color correct.

@picnixz
Copy link
Member

picnixz commented Jul 11, 2023

  • You won't be able to remove the warning because it's been 7 years that this warning is emitted. Best shot you have is to find which extension / which RST document is using this form. One possibility is just to ignore the warning or filter it in your Makefile using some bash pipe. Unfortunately Sphinx does not provide a native way to suppress specific logging messages if they are not bound to some "type" and "category".
  • If you want to change the background you need to change the theme you are using or use a custom CSS. For that, I would advise you to ask the community on Stackoverflow (this is not a bug IMO).

@AA-Turner AA-Turner added this to the some future version milestone Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants