Skip to content

gen-addon-readme: use addon manifest name as HTML <title>#676

Merged
sbidoul merged 1 commit into
OCA:masterfrom
ledoent:fix-readme-html-title
May 21, 2026
Merged

gen-addon-readme: use addon manifest name as HTML <title>#676
sbidoul merged 1 commit into
OCA:masterfrom
ledoent:fix-readme-html-title

Conversation

@dnplkndll
Copy link
Copy Markdown
Contributor

The OCA banner image at the top of every README.rst suppresses docutils' doctitle_xform, so the generated static/description/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 via settings_overrides.title.

Verified locally with base_m2m_custom_field: <title> becomes "Base Many2many Custom Field" instead of "README.rst".

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.
@dnplkndll
Copy link
Copy Markdown
Contributor Author

@sbidoul @petrus-v — quick docutils setting override; verified locally

@sbidoul
Copy link
Copy Markdown
Member

sbidoul commented May 20, 2026

Nice!

Copy link
Copy Markdown
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Tested locally.

@sbidoul sbidoul merged commit 31bdbd8 into OCA:master May 21, 2026
7 checks passed
@sbidoul
Copy link
Copy Markdown
Member

sbidoul commented May 21, 2026

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.

@pedrobaeza
Copy link
Copy Markdown
Member

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.

@sbidoul
Copy link
Copy Markdown
Member

sbidoul commented May 21, 2026

Yes I know it's annoying. I'm still not convinced having the README generation in pre-commit is a good idea.

@pedrobaeza
Copy link
Copy Markdown
Member

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.

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

Successfully merging this pull request may close these issues.

4 participants