Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rss-feed

display RSS feed item(s) in plain HTML

use

<script type="text/javascript" src="https://catskull.net/public/js/components/rss-feed.js" async></script>
<rss-feed url="https://mastodon.social/@dareelcatskull.rss" count="2"></rss-feed>

output:

<rss-feed url="https://mastodon.social/@dareelcatskull.rss" count="2">
  <div><p>what a time to be alive!</p></div>
  <small>
  <a href="https://mastodon.social/@dareelcatskull/113086020707228626" target="_blank">mastodon.social</a>
  <time datetime="2024-09-05T17:02:15.000Z">September 5, 2024</time>
  </small>
  <hr>

  <div><p>wow you can edit tweets</p></div>
  <small>
  <a href="https://mastodon.social/@dareelcatskull/113086004893026159" target="_blank">mastodon.social</a>
  <time datetime="2024-09-05T16:58:14.000Z">September 5, 2024</time>
  </small>
  <hr>
</rss-feed>

attributes

  • url (required): the url of the RSS/Atom feed
  • count (optional): how many items (newest to oldest) to display

No style is applied. It should look fine.

Note the date string is localized based on navigator.language (ex. en-US)

thanks

help wanted

  • accesibility
  • what is the best way to distribute a single static JS file in 2024?

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages