Created
August 9, 2018 20:51
-
-
Save henriqueutsch/99f437839ad32964ff1edb7aae682980 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div#disqus_thread | |
javascript: | |
var disqus_config = function () { | |
this.page.url = "https://www.fulllifeacademy.com.br#{current_page.url}"; | |
this.page.title = "#{current_article.data.title}" | |
this.page.identifier = "#{idpost(current_article.data.title)}"; | |
this.page.category_id = "#{idcategory(current_article.data.category)}"; | |
}; | |
(function() { // DON'T EDIT BELOW THIS LINE | |
var d = document, s = d.createElement('script'); | |
s.src = 'https://full-life-academy.disqus.com/embed.js'; | |
s.setAttribute('data-timestamp', +new Date()); | |
(d.head || d.body).appendChild(s); | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Helper | |
def idpost(posttitle) | |
page_articles.each_with_index do |article, i| | |
return i if article.title == posttitle | |
end | |
end | |
def idcategory(postcategory) | |
all_categories.each_with_index do |category, i| | |
return i if category == postcategory | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment