File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,14 @@ async function versionWarning(request, env) {
55
55
</div>`
56
56
}
57
57
58
+ const branch = env . CF_PAGES_BRANCH
59
+ const diff_html_url = `https://github.com/pydantic/pydantic-ai/compare/${ tag_name } ...${ branch } `
58
60
return `<div class="admonition info" style="margin: 0">
59
61
<p class="admonition-title">Version Notice</p>
60
62
<p>
61
- ${ env . CF_PAGES_BRANCH === 'main' ? '' : `(<b>${ env . CF_PAGES_BRANCH } </b> preview)` }
62
- This documentation is ahead of the last release by <b>${ ahead_by } </b> commit${ ahead_by === 1 ? '' : 's' } .
63
+ ${ branch === 'main' ? '' : `(<b>${ branch } </b> preview)` }
64
+ This documentation is ahead of the last release by
65
+ <a href="${ diff_html_url } ">${ ahead_by } commit${ ahead_by === 1 ? '' : 's' } </a>.
63
66
You may see documentation for features not yet supported in the latest release <a href="${ html_url } ">${ name } </a>.
64
67
</p>
65
68
</div>`
You can’t perform that action at this time.
0 commit comments