Can Featherwiki Do Inline Table of Contents Based on Headers? #114
I gather that this is a sticking point with Tiddlywiki - that people who choose to include long document-length entries rather than short "tiddlers" have been asking for a way to easily generate "tables of contents" for a page so that at the top of a lengthy page people can easily click to sections of the documents according to header.
Here's an example of such a discussion - there seem to be many more with a lot of detail discussing how TIddlwiki is oriented to small tiddlys rather than longer documents. I spent a lot of time looking at this yesterday but of course now I can't find the links.
This is something that I would like to do in Featherwiki, and maybe it's obvious how to do this but it is something I am just starting to explore. If an extension to do this would be reasonably doable this might turn out to be something significant that Featherwiki could offer that Tiddlywiki doesn't.
Sorry for what is likely a stupid question but I am incredibily impressed with your program and am still brainstorming uses for it.
I particularly appreciate your links showing how people have customized the look and feel and I hope to see many more of those.
PS - And maybe this needs a separate post -- I would really like there to be a way to implement one of the Markdown transoders that allows footnotes - which goes along with my desire to use Featherwiki for documentation and somewhat lengthy documents.
Hey @freecicero, this isn't a stupid question at all, and I'm actually a little surprised I didn't think of it myself! An auto-generated table of contents is absolutely something that's doable within Feather Wiki with an extension. As with other rendering extensions, there will likely be a little bit of jitter before the table is rendered, but I could definitely whip up something without too much trouble.
Regarding the Markdown footnotes, that would definitely be a separate extension. I'm not completely sure but I think writing that into the default Markdown parser might inflate it too much for a very small user base. But an extension should be very doable. If you don't mind creating a second ticket for Markdown footnotes, I'd appreciate it!
Edit: re-reading your message, I noticed I missed that you asked if it was possible to use a different Markdown parser with footnotes already capable! If you have a parser in mind, it's definitely doable, but it takes a little bit of code work. See Marked.js replacement for one way to do it.
Thanks for your comments! A little jitter is well worth the capabilities you're already providing.
I will definitely set up a separate request for the footnote capability.
I am afraid I am not enough of a coder (not at all, actually) to be able to know the difference between the parsers. All I really know is that I am working on a project where I wanted to set up a wiki with documents of significant size to them, and I need footnote/endnote capability to deal with issues in the texts. I was pleased to see that the current tiddlywiki supports footnotes, but I haven't look to see what parser or engine they use. The add-in parser you already suggest seems very proficient and I gather they may be working to support footnotes themselves, but aren't there yet.
Again thank you for your great work on the software!
I hope this is not confusing to add to this conversation, but I now realize a related question after further experimentation:
As a work-around or just for other organization of a wiki page beyond a table of contents, I have been looking for a way (using HTML presumably) to add an anchor such as:
<h3 id="BookTwo">BOOK TWO .....
which I'd like to reference on another part of a page with code like:
<h4><a href="#BookTwo">Book 2</a>
If this were working (and it sort of does as I will elaborate below) then I could manually set up a table of contents.
The problem I am running into is that while this format for linking within a page does create a clickable link, when I click the link the entire page reloads. The reloaded page opens to the correct point on the page after it reloads, but the browser no longer recognizes the link history and it's not possible to go "back" to the point of origin by clicking the left arrow or using any normal "back" functions.
Am I missing something or might there be a way around this?
Both of my questions here are probably stemming from my effort to use Featherwiki to host relatively lengthy documents, and my desire to be able to navigate around a single page rather than using a number of smaller pages linked using the
[[ ]]syntax. I definitely want to use the
[[ syntax ]] to have a wiki of several pages, but many of those pages will have a lot of text, and that might not be your intended use case for the program -- so if this problem is unavoidable I'll understand, but maybe there is a way to do this I am missing since my HTML skills are relatively minimal.
Thanks very much!
Hi @freecicero, I'm so sorry for the long delay in getting back to you on this question! The way you were doing it was definitely on the right track, but Feather Wiki forces any non-internal links to load in a new tab by default!
It looks like I forgot to update the documentation to explain it, but one of the features I added to Feather Wiki recently is the ability to jump to a particular anchor point (i.e. the id in your h3) on a page with an internal link! Write the link as you normally would, then use
#BookTwo at the end. For example
[[Current Page Title#BookTwo]] if you didn't change the slug or
[[Some linked text|current_page_slug#BookTwo]] if you want text other than the page title.
As for the table of contents extension, I really dropped the ball, because I pretty much finished it a while ago and never added it to the website! I'll be sure to get it online and available when I upload the new version over the weekend and let you know when you can use it.
Thank you very much! Sounds like an exciting weekend for Featherwiki fans so I can't wait to see the new update!
Hey @freecicero, the Auto Table of Contents extension is now available! Check out this page and let me know if you need any help with it: https://feather.wiki/?page=extensions_auto_table_of_contents
Thank you very much Alamantus! Just checking it out now. I do have a preliminary question -- I am seeing noticeably slower typing response in the Markdown editor when typing text into it. I wonder if anyone else is reporting that?
@freecicero Nobody else has reported it yet, but looking at how the new Markdown preview code is set up, I suspect I know what needs to be done to fix it. I'll see if I can get it fixed this week.
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?