Thanks~ I added html_last_updated_fmt to the conf.py file, so the generated html files will show the latest update date, and the above issue causes the update date to be inaccurate.
I will comment out the parameter html_last_updated_fmt for now and not use it. 在2023年4月22日星期六 UTC+8 09:16:06<Kevin Cole> 写道: > On Fri, Apr 21, 2023 at 8:09 PM ycproject <[email protected]> wrote: > > > 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. > > Well, in my defense, I did say I wasn't certain. ;-) > > I did see that Wol had suggested the same source for the trouble. > > I cannot see how Sphinx and / or make would be able to determine which > files need regeneration without comparing dates... I don't think > there's any hidden cache or tmp directory... > -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/17e6c7f5-c2b7-4c34-817a-334b02977f13n%40googlegroups.com.
