DiscoTOC - טבלת תכנים אוטומטית

Hello…

I have a problem with using DiscoTOC, maybe someone has an idea.

Imagine DiscoToc, working perfectly, for a topic, as an example:

  • link a → adds “link-a-1” to the end
  • link b → adds “link-b-2” to the end

Suppose I shared link a with someone: (“…link-a-1”)

Now, imagine that I reordered the topics (I put “link b” before).
Using DiscoToc, it looks like this:

  • link b → adds “link-b-1” to the end
  • link a → adds “link-a-2” to the end

And from now on, the link I had shared no longer works.
I shared (“…link-a-1”), but now the correct one is (“…link-a-2”)

I would really appreciate it if anyone has any ideas.

2 לייקים

BUG REPORT!

En-dashes and em-dashes autogenerated by groupings of 2 or 3 dashes no longer work when DiscoTOC is active. Instead of – or — they go back to being -- or ---.

2 לייקים

Hope to add an option to support opening the directory function for all posts with one click!

לייק 1

2024-11-02T22:00:00Z
Error report: When clicking on a directory, the displayed content position does not match the directory’s location

Basically, the current page “DiscoTOC - automatic table of contents” is also incorrectly located.

Can you be more specifici and provide an example. the TOC is loading and working as expected for me on all my Discourse forum instances.

The page you linked loads properly and the TOC is working.

2 לייקים

Thank you for your reply. I haven’t found the problem now, but there was indeed a problem at that time.

A post was split to a new topic: Add button to TOC theme component

Reader Mode conflics with Disco TOC

it seems we can’t have both the Table of Content (by DiscoTOC, mandatory for big documents) and Reader Mode (also mandatory for big documents)

the TOC list overlaps and hides Reader Mode icon (and the post operations menu icon)

4 לייקים

Question on topic - Is there a function or plugin that can automatically generate a list of all the category topics, to help generate up TOC or even Wiki type post content?

This is a save manual effort fix.

A little scripting, but it would be interesting to have maybe a tag that would do it, then being native to discourse, something that prints all the topics (titles) in a speech category (and live links them).

However I suppose it might be better implemented within the LINK button feature, when you click you can input-search for the topic you are looking, but now you have a new top level option like

"Print-links : all topic titles from X category" button :slight_smile:

I would assume order by topic date new/old toggle would be useful.

This is probably a feature request but I thought I would inquire here as it is more relevant as I was thinking of use case with DiscoTOC, as to to do this manually.

Maybe AI does this but we don’t use the AI features, perhpas it really is more aligned as a breakout of the LINK button feature maybe more than DiscoTOS and there might be a wider application usage base than even I am imaging.

I imagine this is fairly obvious, but this component doesn’t work with the Blog Post Styling component as that hides the sidebar.

I suggest having an ‘inline TOC’ option, like how the plugin used to be, if there’s any interest in making them work together.

The inline one is useful as an option so being able to switch would be wonderful. Its great for some usecases because its really obvious for users, while the new one is smarter but a little tucked away and can be missed.

When your primary intention is for all users to jump right to the section they are interested in, the inline version would be a better choice.

לייק 1

I wanted to share some feedback regarding the DiscoTOC plugin. In most Discourse themes, the TOC sidebar is displayed with an appropriate width, ensuring that long titles are handled gracefully. However, when using the Horizon theme, the sidebar width is noticeably narrow, which causes long titles to break into multiple lines. This limits readability and affects the overall visual consistency of the interface.

Could you please consider investigating this issue specifically for the Horizon theme and explore options to adjust the sidebar’s width for a better presentation of longer titles? I believe addressing this would enhance the user experience for many on the Horizon theme.

Thank you for your hard work and for considering this suggestion.

2 לייקים

Subject: dysfonctionnement du composant discoTOC dans la locale persane

Environnement : Forum avec la locale par défaut réglée sur “Persan”.

Composant concerné : discoTOC

Description : Lorsque la locale par défaut du forum est configurée sur “Persan”, le composant discoTOC ne fonctionne pas correctement.

Symptômes spécifiques :

  1. Les éléments UI pour les boutons “Timeline” et “Contents” ne sont pas affichés.
  2. Après qu’un utilisateur a soumis une réponse à un sujet, la vue de la table des matières est automatiquement masquée, la vue de la chronologie est affichée, et aucun élément interactif n’est proposé pour restaurer la vue de la table des matières.

[הצהרה=“Discourse, post:1, topic:111143”]

איך יוצרים תוכן עניינים?

  1. כתבו נושא עם כותרות נכונות בתחביר
  2. לחצו על כפתור התוכן בעיטור התפריט (הוא מופיע רק כאשר יוצרים נושא רגיל - תגובות והודעות פרטיות מתעלמים)
  3. רווח.
    [/הצהרה]

