Accesing dynamic values inside content

I have some content pages that uses dynamic values(or variables).
So where should I define these variables and How to put these in my content page?
Also, my js file is using these variables so any way to do this?

Shortcode.

You currently would have to inline the JS in your layout file.

Will this be right to create 12-15 shortcodes to store 12-15 variables if I have?

That sounds like bad design. In content pages (aka Markdown files) shortcodes are used for things like render media content like videos etc. I’m not sure what you need, but you can pass the name of the variables as an argument to the shortcode.

No, I just want to say that
I have a content page like plan.md in which I want to put a variable(plan_type = “Premium”)
and on other page I want put a variable(monthly_price = $99)
How can I do this?

OK, my guess is you want to put kind of a price list – then build that HTML table with variables and all using a shortcode. You CAN have a shortcode outputting just one simple value, but that is not what it was built for.

No no no

Can I access config.toml variables inside content?

Only via shortcodes … Please read The doc.

The scenario is that
inside content/trial/index.md

<h1>
  Start your 28 day free trial
</h1>
.......

similar in content/trial/finish.md

Ended your free trial of 28 days. 
blah blah blah

Now I want to store trial days value into a variable and want to access in these pages. So in future if I extend trail day value then I won’t find all the pages that use “28 days”.
I will change only variable value.

So a shortcode or two would do job.

But the problem is still there, I have some more variables and it will be bad thing to create shortcodes for each variable.

Then send the variable name into your ONE shortcode as an argument.

I’m not getting understand.
Could you please give me example code of shortcode for this?

Sorry, you will have to read the documentation and understand it, then do the programming yourself. I spend enough time on this forum as it is.

Okay @bep thanks for your support.