create account

How to place relative links in steemit posts (markdown)? by breadcentric

View this thread on: hive.blogpeakd.comecency.com
· @breadcentric · (edited)
How to place relative links in steemit posts (markdown)?
I would like to be able to refer to a specific section in my post so that others can simply click and go there (in my case - different language version).

Going through the web I found a suggestion that I should simply use headers and refer to them like so:
```
# A header
[A link](#a-header)
```
Note that as I am writing this, the only way to verify is to use the preview and I am sure preview may differ from final outcome.
Anyway, in the preview headers do not have anchors generated and the link points to ```https://#a-header```.

Then I thought about using the good old html and:
```
<a name="anchor-name"></a>
<a href="#anchor-name">HTML link</a>
```
Unfortunately while the href gets created as desired, the name parameter gets dropped. If you have an idea on what could work, please comment. In the meantime, below section is a playground to test these approaches

UPDATE: the solutions below don't work as I cannot place a named anchor in my post.

<a href="#anchor-name">HTML link to anchor</a>
<a href="#a-header">HTML link to header</a>
[markdown link to anchor](#anchor-name)
[markdown link to header](#a-header)

Long text to scroll.
Did you know that 
while you can have 
a quick bread, 
extending the 
preparation time 
will improve 
the flavour?
I ran 3K today and 
had 90 minutes fun 
at the swimming pool 
with the kids.
Yesterday I ran 5K.
This is to compensate 
no stair walk during 
the remote work period.
Normally I do the stair walk 
at work. We started counting 
each others times. It's ground 
floor to floor 14. I count my 
times in two categories:
-stepping on every step
-running as absolutely 
fast as possible.
For every step, my PB is 1m 52s
For every step it's 1m 32s
I don't count the 20 minutes 
dying period after the 
attempts for either.
OK, I think this should be enough. 
You don't need to read it after the links, 
I will copy and paste it so that the 
anchors don't land at the bottom of the page.

<a name="anchor-name"></a> *Named anchor*
# A Header
Long text to scroll.
Did you know that 
while you can have 
a quick bread, 
extending the 
preparation time 
will improve 
the flavour?
I ran 3K today and 
had 90 minutes fun 
at the swimming pool 
with the kids.
Yesterday I ran 5K.
This is to compensate 
no stair walk during 
the remote work period.
Normally I do the stair walk 
at work. We started counting 
each others times. It's ground 
floor to floor 14. I count my 
times in two categories:
-stepping on every step
-running as absolutely 
fast as possible.
I purposefully placed this text 
here to check if anyone verifies 
declarations of the two 
paragraphs being identical. 
If you do, this was pointless 
and useless, but I'm 
impressed anyway.
For every step, my PB is 1m 52s
For every step it's 1m 32s
I don't count the 20 minutes 
dying period after the 
attempts for either.
OK, I think this should be enough. 
You don't need to read it after the links, 
I will copy and paste it so that the 
anchors don't land at the bottom of the page.
👍  , ,
properties (23)
authorbreadcentric
permlinkhow-to-place-relative-links-in-steemit-posts-markdown
categorysteemit
json_metadata{"tags":["steemit","question","markdown","syntax"],"links":["#anchor-name","#a-header"],"app":"steemit/0.1","format":"markdown"}
created2017-07-28 22:32:06
last_update2017-07-28 22:34:48
depth0
children2
last_payout2017-08-04 22:32:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,002
author_reputation7,152,685,598,819
root_title"How to place relative links in steemit posts (markdown)?"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id10,064,093
net_rshares1,120,083,821
author_curate_reward""
vote details (3)
@joshpeterson ·
I have the same problem, and I'm going to write a post about it. It really bums me out that this feature appears to be broken right now.
properties (22)
authorjoshpeterson
permlinkre-breadcentric-how-to-place-relative-links-in-steemit-posts-markdown-20170828t164220514z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-08-28 16:42:21
last_update2017-08-28 16:42:21
depth1
children0
last_payout2017-09-04 16:42:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length136
author_reputation5,435,037,327,964
root_title"How to place relative links in steemit posts (markdown)?"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id13,141,763
net_rshares0
@tachmatoukung ·
properties (23)
authortachmatoukung
permlinkre-breadcentric-how-to-place-relative-links-in-steemit-posts-markdown-20170806t214521678z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-08-06 21:44:57
last_update2017-08-06 21:44:57
depth1
children0
last_payout2017-08-13 21:44:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length27
author_reputation1,224,118,683
root_title"How to place relative links in steemit posts (markdown)?"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id10,991,186
net_rshares-25,756,865,466
author_curate_reward""
vote details (9)