Generate anchor name for top- and second-level titles
Right now my KB entries are scattered with manually-created anchor tags I've added because I needed to link someone to a specific section of a doc. GitHub's markdown processor generates anchor names for high-level titles. I'd love to have that. If I did (and didn't need to manually add each one), I'd use anchor names in many more of my links so users got to the exact right place.
Thanks,
Troy
Discussions are closed to public comments.
If you need help with Tender please
start a new discussion.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

1 Posted by Julien on 18 Apr, 2013 12:24 AM
Hey Troy,
I'll look into it.
2 Posted by Julien on 24 Apr, 2013 05:06 PM
Hi Troy,
I deployed this change yesterday. All headings should get an automatically generated anchor now (toc_N). It requires resaving all your KBs though (HTML is cached), so take a look, and it that suits you, I'll go ahead and resave them all for you.
3 Posted by Troy on 24 Apr, 2013 06:12 PM
Hi Julien,
First off, thanks for doing this. It's really cool to see something happen so quickly.
So.. I hate to be that guy, but I silently assumed that you'd look at GitHub's implementation and retain the good parts of it. There's two things that make Tender's way less useful than GitHub's:
You've probably seen how GitHub's works, but if not, hit https://github.com/papertrail/remote_syslog and scroll down to one of the title sections in the readme, then mouseover it.
Thanks, and sorry to be the bearer of bad news. I'd say as-is it's actually worth pulling out and leaving until the changes above are possible. I know it sucks, but that's what it takes to have the minimum useful feature here. Thanks for asking, too.
Troy
4 Posted by Julien on 24 Apr, 2013 06:18 PM
Hey Troy,
No worries, your concerns are legitimate. For the first part I just went the easy route and simply enabled an option in our library, which gives the
#toc_X. The rest of the features are cool but require actual code, so I'll work on it, just not sure when. In any case I'll keep you posted when I have something new.Cheers!
5 Posted by Troy on 24 Apr, 2013 06:36 PM
Gotcha. Do they reorder if a new header is added? If so, I think that's actually far, far worse than not having it at all. If I link someone to something (or it's indexed - Google grabs the line after anchor names and displays them as section links in search results), it needs to stay stable above all else.
Thanks,
Troy
Support Staff 6 Posted by Courtenay on 26 Apr, 2013 12:52 AM
We have a fix for this, just nailing down some css changes and QAing it. It will work the way you'd expect and have hover links and so on. It may take a few days to get to production.
7 Posted by Troy on 26 Apr, 2013 04:07 AM
That's great news, Courtenay. Nice work.
Troy
8 Posted by Julien on 29 Apr, 2013 05:54 PM
Hi Troy,
This is deployed. I have re-generated all your KB articles.
Let me know how it goes.
9 Posted by Troy on 29 Apr, 2013 06:26 PM
Oh, man, this is gorgeous. You made my day. Beautiful work. Thank you and thanks to Courtenay.
I have one tiny suggestion: downcase the whole thing. I very rarely see people use caps-aware anchor names, and with ones that are dynamically generated, that might be safer.
Cheers,
Troy
10 Posted by Troy on 29 Apr, 2013 06:29 PM
No exaggeration, I just told someone to go to a URL and "scroll down to
Section" earlier today. You prevented all future cases of our users having to do that and me having to say that (and there's been hundreds of both). Thanks again.Troy
11 Posted by Julien on 29 Apr, 2013 10:19 PM
Hi Troy,
Should be all good now (lowercase).
Cheers!
12 Posted by Troy on 01 May, 2013 08:16 PM
This is working absolutely beautifully. No exaggeration, I've used it in 6 or 7 chat replies today alone.
Troy
13 Posted by Julien on 02 May, 2013 05:04 PM
Hey Troy,
Glad you like it, and thanks for bringing it up.
Cheers!
Julien closed this discussion on 02 May, 2013 05:04 PM.
Troy re-opened this discussion on 31 Mar, 2014 05:41 PM
14 Posted by Troy on 31 Mar, 2014 05:41 PM
Hey Julien, this is still working great. I ran across an unusual case that I thought you might want to know about, though I doubt it's change-able, and it might not even be worth changing. Namely, punctuation in slugs is encoded with the punctuation ASCII code instead of being stripped. Here's an example:
Title:
Can searches refine which senders' logs are shown (without creating a new group)?Slug:
can-searches-refine-which-senders-39-logs-are-shown-without-creating-a-new-group-Anyway, no action needed, just passing it along. Have a great week,
Troy
15 Posted by Julien on 31 Mar, 2014 06:46 PM
Hey Troy,
Thanks for the notice. I looked it up and what happens is the quote gets escaped by the markdown lib to
', and since we remove all "non word characters", the 39 sticks.We could probably fix it, but it is indeed a minor inconvenience, so I will leave it as is for the time being.
Cheers!
Courtenay closed this discussion on 31 Mar, 2014 06:48 PM.