Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: option to include current file title and date, omit title if needed, #4

Open
ksdavidc opened this issue Dec 11, 2024 · 2 comments
Assignees
Labels
feature-request Request a new feature to be added. in progress This issue is currently under development.

Comments

@ksdavidc
Copy link

It seems to work well...about as well as the other toc plugins, but

  1. It would be nice if there were a way to include the current filename as part of the title.
    I tried using dataview = this.file.name but it didn't work inside the "insta-toc" codeblock.
    I also tried using the omit parameter to omit the title, but that didn't work.
    Instead, I put a separate heading ## `= this.file.name` above it, and used exclude: / this.file.name/. That sort of worked, but:
  2. it leads me to suggest having a way to omit the title entirely. Putting nothing in the title makes it sort of disappear, but the actual h1 heading is still there. If certain CSS styling is there, its presence is revealed. (though I can imagine having it there is also a feature, of sorts)
  3. I tried omitting the title section of the YAML, but, strangely, it brought it back with the last used values!
  4. It appears that neither making changes in the YAML nor refreshing nor changing the page view prompts a refresh of the toc, and I had to change headings in the file to get a refresh.
  5. More list style and formatting options.
@iLiftALot iLiftALot self-assigned this Dec 11, 2024
@iLiftALot iLiftALot added feature-request Request a new feature to be added. planned The issue was acknowledged and planned accordingly. labels Dec 11, 2024
@iLiftALot
Copy link
Owner

It seems to work well...about as well as the other toc plugins, but

I believe this ToC plugin is the only one which allows for all different types of characters / formats, as well as any heading hierarchy, without breaking the integrity of the ToC appearance/functionality. Feel free to correct me if I am wrong, but that was the intent behind the creation of this plugin.

  1. It would be nice if there were a way to include the current filename as part of the title.
    I tried using dataview = this.file.name but it didn't work inside the "insta-toc" codeblock.
    I also tried using the omit parameter to omit the title, but that didn't work.
    Instead, I put a separate heading ## `= this.file.name` above it, and used exclude: / this.file.name/. That sort of worked, but:
  2. it leads me to suggest having a way to omit the title entirely. Putting nothing in the title makes it sort of disappear, but the actual h1 heading is still there. If certain CSS styling is there, its presence is revealed. (though I can imagine having it there is also a feature, of sorts)
  3. I tried omitting the title section of the YAML, but, strangely, it brought it back with the last used values!

If you'd like to remove the title entirely, just type empty double quotes in place of the title name: ""

As for including the note title: This is a feature I can easily implement by incorporating custom plugin-defined variables.

  1. It appears that neither making changes in the YAML nor refreshing nor changing the page view prompts a refresh of the toc, and I had to change headings in the file to get a refresh.

I also plan on improving the refresh-ability. Currently, a refresh is activated via heading updates, which is done for performance reasons; I will be implementing local settings detection as well.

  1. More list style and formatting options.

This is planned once the core functionality is 100% stable.

I'll get this all done shortly. Thanks for bring this to my attention.

@iLiftALot iLiftALot added in progress This issue is currently under development. and removed planned The issue was acknowledged and planned accordingly. labels Dec 11, 2024
@ksdavidc
Copy link
Author

It seems to work well...about as well as the other toc plugins, but

I believe this ToC plugin is the only one which allows for all different types of characters / formats, as well as any heading hierarchy, without breaking the integrity of the ToC appearance/functionality. Feel free to correct me if I am wrong, but that was the intent behind the creation of this plugin.

Don't get me wrong, it's a worthy addition with some advantages, but it also has some design choices that are not my style (such as only being able to see the final output in reading mode, and the aforementioned delay in updating). I see it more as different than as necessarily better. I realize it is still under development, and am still testing it out how it suits my particular needs, but I can see it has a lot to offer.

If you'd like to remove the title entirely, just type empty double quotes in place of the title name: ""

This doesn't, at least in my testing, remove the title so much as make it size 0, which means certain formatting, such as borders, are still visible.

As for including the note title: This is a feature I can easily implement by incorporating custom plugin-defined variables.

This is what I thought would be great. I have files that transclude other files with their own TOCs, and it occurred to me that it would be nice if each sub TOC had a title with its own name in it to keep them straight. I haven't tried to see if other TOCs can do this, in fact, but it would be a nice feature.

I also plan on improving the refresh-ability. Currently, a refresh is activated via heading updates, which is done for performance reasons; I will be implementing local settings detection as well.

I see. It's clunky while I am testing it, but in normal usage it might not be such a problem.

  1. More list style and formatting options.

This is planned once the core functionality is 100% stable.

I'll get this all done shortly. Thanks for bring this to my attention.

no rush, just glad to know it's in the works.

Thank you for the reply and the effort you are putting in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request a new feature to be added. in progress This issue is currently under development.
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants