Git Product home page Git Product logo

obsidian-automatic-table-of-contents's People

Contributors

johansatge avatar ras0q avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

obsidian-automatic-table-of-contents's Issues

Conflicts with the tag summary plug-in

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.

What about a title? And configure the size of the border?

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!

Possibility to set starting point of ToC

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":

  • first section in toc
    • etc
  • second section in toc
    • etc

Hope this makes sense. Thanks.

Proposed display changes: headings with links, headings with bold / italics

Headings with links displayed incorrectly and non-functional navigation:

  • Occasionally I have headings with links in them, example: ### [[CSharp#|C#]] Process Injection:
  • The Table of Contents displayed for such a heading is: [}} Process Injection:](app://obsidian.md/index.html#{{CSharp#-C#}}%20Process%20Injection:)
  • As seen above the displayed link is }} Process Injection: and navigation does not work

Headings with bold or italic:

  • I often use headings with bold or italic, example: ## AV Signature Detection Bypass: **Custom Runner and Obfuscated Shellcode**
  • The Table of Contents displayed for such a heading is: [AV Signature Detection Bypass: **Custom Runner and Obfuscated Shellcode**](app://obsidian.md/index.html#AV%20Signature%20Detection%20Bypass:%20**Custom%20Runner%20and%20Obfuscated%20Shellcode**)
  • I would like to see the markdown for bold or italics stripped from the resulting ToC entry since it does not actually bold it in the link but displays the markdown "*" instead

Quick and dirty addition of title "Table of Contents"

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:
image

Instructions

  1. Modify line 108. Instead of const use let.
  2. Modify line 111. Add a level 2 heading as the title "Table of Contents" to the variable markdown.

Like this:

image

Headings named "undefined"

Thank you for this plug-in! This is a function I wished for quite some time.

Unfortunately it doesn't work for me yet.
Alle headings are named "undefined"
I used the documented insert.

Screenshot -2023-09-25 at 14 21 57

Table of Contents in a seperate file

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.

Feature Request: TOC of currently focused file in Side Panel

Simply the ability to open the dynamic ToC for the currently focused file in a dedicated section in the Side Panel.

Pros:

  • Access to table of content for any file without necessiting to add the ToC code block inside said file
  • Allows to keep the ToC as easy and quick to access as possible while scrolling through the file, without needing to scroll back to the ToC to quickly reach another section of the file

minLevel

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.

does not render color in title names

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

TOC renders as code block

The headings are correct and display the links perfectly. I can't click on it though since it's embedded in a code block.

grafik

I've been waiting for a plugin like this for so long! Thank you so much for putting in the effort and time!

๐Ÿ’ฅ Could not render table of contents (Invalid regular expression: /[[/gs: Unterminated character class)

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)

image

Here is the code I am using :
image

I am using Win 10, Obsidian 1.5.3. Here are the other plugins I use :

Automatic Table of Contents

cMenu

Colored Tags

Commander

Dataview

Homepage

Iconize

Linter

Metadata menu

Multi column markdown

Omnisearch

Pretty bibtex

Recent files

Ribbon divider

Smart typography

Sort and permute lines

Tag wrangler

Text extractor

Zotero Integration

Ignore emojis

I like emojis in the beginning of a title, but I would like them to be stripped from the TOC because they make too much noise there:

image

TOC for embeded notes

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

Consider sanitizing HTML tags from TOC entries

Some plugins, eg. Highlightr plugin inject markup via HTML tags which messes up the TOC:

image

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.

Allow inlineFirstLevel to be also for another level

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

Problem with pinned notes

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:

compressed.screen.recording.mov

Automatic Table of Contents on Publish.Obsidian.md

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!

Latex Equation Support

There seems to be no Automatic TOC generator that yet supports LaTeX in the headings. Please add this to your feature list.
image

Default settings

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

Generate real Markdown dynamically

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!

Feature request: manually update option

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!!

Ability to create a directory of the current document in another 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!

Table Renders some titles weirdly

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

Index in a PDF

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.