Skip to content

healeycodes/embed-DEV-posts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Embed Your Latest DEV Posts Anywhere!

A tiny library for embedding your latest DEV posts, sorted by popularity. Explainer post here!


function createFeed(elem, username, numberOfPosts = 5)

Creates a feed of DEV posts.

  • Parameters:
    • elem β€” Element β€” Place list of posts inside this element.
    • username β€” string β€” DEV username, e.g. 'ben'.
    • numberOfPosts β€” number β€” Number of posts to list.

Generates HTML that looks like this:

<div class="example">
  <ul class="dev-feed-list">
    <li class="dev-feed-item">
      <a href="https://dev.to/devteam/dev-community-is-open-sourcing-its-performance-metrics-via-skylight-221m">
        DEV Community Is Open-Sourcing Its Performance Metrics via Skylight
      </a>
    </li>
  </ul>
</div>

Use .dev-feed-list to style the list and .dev-feed-item to style the items.


Accepting PRs/issues πŸ‘

About

Embed a list of your most recent DEV posts with this tiny library πŸ’Œ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published