cljoly / gohugo-asciinema

⏯️ Insert the Asciinema Player in your Hugo site with ease.
https://cj.rs/gohugo-asciinema
16 stars 3 forks source link

Ability to set defaults for player shortcode #7

Closed neilotoole closed 1 year ago

neilotoole commented 1 year ago

See #6 .

I always want the same asciiplayer theme. This PR now allows you to do this in params.toml or equivalent:

[asciinema]
  [asciinema.defaults]
    theme = "solarized-dark"
    loop = true
    autoPlay = true
    speed = "2.5"
cljoly commented 1 year ago

That’s a great idea, I’ll probably use that as well! Let me test it…

neilotoole commented 1 year ago

@cljoly I'll admit, I'm always a bit confused about the way that Hugo processes config, especially with the Configuration Directory mechanism.

I've pushed an update to the PR, with examples for both config.toml and params.toml. I'm not sure if this is the best approach, so please feel free to modify the PR as you see fit.

cljoly commented 1 year ago

Yeah, that can be quite confusing at times.

I've pushed an update to the PR, with examples for both config.toml and params.toml. I'm not sure if this is the best approach, so please feel free to modify the PR as you see fit.

Cool, thank you. Let’s merge as it is, I might change the README later if I change my mind :)

cljoly commented 1 year ago

Merged, thank you for your contribution!