Skip to content

Commit e523e1e

Browse files
tiangolonomagickhanxiao
authored
📝 Add Jina's QA Bot to the docs to help people that want to ask quick questions (#263)
Co-authored-by: yanlong.wang <yanlong.wang@naiver.org> Co-authored-by: Han Xiao <han.xiao@jina.ai>
1 parent 6d969c5 commit e523e1e

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

‎docs/overrides/main.html‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{% extends "base.html" %}
2+
{%- block scripts %}
3+
{{ super() }}
4+
<script src="https://cdn.jsdelivr.net/npm/qabot@0.4"></script>
5+
<script>
6+
// This prevents the global search from interfering with qa-bot's internal text input.
7+
document.addEventListener('DOMContentLoaded', () => {
8+
document.querySelectorAll('qa-bot').forEach((x) => {
9+
x.addEventListener('keydown', (event) => {
10+
event.stopPropagation();
11+
});
12+
});
13+
});
14+
</script>
15+
<qa-bot
16+
server="https://tiangolo-sqlmodel.docsqa.jina.ai"
17+
theme="infer"
18+
title="SQLModel Bot"
19+
description="SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness."
20+
style="font-size: 0.8rem"
21+
>
22+
<template>
23+
<dl>
24+
<dt>You can ask questions about SQLModel. Try:</dt>
25+
<dd>Which Python version is supported?</dd>
26+
<dd>How SQLModel interacts with the database?</dd>
27+
<dd>How can I link tables?</dd>
28+
</dl>
29+
</template>
30+
</qa-bot>
31+
{%- endblock %}

‎mkdocs.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ site_description: SQLModel, SQL databases in Python, designed for simplicity, co
33
site_url: https://sqlmodel.tiangolo.com/
44
theme:
55
name: material
6+
custom_dir: docs/overrides
67
palette:
78
- scheme: default
89
primary: deep purple

0 commit comments

Comments
 (0)