1. Execute make html in the project directory oldproject (this directory contains the cony.py file and index.rst file, as well as the Makefile file), making sure that no new html files are generated.
2. Copy the entire project directory oldproject to another disk and rename it to test.
3. Check the time attribute of the html file in the test/_build/html directory: stat index.html, and the output will be the time when the project directory was copied.
4. Three minutes later, in the test directory (this directory contains the cony.py file and the index.rst file, as well as the Makefile file), execute find . -name "*.html" -exec touch {} + command.
5. Check the time attribute of the html file in the test/_build/html directory: stat index.html, the output is the current time, which is about 4 minutes later than the project directory copy time.
6. Execute make html in the test/ directory.
7. Result: All html files are regenerated.
In the above process, the touch index.rst file was not executed in the test/ directory.
After that, I deleted the whole test directory, then repeated the above 7 steps, but added one step before step 6: touch index.rst. Finally when make html, it still generated all the html files.
After that, I deleted the whole new project directory and repeated the 7 steps above again, but this time instead of using the touch command before the step6, I modified the content of the index.rst file in the test/ directory: added some text. Finally when make html, it still generated all the html files.
So, modifying the time property of the html file (atime mtime ctime) seems to be invalid for now.
==========================
ps:
I am not sure if it is related to the following environmental situation:
OS: debian11
sphinx-bulider --version : 5.3.0.
The installation method for sphinx is: sudo apt install python3-sphinx python3-sphinx-rtd-theme.