Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,23 @@ Hit `CTRL+C` in the terminal that is showing `hugo` activity to interrupt the se

Style overrides are in `/assets/scss/_variables_project.scss`. Here we can override all the styles that ship with the Docsy theme. O

## Using the Chat Widget

To use the chat widget (`static/chat-widget.js` and `static/chat-widget.css`):

- Ensure both files are included in your HTML page.
- The widget communicates with a backend service. By default, it connects to `http://localhost:8018/docs-agent`.
- To use a different backend URL or port, set `window.DOCS_AGENT_BACKEND_URL` before loading the widget script:

```html
<script>
window.DOCS_AGENT_BACKEND_URL = 'http://your-backend-host:your-port/your-endpoint';
</script>
<script src="static/chat-widget.js"></script>
<link rel="stylesheet" href="static/chat-widget.css">
```
- The chat widget will use this URL for all requests.

## Troubleshooting

As you run the website locally, you may run into the following error:
Expand Down
1 change: 1 addition & 0 deletions hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ services:
id: GTM-5BL5RTH

params:
docs_agent_backend_url: "http://localhost:8018/docs-agent"
#search:
# algolia:
# appId: 2D210VB5MP
Expand Down
41 changes: 41 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{{/* layouts/partials/footer.html */}}
{{/* This overrides the theme's footer partial */}}
<footer class="td-footer row d-print-none">
<div class="container-fluid">
<div class="row mx-md-2">
{{ if $.Site.Params.ui.footer_links.user -}}
<div class="td-footer__left col-6 col-sm-4 order-sm-1">
{{ partial "footer-links-block.html" (dict "page" . "section" "user") }}
</div>
{{ end -}}
{{ if $.Site.Params.ui.footer_links.developer -}}
<div class="td-footer__right col-6 col-sm-4 order-sm-3">
{{ partial "footer-links-block.html" (dict "page" . "section" "developer") }}
</div>
{{ end -}}
<div class="td-footer__center col-12 col-sm-4 py-2 order-sm-2">
{{ with $.Site.Copyright }}<span class="td-footer__copyright">{{ . | markdownify }}</span>{{ end }}
{{ if $.Site.Params.copyright -}}
<span class="td-footer__copyright">&copy;
{{ if $.Site.Params.copyright.from_year -}}
{{ $.Site.Params.copyright.from_year }}&ndash;{{ now.Format "2006" }}
{{ else -}}
{{ now.Format "2006" }}
{{ end -}}
{{ with $.Site.Params.copyright.authors }}<span class="td-footer__authors">{{ . | markdownify }}</span>{{ end }}
</span>
{{ end -}}
{{ if $.Site.Params.ui.footer_about_disable }} <span class="td-footer__separator"></span> {{ end }}
<span class="td-footer__all_rights_reserved">{{ T "footer_all_rights_reserved" }}</span>
{{ with $.Site.Params.privacy_policy }}<span class="ms-2"><a href="{{ . | relLangURL }}" target="_blank" rel="noopener">{{ T "footer_privacy_policy" }}</a></span>{{ end }}
</div>
</div>
</div>
</footer>

<!-- Chat Widget Injection -->
<script>
window.DOCS_AGENT_BACKEND_URL = "{{ .Site.Params.docs_agent_backend_url }}";
</script>
<link rel="stylesheet" href="/chat-widget.css">
<script src="/chat-widget.js" defer></script>
Loading