johansatge / obsidian-automatic-table-of-contents Goto Github PK
View Code? Open in Web Editor NEW๐ An Obsidian plugin to create a table of contents in a note, that updates itself when the note changes
License: MIT License
๐ An Obsidian plugin to create a table of contents in a note, that updates itself when the note changes
License: MIT License
Thank you for developing this plug-in. When I use automatic-table-of-contents at the beginning of the page, the contents labeled in the following contents disappear in the tag summary. When I removed this directory, the relevant content appeared again in the label usage document statistics.
Dear @johansatge , thanks for the implementation. Very good, works perfectly when exported to PDF. Amazing!
I was wondering: what do you think about adding a parameter to allow the user to define a title? It would turn into a self-contained block.
And what about configuring the size of the border? Right now the block of the TOC has a thick border so, when I add a title before it, the visual is a little strange.
Nonetheless, congratulations and thank you again!
Hi,
I'd like to be able to set a "starting point" for the table of contents. Say I do not want the first h1 and sub headings to be part of the toc. Ex:
# document information
## table of contents
``table-of-contents
first-heading: 2
``
## changelog
## other stuff
# first section in toc
## etc
# second section in toc
## etc
Would result in table of contents starting from "first section in toc":
Hope this makes sense. Thanks.
Headings with links displayed incorrectly and non-functional navigation:
### [[CSharp#|C#]] Process Injection:
[}} Process Injection:](app://obsidian.md/index.html#{{CSharp#-C#}}%20Process%20Injection:)
}} Process Injection:
and navigation does not workHeadings with bold or italic:
## AV Signature Detection Bypass: **Custom Runner and Obfuscated Shellcode**
[AV Signature Detection Bypass: **Custom Runner and Obfuscated Shellcode**](app://obsidian.md/index.html#AV%20Signature%20Detection%20Bypass:%20**Custom%20Runner%20and%20Obfuscated%20Shellcode**)
This is a quick and dirty addition of a title to the TOC plugin, like in Typora.
This how it the TOC block will look after the modification:
Instructions
const
use let
.markdown
.Like this:
Hi friend, I love this plugin so much it is awesome. One thing I would love is being able to put the table of contents for a note in a separate note.
The reason being is that I take notes for my lessons and each lesson is in a separate note in a folder for that class. Then I make a quick reference for that folder to quickly get to the chapters I need. But if I make a table of contents inside of a note for another note than that would be perfect! You could include the specific note or notes that you would like to make that table of contents for in the code block and then it would go through like normal.
Thanks again for your great plugin!
Have a great day.
Simply the ability to open the dynamic ToC for the currently focused file in a dedicated section in the Side Panel.
I'm using it well.
Automatically creating a TOC is great.
Please add the ability to fold in future upgrades.
Thank you
Dear @johansatge ,
appreciated, very usefull plugin.
Do you plan to add a minLevel option to exclude the (redundant) title of the document, which is generally at the first level?
Best regards.
Hi and thx for this amazing plugin!
it does not seem to render any color (in html) in the heading names, ie
[travel.Taiwan.2023-09-14](app://obsidian.md/index.html#travel.Taiwan.2023-09-14)
[Visit summary](app://obsidian.md/index.html#Visit%20summary)
[<span style="background:#5ed3ff;color:#ffffff">Sites ๐ฝ</span>](app://obsidian.md/index.html#%3Cspan%20style=%22background:#5ed3ff;color:#ffffff%22%3ESites%20%F0%9F%97%BD%3C/span%3E)
[<span style="background:#00de79;color:#ffffff">Dishes ๐ถ๏ธ</span>](app://obsidian.md/index.html#%3Cspan%20style=%22background:#00de79;color:#ffffff%22%3EDishes%20%F0%9F%8C%B6%EF%B8%8F%3C/span%3E)
[<span style="background:#05aa5e;color:#ffffff">Food ๐ณ</span>](app://obsidian.md/index.html#%3Cspan%20style=%22background:#05aa5e;color:#ffffff%22%3EFood%20%F0%9F%8D%B3%3C/span%3E)
[<span style="background:#ff0066;color:#ffffff">Calander ๐
</span>](app://obsidian.md/index.html#%3Cspan%20style=%22background:#ff0066;color:#ffffff%22%3ECalander%20%F0%9F%93%85%3C/span%3E)
[<span style="background:#ffda36;color:#ffffff">Notes ๐๏ธ</span>](app://obsidian.md/index.html#%3Cspan%20style=%22background:#ffda36;color:#ffffff%22%3ENotes%20%F0%9F%97%92%EF%B8%8F%3C/span%3E)
[<span style="background:#ff00ff;color:#ffffff">Bike ๐ฒ</span>](app://obsidian.md/index.html#%3Cspan%20style=%22background:#ff00ff;color:#ffffff%22%3EBike%20%F0%9F%9A%B2%3C/span%3E)
Visit summary
Sites ๐ฝ
is this a bug or is that an inherit limitation in obsidian ?
thx!
Z
Greetings,
Ever since the most recent update, whenever I try to generate a simple automatic table of contents, I get this message :
๐ฅ Could not render table of contents (Invalid regular expression: /[[/gs: Unterminated character class)
I am using Win 10, Obsidian 1.5.3. Here are the other plugins I use :
I don't know if its possible, but i have a long doc that display lots of embeded notes ( ![[Note1.md]] ).
I want to make a TOC who can display even the title in the embeded
Some plugins, eg. Highlightr plugin inject markup via HTML tags which messes up the TOC:
It would be nice if the plugin could strip any HTML tags, a simple regex <(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>
replace to ''
might do it.
Example payload:
<mark style="background: #FFF3A3A6;">Some title</mark>
Preserving the markup as opposed to escaping it would also be nice, but is more a nice to have.
The option style: inlineFirstLevel
is great to show the ToC inline, instead of vertically. However, many of my notes do not contain any first level headings at all (because of styling reasons) making this option not work. Would it please be possible to make the option be either something like:
inlineFourthLevel
or adding another option like: inlineLevel: 4
If you've generated a Table of Contents (TOC), whether normal or documented, within a note and pinned that note, clicking any entry from the generated TOC will open a new tab with the location instead of navigating to the heading within the currently opened document.
Please see the attached screen recording below:
Dear all,
The ability to limit minLevel or maxLevel is very useful.
Is it possible to apply the function to Published webpages and mobile?
style: nestedList # TOC style (nestedList|inlineFirstLevel)
minLevel: X # Include headings from the specified level
maxLevel: X # Include headings up to the specified level
includeLinks: true # Make headings clickable
debugInConsole: false # Print debug info in Obsidian console
Thank you!
Hi, interesting concept, but doesn't it run with android 11 yet?
It would be a lot neater to have a way of setting defaults for this addition.
For example, basically all of my notes have a top-level h1
, so I'd prefer to hide these from the TOCs generated. I can add minLevel: 2
in each codeblock, but setting them for my entire workspace would be a lot cleaner. I can imagine that this can be useful for other settings as well
It would be great if the codeblock containing the settings for the TOC could be defined elsewhere, e.g. via the plugin settings page. Then a TOC with a predefined style could be inserted via the Command Palette. The benefit would be that we could insert real Markdown code which would therefore be visible and useable in other Markdown viewers, not only Obsidian, and for example online.
These TOCs inserted via the Command Palette should also be tracked and dynamically updated when headings are added or removed, again with real Markdown, otherwise it would be static and soon outdated.
It would also be cool if a TOC defined via a codeblock could be converted into real Markdown in case you want to export the file or something.
I don't have much experience with your plugin, but it seems like this feature request calls into question what purpose codeblock TOCs would serve if real inserted Markdown would behave the same but with the additional benefit of being portable.
In short, dynamic TOCs are great, but I'd much prefer if it was real Markdown code (VS Code has a plugin which does this FR nicely).
Thanks!
Update automatically is convenient, but when my markdown note gets larger, this function will affect the performance of the whole Obsidian application. Hope to give the control of updating ToC to users! Thank you!!
Id love to have the ability of being able to generate the TOC from "note1.md" into "note2.md". Useful for a "overview" document.
Hello, it is a great honor to use this plug-in you developed on Obsidian.
Here I would like to propose a new idea, you can add a command to document 1 , so that it can generate the directory of document 2ใ
In this way, confusion can be avoided when the document is written.
For example: When I edit a document, I have two Windows open at the same time, one to show the directory framework (for example, document 1) and one to write the actual document (for example, document 2).
Thanks again!
Have a " | " character in some titles, and this adds one to the beginning as well
Assuming it's due to how they're parsed(?), but this is a minor bug so feel free to take your time
Thanks for this nice Plugin, I got a question, is it possible to make the index and its links clickable in a exported PDF?
It (the links) didn't work for me in the PDF.
It would be nice to have a shorthand trigger phrase toc
instead of table-of-contents
Otherwise, as right now, the readme wont be shown in obsidian: This plugin did not provide a README file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.