Closed jjaychen1e closed 2 years ago
Glad you like it!
page
link. I kind of prefer to offer simple and consistent behaviors to users.BTW, I implemented a "Back to Top" button, you can use it in any page that is too long.
@sethyuan Thanks for your reply! Point 1 works great for me. And for point 3, it works fine in most cases, but seems to be broken when the corresponding block was collapsed.
Good catch. Unfortunately, this goto behavior is provided by the plugin SDK, I cannot fix it on my side. Maybe you can create an issue ticket to the Logseq team?
@JJAYCHEN1e point 2 is implemented and a new version is released.
@JJAYCHEN1e point 2 is implemented and a new version is released.
Thanks! It works great for me.
@JJAYCHEN1e point 2 is implemented and a new version is released.
This works pretty well with right sidebar, it can easily show current page's TOC. But currently it won't refresh after jumping to a new page, I need to make changes to the content to trigger the refresh. Could jumping action trigger an event, refreshing the TOC automatically?
Interesting, I didn't expect that it could be used in this way. I'll investigate how to detect page changes, triggering event upon jumping can only solve half the problem, a page change can be triggered in a lot of ways.
Thanks for letting know of this interesting usage!
@JJAYCHEN1e I thought about it again, no named TOC should really go along with the page it resides on. It shouldn't change with the currently browsing page. For that, I choose to use *
as the page name when creating TOC.
I released a new version with this implemented, you're welcome to give it a try. I also updated the README to document how to use this feature.
@sethyuan I've tried it, it's fantastic. Thanks!
TOC still doesn't show up in the right sidebar for me. It works in the main windows, but when I shift click that block, the block shows up as blank in the right sidebar. If I click it, it still shows {{renderer :tocgen }}
Btw, great work! Really really like it!
@nhan000 I see. This is not how I designed it to be used, but I think your way of using it should also be supported. I'll investigate the problem here, meanwhile, your can open any page in the right sidebar, e.g. "Contents" that opens by default, and create there another TOC by specifying the page name. Say your page is called "abc", you can then create a TOC by typing {{renderer :tocgen, [[abc]]}}
.
@nhan000 I implemented it and released a new version, can you try it?
works great! thanks a lot!
currently the page
function is only available when the TOC is generated for a page, but not a block.
Could you have page
implemented for block TOC as well? Thanks a lot!
@nhan000 Implemented, please give new version a try.
works great! Thanks a lot!
Hi,
I didn't know if I should have created a new issue but here goes:
I ported a very long .docx file to .md and your plugin is incredible to access it. I'm currently on 0.6.7 and found a quite serious bug : page
links only work if the document has been loaded in RAM apparently.
To be a bit more clear, after putting the toc in the sidebar, to make the page
links work I need to scroll down in the document until SECTION (so it's now "loaded") and only then can I use the SECTION page
links. Otherwise, clicking does nothing and I see no new output in the terminal window running "flatpak run logseq".
The problem is then that it renders your incredible plugin useless to me : going to the end of the document takes forever for a long document and I have to redo it again if I changed document even once.
Is there a way to load the whole page direclty and make sure the page
links work?
Thanks a lot!
@thiswillbeyourgithub It's maybe better to open an issue of its own, to better track this topic.
BTW, since this is an old plugin SDK problem, I ran another test with the newest version of Logseq and the plugin SDK, and the result is the same, it can't automatically load the necessary content.
The lazy loading behavior of the page by Logseq is to help with loading performance, it only loads as you scroll down the page. However this introduced the issue you mentioned for the plugin SDK's "goto" function.
There is no good solutions on the plugin side, it must be solved by the plugin SDK, which is maintained by the Logseq team.
Thanks for you contribution, I love this plugin so much.
It will be nice if it also supports:
[[
query in some cases, and I need to manually copy the page name and paste it.)