mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-05 19:32:56 +00:00
docs: Add meta tag for image preview (#988)
I think this should work. Need to deploy it to be sure as it can be tested locally. Can be tested here. 2 things about this solution: * All pages have a same meta tag, i.e, lancedb banner * If needed, we can automatically use the first image of each page and generate meta tags using the ultralytics mkdocs plugin that we did for this purpose - https://github.com/ultralytics/mkdocs
This commit is contained in:
@@ -206,6 +206,7 @@ extra_css:
|
||||
|
||||
extra_javascript:
|
||||
- "extra_js/init_ask_ai_widget.js"
|
||||
- "extra_js/meta_tag.js"
|
||||
|
||||
extra:
|
||||
analytics:
|
||||
|
||||
6
docs/src/extra_js/meta_tag.js
Normal file
6
docs/src/extra_js/meta_tag.js
Normal file
@@ -0,0 +1,6 @@
|
||||
window.addEventListener('load', function() {
|
||||
var meta = document.createElement('meta');
|
||||
meta.setAttribute('property', 'og:image');
|
||||
meta.setAttribute('content', '/assets/lancedb_and_lance.png');
|
||||
document.head.appendChild(meta);
|
||||
});
|
||||
Reference in New Issue
Block a user