aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorAleteoryx <alyx@aleteoryx.me>2024-11-14 20:46:41 -0500
committerAleteoryx <alyx@aleteoryx.me>2024-11-14 21:00:19 -0500
commit4b5843ede4bc46cc5ceb58e1ae00a9c6eacb911c (patch)
tree0b084f6dff69197ddbdd8ad520263702d2f32371 /README.md
parentd48c31646b73d46b89061b0df60cfee56b9c6db9 (diff)
downloadrss_dot_php-master.tar.gz
rss_dot_php-master.tar.bz2
rss_dot_php-master.zip
update readmeHEADmaster
Diffstat (limited to 'README.md')
-rw-r--r--README.md49
1 files changed, 48 insertions, 1 deletions
diff --git a/README.md b/README.md
index e0328d3..44ed44d 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# rss_dot_php
-A minimal configurable RSS/Atom reader in about 200 lines of PHP.
+A minimal configurable RSS/Atom reader in about 400 lines of PHP.
This tool isn't intended for standalone reading, instead it's
intended to be used as an aggregator for personal feeds, that can be
@@ -8,6 +8,15 @@ embedded into a website via an &lt;iframe&gt;.
You can see it in action [on my homepage][me].
+## Features
+
+- RSS/Atom autodetection
+- Multiple feeds
+- Caching
+- Lives in just one file
+- Renders post contents
+- Renders media files
+
## Usage
To use this tool, just download the main [`rss.php`][php] file and edit it.
@@ -22,6 +31,7 @@ The following options are supported per-feed:
- `"title"`: The default. Shows the title as a link to the article.
- `"content"`: Shows the title and content.
- `"no_title"`: Hides the title, displays the content. A link to the source is put at the bottom.
+- `$feeds[feed]["media"]`: Whether or not to render media files in the feed. Boolean. Defaults to true.
- `$feeds[feed]["allow_html"]`: Whether or not to allow html in the content area, stripped. Boolean. Defaults to true.
- `$feeds[feed]["ttl"]`: How long to cache the feed for, in seconds. Defaults to 1 hour.
- `$feeds[feed]["linkrel"]`: For Atom, which `rel=` value to prefer when getting a link. Defaults to alternate.
@@ -40,6 +50,43 @@ URLs overlap.
[`aleteoryx.css`][css] contains an example stylesheet.
+The HTML tree looks like this:
+
+```html
+<main>
+ <!-- if $feeds[feed]["mode"] is "no_title" -->
+ <article data-source="<!-- the key in $feeds this post comes from -->">
+ <div class="rss-content">
+ <div><!-- text content of the entry --></div>
+ </div>
+ <span class="rss-source">
+ <a href="<!-- $feeds[feed]['home'] -->">
+ <!-- the key in $feeds this post comes from -->
+ </a>
+ </span>
+ •
+ <a href="<!-- post URL -->">Source</a>
+ •
+ <time datetime="<!-- post date -->"><!-- post date --></time>
+ </article>
+
+ <!-- otherwise -->
+ <article data-source="<!-- the key in $feeds this post comes from -->">
+ <div class="rss-content">
+ <h1 class="rss-title"><a href="<!-- post URL -->"><!-- post title --></a></h1>
+ <div><!-- text content of the entry, if set to render --></div>
+ </div>
+ <span class="rss-source">
+ <a href="<!-- $feeds[feed]['home'] -->">
+ <!-- the key in $feeds this post comes from -->
+ </a>
+ </span>
+ •
+ <time datetime="<!-- post date -->"><!-- post date --></time>
+ </article>
+</main>
+```
+
[me]: https://aleteoryx.me
[php]: https://git.aleteoryx.me/cgit/rss_dot_php/tree/rss.php
[css]: https://git.aleteoryx.me/cgit/rss_dot_php/tree/aleteoryx.css