📝 Add Jina's QA Bot to the docs to help people that want to ask quick questions (#368)
Co-authored-by: yanlong.wang <yanlong.wang@naiver.org> Co-authored-by: Han Xiao <han.xiao@jina.ai>
This commit is contained in:
parent
06b6a3e055
commit
51646dfee0
2 changed files with 30 additions and 0 deletions
29
docs/overrides/main.html
Normal file
29
docs/overrides/main.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
{% extends "base.html" %}
|
||||
{%- block scripts %}
|
||||
{{ super() }}
|
||||
<script src="https://cdn.jsdelivr.net/npm/qabot@0.4"></script>
|
||||
<script>
|
||||
// This prevents the global search from interfering with qa-bot's internal text input.
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
document.querySelectorAll('qa-bot').forEach((x) => {
|
||||
x.addEventListener('keydown', (event) => {
|
||||
event.stopPropagation();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<qa-bot
|
||||
server="https://tiangolo-typer.docsqa.jina.ai"
|
||||
theme="infer"
|
||||
title="Typer Bot"
|
||||
description="Typer, build great CLIs. Easy to code. Based on Python type hints."
|
||||
style="font-size: 0.8rem"
|
||||
>
|
||||
<dl>
|
||||
<dt>You can ask questions about Typer. Try:</dt>
|
||||
<dd>How can I terminate a program?</dd>
|
||||
<dd>How to launch applications?</dd>
|
||||
<dd>How to add help to CLI argument?</dd>
|
||||
</dl>
|
||||
</qa-bot>
|
||||
{%- endblock %}
|
|
@ -4,6 +4,7 @@ site_url: https://typer.tiangolo.com/
|
|||
|
||||
theme:
|
||||
name: material
|
||||
custom_dir: docs/overrides
|
||||
palette:
|
||||
primary: black
|
||||
accent: teal
|
||||
|
|
Loading…
Reference in a new issue