Internal Link Shortcuts

Today I was looking for a way to link to a post in the same topic.

The :link: icon, when clicked, shows post #4, so I tried: using #4 and post#4, only to get frustrated, but discovering that the # character pops up categories to link (which I read about extensively since, in meta.)

Now, I find this quite inconsistent, and would like to propose ways to consistently address internal links that matches the actual URL format, or already used patternsโ€ฆ

Generic Patterns

Using colon as a prefix or separator would be nice, but it already autocompletes to emoticons and that could become messy. But consider: :4, :10:4, and 3:10:4 (with optional colon prefix) to link to post number 4 in the current topic, post number 4 in topic 10, and post number 4 in topic 10 of category 3.

Using / instead might work, but then it should match the URL, e.g., /c/3, /t/10, and /t/10/4.

The โ€œquote replyโ€ to a post uses keyword colon number, e.g., post:4 or topic:123. This can be very useful is thereโ€™s a way to show these IDs with every post (e.g., with an element title or tooltip).

In general though, #post_4 would use the actual anchor in the HTML. #4 would be great too, but it conflicts with the (current) category shortcut (BTW, what happens when you have a category name matching a tag name?)

Both solutions though are problematic for i10n since they impose English words.

The shortcut to a post in the current topic should make category and topic implicit.

Since topic IDs are global, .. can be useful, as in .[optional topic ID].[post number], e.g.:

  • ..4 to link to post #4 in current topic
  • .10.4 to link to post #4 in topic 10
1๊ฐœ์˜ ์ข‹์•„์š”

Use the URL to the post. You can also edit the URL to make it refer to a specific post number in the topic as needed.

1๊ฐœ์˜ ์ข‹์•„์š”

But that requires using the mouse instead of the keyboard, doesnโ€™t it?

1๊ฐœ์˜ ์ข‹์•„์š”

You can use j and k to navigate through the posts and the URL changes accordingly, so you can ^L^C to copy the URL of the current post.

Except itโ€™s off by one:

https://meta.discourse.org/t/url-off-by-one-when-moving-through-posts-with-keyboard/50925

4๊ฐœ์˜ ์ข‹์•„์š”

์ƒ๋Œ€ URL(์˜ˆ: /t/50904)์„ ์‚ฌ์šฉํ•˜์—ฌ https://meta.discourse.org/t/50904 ๋Œ€์‹  ์ฐธ์กฐํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ๋‚˜์š”?

์ „์ฒด URL์„ ๊ทธ๋Œ€๋กœ ๋ถ™์—ฌ๋„ฃ์–ด ํ…Œ์ŠคํŠธํ•ด ๋ณด๊ธฐ: Internal Link Shortcuts - #4 by pfaffman

(๊ฐ™์€ ์„œ๋ฒ„ ๋‚ด ๋งํฌ๋ฅผ ์ฐธ์กฐํ•˜๊ธฐ ์œ„ํ•ด ์ „์ฒด URL์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฐœ๋…์„ ์ดํ•ดํ•˜๋ ค๊ณ  ์• ์“ฐ๊ณ  ์žˆ๋Š”๋ฐ, ํ”„๋กœํ† ์ฝœ์ด๋‚˜ ํ˜ธ์ŠคํŠธ๋ช…์ด ๋ณ€๊ฒฝ๋˜์–ด ๋งํฌ๊ฐ€ ์˜ค๋ž˜๋œ ์ƒํƒœ๋กœ ๋‚จ์„ ์œ„ํ—˜์ด ์žˆ๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹คโ€ฆ ์ œ ๊ฒฝ์šฐ์—” ๋ฐฉํ™”๋ฒฝ ๋’ค์—์„œ http:๋กœ ์‹คํ–‰ ์ค‘์ธ Discourse ์ธ์Šคํ„ด์Šค๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์œผ๋ฉฐ ์•„์ง TLS๋กœ ์ด์ฃผ๋ฅผ ์™„๋ฃŒํ•˜์ง€ ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ http: ๋‚ด๋ถ€ ๋งํฌ๊ฐ€ ๋งŽ์ด ์กด์žฌํ•œ๋‹ค๋ฉด, URL์ด https:๋กœ ๋ณ€๊ฒฝ๋  ๋•Œ ๋งํฌ๊ฐ€ ๊นจ์ง€๋Š” ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธฐ๋Š” ๊ฑด๊ฐ€์š”?)

ํ‘œ์ค€ HTML์ด ์ž‘๋™ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค

<a href="/t/internal-link-shortcuts/50904/6">Link</a>๋Š” Link๋กœ ๋ณ€ํ™˜๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

Markdown๋„ ์ž‘๋™ํ•ด์•ผ ํ•˜๋ฉฐ,

[Link](/t/internal-link-shortcuts/50904/6)๋Š” Link๋กœ ๋ณ€ํ™˜๋ฉ๋‹ˆ๋‹ค.

4๊ฐœ์˜ ์ข‹์•„์š”

๋ชจ๋“  ์‚ฌ์šฉ์ž๊ฐ€ ๋งค๋ฒˆ ์ฆ‰๊ฐ์ ์ธ ์ด๋“๋„ ์—†์ด URL์„ ๋‹ค์‹œ ์ž‘์„ฑํ•  ๊ฒƒ์ด๋ผ๊ณ  ์ƒ๊ฐํ•˜์ง€ ์•Š๋Š” ํ•œ, ํ”„๋กœํ† ์ฝœ์„ ๋ณ€๊ฒฝํ•  ๋•Œ ์–ด์จŒ๋“  ๋ฆฌ๋งตํ•‘์„ ์ˆ˜ํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋ฌผ๋ก  URL์„ ์ž‘์„ฑํ•  ๋•Œ ๊ทธ๋ ‡๊ฒŒ ํ•  ์˜์‚ฌ๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ์ง€๋งŒ, ๋Œ€๋ถ€๋ถ„์˜ ์‚ฌ๋žŒ์€ ๊ทธ๋ ‡์ง€ ์•Š์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค. http://yourdomain/๋ฅผ https://yourdomain์œผ๋กœ ๋ฆฌ๋งตํ•‘ํ•˜๋Š” ๊ฒƒ์€ ๊ทธ๋ ‡๊ฒŒ ํฐ ๋ฌธ์ œ๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค.

์ด๊ฒƒ์€ ์šฐ๋ฆฌ๊ฐ€ ์ปดํ“จํ„ฐ ์ „๋ฌธ๊ฐ€๋“ค์ด ๊ฑฑ์ •ํ•˜๋Š” ๊ฒƒ ์ค‘ ์‹ค์ œ๋กœ๋Š” ์ฐจ์ด๋ฅผ ๋งŒ๋“ค์ง€ ์•Š๋Š” ์œ ํ˜•์˜ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. ์ •๋ง, ์ •๋ง ์–ด๋ ต์ง€๋งŒ, ์ด ๋ฌธ์ œ๋ฅผ ๋†“์•„์ค˜์•ผ ํ•ฉ๋‹ˆ๋‹ค. :wink:

2๊ฐœ์˜ ์ข‹์•„์š”

/t/50904/6์œผ๋กœ ์‹œ๋„ํ•ด ๋ด…๋‹ˆ๋‹คโ€ฆ

6๋ฒˆ์งธ ๊ฒŒ์‹œ๊ธ€ ๋งํฌ

์„ฑ๊ณต! ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค

4๊ฐœ์˜ ์ข‹์•„์š”