1.I use community plug-in Table of Contents to genereate content.But the content created by the plug-in cannot work outside Obsidian.Also, table of contents created outside Obsidian does not work on Obsidian either.
So it’s really annoying that i write stuff in Obsidian while have to spend extra time fixing problems in other markdown platform for publish.
2.Is there anyway to generate a table of contents that work universally?
The obsidian-plugin-toc I believe you are referring to uses Obsidian specific Link to headings that only work in Obsidian & other wikilink type platforms.
Logseq also has a specific system not readable by other platforms.
You can also add custom injection for compatibility with markdown readers such as Markor or Gitlab with the External Rendering Support setting. Such as:
You can skip individual selection and support all renderers by checking “Support all external renderers” in settings.
So far I haven’t got it to work properly between Obsidian & Markor - will post back if/when I do.