Jump to content

How to add an anchor link in markdown block?

Recommended Posts

Hey.

How to add an anchor link in markdown block?

I have a code with sup tags and cant figure out whether it's possible to have a anchor link.

<p><span style="color: #282828; letter-spacing: 0.02em; font-size: 26px; font-weight: 400;"> Write <sup style="font-size: 10px; line-height:0; vertical-align: 10px;">10</sup>

 

 

Link to comment
  • 1 month later...

Can I add an anchor link inside a markdown block for an FAQ accordion page, so that when I click on a button on the home page of my site (I linked the button to /faq-1/#adaptogens) , it opens the FAQ accordion page with a specific question/answer already expanded in the accordion?

Here is the markdown block for the question that i want to automatically expand when someone clicks on the home page button and goes to the FAQ page.  According to your instructions above, I need to add <a href="#adaptogens"> </a> but I can't figure out where to put it in the markdown block below.

<p> </p>
### How do adaptogens work?
> ## Adaptogens are plants that help the body resist stressors of all kinds, whether physical, chemical, or biological. 

Thanks!

Link to comment
On 9/15/2020 at 2:21 PM, kyding said:

Can I add an anchor link inside a markdown block for an FAQ accordion page, so that when I click on a button on the home page of my site (I linked the button to /faq-1/#adaptogens) , it opens the FAQ accordion page with a specific question/answer already expanded in the accordion?

Here is the markdown block for the question that i want to automatically expand when someone clicks on the home page button and goes to the FAQ page.  According to your instructions above, I need to add <a href="#adaptogens"> </a> but I can't figure out where to put it in the markdown block below.


<p> </p>
### How do adaptogens work?
> ## Adaptogens are plants that help the body resist stressors of all kinds, whether physical, chemical, or biological. 

Thanks!

Have you found the solution yet?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
48 minutes ago, tuanphan said:

Have you found the solution yet?

Not yet 🙂  For now, I just moved that FAQ up to the top position in my FAQ list so at least users will more easily see it when they click on the home page button and get to that page.

Link to comment
  • 5 months later...
On 9/15/2020 at 8:21 AM, kyding said:

Can I add an anchor link inside a markdown block for an FAQ accordion page, so that when I click on a button on the home page of my site (I linked the button to /faq-1/#adaptogens) , it opens the FAQ accordion page with a specific question/answer already expanded in the accordion?

Here is the markdown block for the question that i want to automatically expand when someone clicks on the home page button and goes to the FAQ page.  According to your instructions above, I need to add <a href="#adaptogens"> </a> but I can't figure out where to put it in the markdown block below.


<p> </p>
### How do adaptogens work?
> ## Adaptogens are plants that help the body resist stressors of all kinds, whether physical, chemical, or biological. 

Thanks!

I'm looking to do exactly this and would love to do it from various points on my website... Can't find any information that's Squarespace specific. Anyone got ideas?

Link to comment
  • 5 months later...
  • 1 month later...

Following this post. I can not for the life of me figure out how to anchor link within a markdown sequence. I have tried creating multiple sections but the text runs together and creates one large markdown instead my intended multiple. I can not retrieve block IDs when the markdown sequence does this. 

Link to comment
On 10/6/2021 at 2:16 AM, torilistoe said:

Following this post. I can not for the life of me figure out how to anchor link within a markdown sequence. I have tried creating multiple sections but the text runs together and creates one large markdown instead my intended multiple. I can not retrieve block IDs when the markdown sequence does this. 

Can you share link to page where you added? We can take a look

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

@torilistoe

What happens if you use the build-in markdown editor link to add?

1928757390_ScreenShot2021-10-12at7_23_54PM.png.ae1177bb4a8c03770ccdd8afb44c31a1.png

Highlight your text then click the link icon. I generally don't use the style that SS uses. I much prefer the inline link which goes like the following.

[def](http://www.tomsWeb.consulting/).

As to blocks combining. That is a feature of SS. Text blocks and apparently markdown blocks exhibit this feature. There are some tricks you can use to stop the combining. Use line blocks between the blocks you don't want to combine. Then you can hide them with CSS or delete them after you've got everything just so. If you delete them there is a chance they will combine down the road if you edit the markdown blocks.

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
12 hours ago, creedon said:

@torilistoe

What happens if you use the build-in markdown editor link to add?

1928757390_ScreenShot2021-10-12at7_23_54PM.png.ae1177bb4a8c03770ccdd8afb44c31a1.png

Highlight your text then click the link icon. I generally don't use the style that SS uses. I much prefer the inline link which goes like the following.

[def](http://www.tomsWeb.consulting/).

As to blocks combining. That is a feature of SS. Text blocks and apparently markdown blocks exhibit this feature. There are some tricks you can use to stop the combining. Use line blocks between the blocks you don't want to combine. Then you can hide them with CSS or delete them after you've got everything just so. If you delete them there is a chance they will combine down the road if you edit the markdown blocks.

Let us know how it goes.

@creedon 

This is what we are looking at (see attachment below). The goal is to get the "learn more" buttons you see under my images and descriptions to directly take you to a specific area (anchor link) within the investment page (see second attachment). The buttons are only allowing me to send clients to the entire page (/investment-and-pricing/) link.

1841795005_ScreenShot2021-10-13at10_02_30AM.thumb.png.02cf9c5bd7ea0ef9a62ca4888daf215d.png

The markdown area only has one block ID. This is SS (as you expressed in your message). 

1834119425_ScreenShot2021-10-13at10_09_05AM.thumb.png.2ada1148f5ad695b4eb009b1309acbdf.png

Link to comment

@torilistoe

Ah. I see.

The link editor doesn't know about  URL fragments so you have to enter the fragment manually.

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
On 10/13/2021 at 1:52 PM, creedon said:

@torilistoe

Ah. I see.

The link editor doesn't know about  URL fragments so you have to enter the fragment manually.

 

Let us know how it goes.

Ah I see.

When I add the fragment manually, I am brought to the same page (investment and pricing), but the specific tab does not open that I enter. Am I missing something else? Do I need to type something in the markdown too that let's SS know I want a particular part of the block opened?

Link to comment

@torilistoe

URL fragments will not open accordion tabs. URL fragments will only take you to a particular place in a page.

With some Javascript you can open tabs. Please see the following.

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.