Skip to content

Commit

Permalink
docs: update README with structure of an article
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-shuman committed Sep 10, 2024
1 parent f62631b commit 9f19273
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,24 @@ docker compose up

### :lock: Authentication

You can **optionally** protect your reading list with a password by setting a `PASSWORD` env variable in your compose config. This will protect all routes (except for feeds ie `/rss`, `/atom`, etc. **working on a better solution to this**).
You can **optionally** protect your reading list with a password by setting the `PASSWORD` and `AUTH_SECRET` env variables in your compose config. This will protect all routes excluding feed routes (`/rss`, `/atom`, etc). I'm still looking into how rss aggregators generally handle auth for feeds and only want to add auth when it doesn't prevent aggregators from accessing reading lists.

## Stucture of an article

```ts
{
id: number;
url: string;
publish_date: string; // date article was published (added_date if this can't be found)
added_date: string; // date the article was added to readl8r
title: string | null;
description: string | null;
content: string | null;
author: string | null;
favicon: string | null;
ttr: number | null; // estimated time to read article in seconds
}
```

## :heavy_plus_sign: Add an article

Expand Down
6 changes: 3 additions & 3 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { type Generated, type Insertable, type Selectable, type Updateable } fro
export interface ArticleTable {
id: Generated<number>;
url: string;
publish_date: string;
added_date: string;
publish_date: string; // date article was published (added_date if this can't be found)
added_date: string; // date the article was added to readl8r
title: string | null;
description: string | null;
content: string | null;
author: string | null;
favicon: string | null;
ttr: number | null;
ttr: number | null; // estimated time to read article in seconds
}

export type Article = Selectable<ArticleTable>;
Expand Down

0 comments on commit 9f19273

Please sign in to comment.