Skip to content
Merged
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
1 change: 1 addition & 0 deletions docs/.vitepress/config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default defineConfig({
{ text: 'Home Assistant', link: '/api/integrations/homeassistant' },
{ text: 'Homarr', link: '/api/integrations/homarr' },
{ text: 'Homepage', link: '/api/integrations/homepage' },
{ text: 'Homer', link: '/api/integrations/homer' },
],
},
],
Expand Down
64 changes: 64 additions & 0 deletions docs/api/integrations/homer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Homer

LibrisLog can be integrated into [Homer](https://github.com/bastienwirtz/homer),
a self-hosted dashboard for your services, using its
[LibrisLog custom service](https://github.com/bastienwirtz/homer/blob/main/docs/customservices.md#librislog).

This smart card displays your reading statistics: total books, books read,
currently reading, and want-to-read counts directly on your Homer dashboard.

## Prerequisites

- A running LibrisLog instance reachable from the browser you use to view
your Homer dashboard (the card fetches data client-side)
- An [API key](/api/integrations/#api-keys) with access to the
statistics endpoint

## Configuration

Add the following service entry to your Homer `config.yml`:

```yaml
- name: "LibrisLog"
type: "LibrisLog"
logo: "https://docs.librislog.app/logo.png"
url: "<LIBRISLOG-URL>"
apikey: "<API-KEY>"
```

The card supports auto refresh, which can be enabled individually for each
service using the `updateIntervalMs` option.

> [!WARNING]
> Homer serves your `config.yml` at `/assets/config.yml` over HTTP. The API
> key in it is readable by anyone who can access your Homer instance. Only
> include it if your Homer instance is protected by authentication or access
> controls.

## Placeholders

Replace the placeholders with your own values:

| Placeholder | Example | Description |
|---|---|---|
| `<LIBRISLOG-URL>` | `http://192.168.1.100:8000` | The base URL of your LibrisLog instance (http or https) |
| `<API-KEY>` | `lk_nRHsF3jxIBDa9u....` | An API key with access to the statistics endpoint |
| `<HOMER-URL>` | `http://192.168.1.100:8080` | The base URL of your Homer instance |

## CORS

The Homer card fetches the API directly from the browser. You must add your
Homer URL to the
[`CORS_ORIGINS`](/guide/configuration#core-settings) environment variable of
the LibrisLog backend:

```
CORS_ORIGINS=["<HOMER-URL>"]
```

If the card stays empty or shows no statistics, check your browser console
for CORS errors.

## Result

![Homer Widget](/screenshots/integrations-homer.png)
3 changes: 3 additions & 0 deletions docs/api/integrations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ headers. For these integrations you need an **embed token**, used with the
- [Homepage](/api/integrations/homepage) — Display your LibrisLog statistics
on a [Homepage](https://gethomepage.dev/) dashboard using the custom API
widget.
- [Homer](/api/integrations/homer) — Display your LibrisLog statistics on a
[Homer](https://github.com/bastienwirtz/homer) dashboard using the
LibrisLog custom service.
Binary file added docs/public/screenshots/integrations-homer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.