I am in Netlify adding a call to action button.
But there is no way in the markdown to add something that calls a telephone number like :
1-847-555-5555
IF I add 1-847-555-5555
to the markdown it doesnt build with netlify
I have located the call to action JS which is SectionCta.js and there is a line there:
<Link key={action_idx} to={safePrefix(_.get(action, 'url'))} className="button white large">{_.get(action, 'label')}</Link>
Which seems to do this job of a button. But no clue how to add a telephone number there.
Gastby shows the index.md, and there is no way that it works even if I add the html tags in there
Gatsby + Netlify
gatsby-config.js: N/A
package.json: N/A
gatsby-node.js: N/A
gatsby-browser.js: N/A
gatsby-ssr.js: N/A
No need to use a , you can cover that with a normal anchor tag:
<a href="tel:+18475555555">{_.get(action, 'label')}</a>
Thank you for opening this!
We're marking this issue as answered and closing it for now but please feel free to comment here if you would like to continue this discussion. We also recommend heading over to our communities if you have questions that are not bug reports or feature requests. We hope we managed to help and thank you for using Gatsby!
No need to use a , you can cover that with a normal anchor tag:
<a href="tel:+18475555555">{_.get(action, 'label')}</a>
Thankyou,
But where do I code this in ?, in the markdown md file in NETLIFY as CONTENT section?
Or add it somehow in the SectionCta.js, in the Gatsby framework, which is the GITHUB code that I am using for Netlify?
THanks
Ok,
finally I added HTML directly into the SectionCta.js and it works.
{_.get(this.props, 'section.actions') &&
<div className="cell block-buttons">
<a href="tel:5551234567">Call (555)123-4567</a>
{_.map(_.get(this.props, 'section.actions'), (action, action_idx) => (
<Link key={action_idx} to={safePrefix(_.get(action, 'url'))} className="button white large">{_.get(action, 'label')}</Link>
))}
Most helpful comment
No need to use a , you can cover that with a normal anchor tag: