r-lib / hugodown

Make websites with hugo and RMarkdown
https://hugodown.r-lib.org
Other
166 stars 24 forks source link

Install theme? #25

Closed apreshill closed 4 years ago

apreshill commented 4 years ago

Will hugodown have functions to install a theme from GitHub? Or is it mainly focused on existing Hugo/blogdown sites? If intended as a full Hugo site tool, I appreciated this feature in blogdown: https://github.com/rstudio/blogdown/issues/391

maelle commented 4 years ago

Adding a question to the thread. If theme installation gets supported, then how, modules or theme= or both? "Modules" seem to be the future.

https://gohugo.io/hugo-modules/use-modules/#use-a-module-for-a-theme

https://discourse.gohugo.io/t/hugo-modules-for-dummies/20758/3 (h/t https://blog.jemu.name/2020/05/hugo-theme-components-modules/)

hadley commented 4 years ago

I have a been thinking about a couple of functions for specific themes (eg academic and something else). There’s so much diversity in themes that it’s going to be very hard to deliver a convenient experience in general, so I’d rather focus on building out one or two themes to help get people up and running as quickly as possible. (And then more experienced Hugo + R users could contribute code for other themes based on those functions)

maelle commented 4 years ago

it'd be like distill! :clap:

Just wanted to note that when using modules and not vendoring the modules, @apreshill there's no themes folder to mess with, which you might like :wink: (there might be downsides to not vendoring of course)

hadley commented 4 years ago

I think having a static themes folder that you control precisely when is updated is likely to be the safest strategy. I’d prefer to avoid modules as they look like an additional layer of complexity.

maelle commented 4 years ago

Right. Especially that one needs Go, that's a big problem (if modules didn't have these problems, I'd vaguely suggest a setup recommending a theme module with version number, like a release of the theme, + vendoring in an app dir by hugodown <- not clever for Netlify, taking this back).

hadley commented 4 years ago

(not that it matters, but the way I'm installing hugo should now avoid any issues of that sort)

maelle commented 4 years ago

(which issues? sorry)

hadley commented 4 years ago

(the needing of go; hugodown installs a hugo binary so you don't need any other external dependencies)

maelle commented 4 years ago

(I was referring to https://gohugo.io/hugo-modules/use-modules/#prerequisite <- as far as I understood, to use modules you need Hugo and a newer version of Go, plus a version control system, but I might have gotten that wrong, and it might change)

hadley commented 4 years ago

(right, that's what I was meaning that you don't need to worry about 😄)

maelle commented 4 years ago

(even Go?! I'll read more then. And think modules are good in that case since one would really declare the dependency on a version of a theme :-) )

hadley commented 4 years ago

(yes, I'd say that go is an external dependency)

hadley commented 4 years ago

Notes to self on what creating a hugo academic site entails

Should also make notes on what you need to check if you make your own wrapper (e.g. want to make sure enableEmoji = true)