Skip to content

Commit

Permalink
Merge pull request #1 from tcgriffith/master
Browse files Browse the repository at this point in the history
add medium posts as a shortcode
  • Loading branch information
data-datum authored Dec 5, 2019
2 parents 634e3d3 + 0a85c20 commit 3ca0de5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/home/posts.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ subtitle = "Recent Posts"
# CSS class.
css_class = ""
+++


{{< medium_posts >}}
16 changes: 16 additions & 0 deletions themes/hugo-academic/layouts/shortcodes/medium_posts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div id="medium-widget"></div>
<script src="https://medium-widget.pixelpoint.io/widget.js"></script>
<script>
MediumWidget.Init(
{
renderTo: '#medium-widget',
params: {
"resource": "https://medium.com/@data_datum",
"postsPerLine": 1,
"limit": 4,
"picture": "small",
"fields": ["description", "author", "claps", "publishAt"],
"ratio": "square"}
}
)
</script>

0 comments on commit 3ca0de5

Please sign in to comment.