Kontent.ai
Copyright © 2023 Kontent.ai. All rights reserved.
  • Web
  • Privacy policy
  • Cookies policy
  • Consent settings
  • Security
  • GDPR
  • Documentation
  • API reference
  • Product updates
Kontent.ai Learn
  • Plan
  • Set up
  • Model
  • Develop
  • Create

Insert social media posts into articles

Is this page helpful?
Complete and continue
  • Sign in
  • Martina Farkasova
    5 minutes
    Components
    To embed content like social media posts into your articles, you define the structure of the embedded content and then insert components based on that structure into your articles.See how it all works on the example of social media posts like tweets inside articles.

    Create a content type for posts

    The first step is to create a content type that will define the basic elements of the social media posts. Generally, the one element all social media posts have in common is the URL. Use a text element for posts’ URLs. Set it as required and add validation rules to prevent common mistakes that might break your app, like leaving out https://.

    Define display options

    Besides URLs, you can add network-specific elements that would give your content creators some control over the rendering of the embedded content. To pick the most common examples:
    • Dark or light color theme?
    • Display or hide replies to the post?
    • Include media from the post, like video or image?
    For these options, use mutliple choice elements. Here’s an example of a content type for tweets with options to select a color theme and show or hide replies to the linked post:
    We also suggest you divide the URL text element and the control elements into separate groups to make your content type clearly arranged.

    Embed posts into articles

    Once you have the content type ready, you can start enriching the content by embedding social media posts. You will most likely want to embed the posts into rich text:
    1. In Content & assets, open an article for editing.
    2. Place the cursor into a rich text element where you want to add a post.
    3. In the editor toolbar, click Insert... and then Insert new component.
    4. Select the content type for social media posts.
    5. Fill in the elements. 
    Here’s an example of how you can display a tweet inserted into an article on your website:
    What's next?
    Insert code samples into articles
    To embed code samples into your articles, you define the structure of the embedded content and then insert components based on that structure into your articles.
    • Overview
    • Intro to content modeling
    • Creator’s role in content modeling
    • Before you model content
    • Create your first content model
    • Master content modeling
    • Master modular content
    • Master taxonomies
    • Master metadata
    • Get inspiration from others
    • Maintain your model
    • Content modeling checklist
    Content type for X (Twitter) posts
    A Tweet component in a rich text editor
    Tweet inserted into an article
    • “Missing” CMS features
    • Content formatting
    • Curated content
    • Link authors to articles
    • Forms
    • Streamline information
    • Displaying locations
    • Social media posts in articles
    • Code samples in articles
    • Bulk publishing with taxonomies
    • App configuration
    From single-use to re-useIf you later find another use for the content in your component, you can always convert it to a content item by clicking Reuse as content item. This conversion cannot be undone. If done by accident, archive the new item and create your component again.
  • Create a content type for posts
  • Embed posts into articles