New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vectorizing shortcode? #307

Closed
maelle opened this Issue Jun 26, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@maelle

maelle commented Jun 26, 2018

First of all, thanks for a great package!

In my post here I tried to use shortcode on a vector of tweet IDs. I couldn't figure which chunk options would help me get the shortcodes as I needed them, so I ended up writing

library("magrittr")
# Good than one can choose glue limits!
glue::glue("{{< tweet [my_satrday_tweets$status_id] >}}",
             .open = "[", .close = "]") %>%
    htmltools::HTML()

Would a vectorized version of shortcode be useful?

@yihui yihui closed this in ff4cfb7 Jun 27, 2018

@yihui yihui added this to the v0.7 milestone Jun 27, 2018

@yihui

This comment has been minimized.

Member

yihui commented Jun 27, 2018

Yes, and done. You may use shortcodes() now, e.g.,

blogdown::shortcodes('tweet', my_satrday_tweets$status_id)
@maelle

This comment has been minimized.

maelle commented Jun 27, 2018

Wow that was fast, thanks a lot @yihui!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment