Script to fetch blog posts from and append to div on own site.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Script to fetch blog posts from and append to div on own site.


Javascript that fetches blog posts from, a blockchain based community. Script looks for specific user and tags, then formats the markup to html and adds 5 posts to div tag on page. When user reaches end of page, it repeats and loads 5 new posts.

The script is as used on so specific for my needs. As it is fairly simple and written top to bottom, I have uploaded it in case it could be of use to anyone else. I myself tend to find useful info from sources like this.



Create a skeleton html file download steemnews.js + dependencies (or link to cdn hosted versions). Include all scripts like this:

<script src="jquery.min.js"></script>
<script src="purify.min.js"></script>
<script src="showdown.min.js"></script>
<script src="dsteem.js"></script>
<script src="steemnews.js"></script>

edit the const at top of steemnews.js:

const author = "Your Steemit User name";
const tagNews = "A tag you want to use as news.";
const tagBlog = "Additional tag to use as news.";

Modify any id or class in script/html and add a css (I think only 4-5 id/class used). That's it!

Example of html

    <meta charset="utf-8" />
    <!-- Scripts -->
    <script src="/assets/js/jquery.min.js"></script>
    <script src="/assets/js/purify.min.js"></script>
    <script src="/assets/js/dsteem.js"></script>
    <script src="/assets/js/smSteem.js"></script>
  <div id="main">
    <div class="inner">
        <h1>Latest News &amp; Blog Posts</h1>

        <div id="selectNews">
            <input id="radioNewsBoth" name="radioNews" type="radio">
            <label for="radioNewsBoth">Both</label>
            <input id="radioNewsNews" name="radioNews" type="radio" checked>
            <label for="radioNewsNews">News</label>
            <input id="radioNewsBlog" name="radioNews" type="radio">
            <label for="radioNewsBlog">Blog</label>

        <!-- Filled from Steemit -->
        <div class="innerNews">
                <b>Loading ...</b>