gen-addon-readme: use addon manifest name as HTML <title>#676
Conversation
The OCA banner image at the top of README.rst suppresses docutils' doctitle_xform, so the generated index.html falls back to using the input filename — every OCA module ships a static description page titled "README.rst". Read the addon's manifest "name" and pass it to publish_file via settings_overrides.title so search results, browser tabs, and indexers see the module display name.
|
Nice! |
StefanRijnhart
left a comment
There was a problem hiding this comment.
Thanks! Tested locally.
|
Now the repo template needs updating. I'll update the GitHub bot. Next week, I'll also try to progress with automatic updates of the repo template with renovate. |
|
It's important to sync the copier template with what you deploy in the bot, because if not, we have a PR changing anything in the manifest, that regenerates the README.rst / index.html via pre-commit, adding a lot of noise in the PR, and then when merged, triggering another commit "post-merge updates" restoring again the files to the original state. Although each repo doesn't have the latest copier template, at least to have the copier template definition synced, and then we can put manual updates per repo when we detect these situations. |
|
Yes I know it's annoying. I'm still not convinced having the README generation in pre-commit is a good idea. |
|
Please then sync both. I think it's very valuable to have the README generated for reviewers to have that file to read, and remember also the problem that the README is not correct when merging the fragments, that is only then detected on merge, not when running pre-commit. |
The OCA banner image at the top of every
README.rstsuppresses docutils'doctitle_xform, so the generatedstatic/description/index.htmlfalls back to using the input filename — every OCA module ships a static description page titled "README.rst". Read the addon's manifestnameand pass it viasettings_overrides.title.Verified locally with
base_m2m_custom_field:<title>becomes "Base Many2many Custom Field" instead of "README.rst".