Is there a way to have a text file stored somewhere in hugo directory that can be inserted to posts?

I have a paragraph that I would like to insert in some of my blog posts. Instead of duplicating it in all blog posts, how can this be done? should it be placed in a partial or shortcode?

  1. Partial - will need a front matter param on every page you want the paragraph to appear. Then call the partial conditionally on single.html
  2. Shortcode - just as simple as inserting it wherever you want in your markdown file.

Personally, I would go the shortcode route.


thank you!

Can you please move your post to the proper section @koloa_street ?
(Your post does not belongs to “Tips & tricks”)

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.