statnmap / blog_tips

Comments and complete R script files shared on the blog
GNU General Public License v3.0
31 stars 19 forks source link

codefolding for other themes? #1

Open olugovoy opened 4 years ago

olugovoy commented 4 years ago

Hi there! Thanks for the tips and the codefolding scripts! I'm following this steps Enable code folding in bookdown and blogdown and also Code folding with blogdown + Academic theme to reproduce it for several themes, including "academic", but cannot make it work. (The "academic" theme changed, and the provided example doesn't fit well) It looks like I'm missing something or the code itself should be adjusted for each particular there. Here are my attempts:

Any suggestion will be appreciated!

hugo_version() [1] ‘0.66.0’

statnmap commented 4 years ago

Hi, I already implemented code folding in future-imperfect in the "ml" branch: https://github.com/statnmap/hugo-future-imperfect/tree/ml
Maybe you can find ideas. As far as I remember, there may be some interactions with call to jQuery, which forced me to add part of the code in the header. See this commit in particular : https://github.com/statnmap/hugo-future-imperfect/commit/8061a877a3dcf757b0c6a66d2ed2492c3d6cb71b

jepusto commented 4 years ago

Hi! I worked out a solution for Academic theme 4.+. Here's instructions: https://www.jepusto.com/code-folding-update/