Can I reference variables within my page markdown files?

Let’s say I have my company name/phone # stored in my config file:


company_name: XYZ Builders
contact_phone_no: (123) 456-7890

Is there a way of accessing this within my markdown? I know this isn’t twig, but how can I get something like this to work:

Welcome to the home page of {{ company_name }}!  
If you have any questions, please contact us at: {{ contact_phone_no }}.

Also, bonus points if there is a better place to put this other than in side of my custom theme’s config file (ie user/config/site.yaml or somewhere else).

As you suggest, site.yaml would be the better place as this is site-specific information, not theme-specific. Further, you can render Twig in Markdown with:

title: Home
  twig: true

And then render it with {{ site.company_name }}.

1 Like

Exactly what I was looking for. Thank you.