What is the best way to add FAQ Schema?

This is an example of how I am going to do it following the information you have given me above:

Paste this FAQ schema code shown below in the post code injection part (the main code injection of Ghost should not be used for this, is that right?):

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": {
    "@type": "Question",
    "name": "What is your favorite color?",
    "acceptedAnswer": {
      "@type": "Answer",
      "text": "My favorite color is purple."
    }
  }
}
</script>

Now if I create the following Question and Answer below anywhere for this post, it will have a rich results schema for Google search results. Is that right?

What is your favorite color?
My favorite color is purple.

Have I done it right now, or am I missing something?