social_link: Specify the components of a social link

View source: R/block_social_links.R

social_linkR Documentation

Specify the components of a social link


The social_link() function is used exclusively within block_social_links() with as many calls as the number of social sharing icons/links required. By providing a supported service name, a hosted icon image can be used. A link must be provided; it will be part of social sharing icon. All icons are rounded, transparent, and consist of a single color, or level of gray.


social_link(service, link, variant = NULL, alt = NULL)



Either the name of a social sharing service or either of website, email, or rss.


The relevant link to content on the service.


The variant of the icon to use. Options include bw (black and white, the default), color, dark_gray, gray, and light_gray.


Text description of image passed to the alt attribute inside of the image (⁠<img>⁠) tag for use when image loading is disabled and on screen readers. If not supplied, then the name of the service will be used as alt text.


The following social sharing services have hosted icons available:

  • Twitter - Micro-blogging internet service.

  • GitHub - Web-based hosting service for software development projects using Git.

  • Facebook - Global online social networking service.

  • Instagram - Online photo-sharing and social networking service.

  • LinkedIn - Social networking service for people in professional occupations.

  • YouTube - Video-sharing service owned by Google.

  • Vimeo - An ad-free open video platform.

  • Behance - A site for self-promotion of design projects.

  • Dribbble - Online community for showcasing user-made artwork.

  • Pinterest - Photo-sharing and publishing website for discovering interesting things.

  • 500px - Online platform for photographers to gain global exposure.

  • Yelp - Local-search service powered by crowd-sourced reviews.

  • TripAdvisor - Travel and restaurant website with reviews and accommodation bookings.

  • WordPress - Blogging platform and content management system.

  • Blogger - A blog-publishing service hosted by Google.

  • Tumblr - Micro-blogging and social networking website.

  • Deezer - Web-based music streaming service.

  • SoundCloud - A music sharing website and publishing tool for music distribution.

  • Meetup - A service used to organize online groups that host in-person events.

  • Etsy - An e-commerce website focused on handmade or vintage items and supplies.

  • Reddit - A social news aggregation, web content rating, and discussion website.

  • Stack Overflow - Question and answer site for professional and enthusiast programmers.

  • Youku - A video hosting service for user-made and professionally produced videos.

  • Sina Weibo - Micro-blogging website and one of the biggest social media platforms in China.

  • QQ - Instant messaging software service developed by Tencent.

  • Douban - A Chinese social networking service with a reputation for high-quality content.


# Create an email message with some
# articles in the `body`; in the footer,
# add some social sharing icons linking
# to web content
email <-
    body =
        block_title("Exciting Travel Destinations"),
            image = "",
            title = "Hong Kong",
            content =
              "Once home to fishermen and farmers,
              modern Hong Kong is a teeming,
              commercially-vibrant metropolis where
              Chinese and Western influences fuse."
            image = "",
            title = "Australia",
            content =
              "Australia ranks as one of the best
              places to live in the world by all
              indices of income, human development,
              healthcare, and civil rights."
    footer =
        block_text("Thanks for reading! Find us here:"),
            service = "pinterest",
            link = "",
            variant = "color"
            service = "tripadvisor",
            link = "",
            variant = "color"

if (interactive()) email

blastula documentation built on Sept. 24, 2023, 1:07 a.m.