Overview

When writing a piece of content, there are times when you would want a specific text to be repeated over and over again. You can simply copy/paste such content. However, if you choose to edit this shared text later, you will need to update all the posts that contain this shared text. Not very efficient... right?

For ex. let's assume you have created some content with affiliate links along with appropriate text based on your context:

- fragments
  - software-affiliate-links
  - hardware-affiliate-links
  - mobile-affiliate-links

You can use the fragment widget {{< fragment path="fragments/software-affiliate-links" />}} wherever you like in your content. This fragment of text will be inserted in place during publish. Later, if you need to change the text, you can centrally edit the text in fragments/software-affiliate-links and republish your website.

Create New Fragment

Select Project > Host > Page > Listing Pane > Fragments and click Create New Fragment.

  • Provide a name for the Fragment and click Create.
  • Add the content in the text editor to the right.
  • Save the file and you are ready to use your fragments in any post or page using the fragment widget.