בנוגע להנחיות שלמעלה לשימוש ברכיב discoTOC, יש לי כמה שאלות טכניות להבהרה:

  1. שלב 1 מזכיר כתיבת נושא עם כותרות ושלב 2 מזכיר שימוש בכפתור מסוים. אם אעקוב אחר שלב 1 על ידי מיתרגים את הנושא עם כותרות ב markdown (כגון ##, ###) אך אौन ולא אקח את לחיצה על “כפתור התוכן” בתפריט הכלים (שלב 2), האם רכיב discoTOC עדיין י יצר אוטומטית או יוצג טבלת תוכן מבוססת על הכותרות בלבד? במילים אחרות, האם לחיצה על הכפתור הכרחית לפעילות התקינה של הרכיב, או שהיא סתם טריגר להטמעת רכיב מסוים?
  2. מהו ה תפקיד או הפונקציונליות המדויקת של כפתור ה"תוכן" הממוקם בתפריט הכלים? איך יש להשתמש בו בתוך תהליך עריכת הנושא?
  3. באופן נפרד, נתקלתי בקטע הקוד div data-theme-toc="true"/div. תוכל להסביר את התפקיד המדויק שלו יחד עם discoTOC? מה ה-div הזה שולט בו, ואיך יש ליישם או להגדיר אותו בתוך תוכן הנושא כדי להשפיע על יצירת או הצגת טבלת התוכן?

תודה על ההסבר המפורט.

I’m not sure if this is technical enough, but the component needs both the <div data-theme-toc="true"> </div> and some headings in the post to be able to generate a proper toc.

Without the <div data-theme-toc="true"> </div> inserted the post will simply be a post with headings, and adding that without including any headings will not generate a toc (there’s also a TOC min heading setting in the component, which defaults to 3. So you’d need at least 3 headers in your post to generate a visible toc)

The ‘insert table of contents’ button inserts the <div data-theme-toc="true"> </div> into the post, though you can copy this in or type it manually to the same effect.

Hopefully that helps. :crossed_fingers:


ETA: I’ve just had a gentle nudge reminder that if you’re using the Auto TOC categories and Auto TOC tags component settings then inserting the <div data-theme-toc="true"> </div> isn’t necessary in those cases. :+1:

7 לייקים

Also… there’s a setting for this now (Enable TOC for replies) so you can have a toc in a reply. :partying_face:

4 לייקים

wonder if possible to make it a default TOC for replies if a reply has the different levels of structure…
or there is some concern with it ?

לאחר שהשתמשתי בטו״ס של reply במשך זמן רב, אני חושב שזה מאוד הגיוני.

רק משתמשי כוח (כלומר, בעצם רק אני באתרי שלנו) מקדישים את המאמץ להוסיף טו״ס באופן ידני. having this אוטומטי תהיה לעזר רב.

3 לייקים

אני חווה כמה בעיות:

  1. אם אני מנסה ליצור את תוכן העניינים בנושא שנוצר ללא תוכן העניינים, זה לא עובד. האם זה נורמלי? זה נראה שעובד רק אם אני יוצר את הנושא עם תוכן העניינים. עריכת נושא, לא עובדת.
  2. בנושא שיצרתי בהצלחה עם תוכן העניינים, כאשר אני לוחץ על הכותרות בתוכן העניינים, זה לא גולל לכותרת.
  3. זה נראה שזה יוצר את תוכן העניינים רק עבור הכותרות מסוג ##. יש לי כותרות מסוג ###, אבל הן לא מוצגות.

I did that recently here on Meta at my theme component topic and it worked

לייק 1

מוזר… כששמרתי את זה, זה לא הופיע, אז אולי הייתי צריך לרענן את הדף? ציפיתי שזה יופיע מיד.

טוב לדעת שזה מופיע עכשיו.

(לשם הבהרה, הצלחתי להוסיף את הטקסט שהוספת בתמונה שלך, אבל ה-TOC לא הופיע בצד ימין).

לגבי שאר הבעיות, זה עובד עכשיו גם כן. אני לא מבין… לך תבין…

האם אתה יודע אם אפשר לבטל את ההתנהגות שבה כותרות המשנה מוסתרות כאשר הכותרת הראשית אינה “בפוקוס”?
אני רוצה שכל הכותרות יהיו גלויות בכל עת, אחרת נראה שיש פחות תוכן ממה שיש בפועל.

אני כבר שמח לדעת שזה עובד כמצופה, אז זו רק פרט שיהיה הקינוח המושלם, אם אפשר להשיג זאת.