Export a complete vault as single html

Interesting, and thanks! I’m just discovering Pandoc and am concerned it’s beyond my pay grade. But I’m willing to take a shot at it. Let me make sure I understand.

You’re saying that when Obsidian’s “Export to Standard Markdown” feature goes live, I’ll be able to export the vault to standard markdown, and send that through Pandoc to make a single HTML5 file. What kind of format would that be? Looking at the beginning documentation, “If multiple input files are given, pandoc will concatenate them all” makes me imagine a long web page type of thing. Would you be able to view one note at a time, or all at once, as if it’s been made into a PDF? What would the framing/interface look like?

Also, how would Pandoc handle Obsidian embeds? The way I do my notes involves up to three or four layers of embeds, which works great within Obsidian, but would that survive the conversion?

Before the original post was edited I mistakenly thought what you needed was, in fact, one long page. What I now believe you’re looking for is the user experience of Publish, with all the bells and whistles, wrapped up into a single downloadable file that can be passed on to clients. That’s far more work than I initially suggested.

As an example, for context, if you have a hundred Markdown files, all named something like 00_Forward.md, 01_Chapter1.md, 02_Chapter2.md, etc. Pandoc can easily combine those hundred files, create a table of contents, and output that copy as whatever format you like, in a single file. What Pandoc cannot do is determine backlinks, create a graph, or any of the other special features that Obsidian and Obsidian Publish can do - Pandoc is strictly a conversion tool.

@0x4A you made a great point when I raised this on Discord, saying that exporting a local “Publish Site” would disrupt the current Obsidian business model. It would be too easy to just post that exported file somewhere and have a similar result.

Out of this conversation I’ve come up with a new solution to my problem, which I’ll post in another Feature Request. Once I’ve done that I’ll post a link here for anyone that’s interested.

1 Like

The article mentions ‘R’ indeeed but the magic happens in pandoc which is indeed a very (very) robust tool. It converts .md-file to any supported export format that pandoc has (and believe me there are fexw ;-)).
Remark - Pandoc can also convert the other way around which can be pretty neat sometimes …

1 Like

Here’s the new Feature Request for Obsidian Viewer: Obsidian Viewer (or View-Only vault setting)

1 Like

I’ve been running into the problem of not being able to share my notes with colleagues. I don’t really mind any format, I just want a quick way to export a note (or group of notes?) in a more readable format for others to follow while I present or talk about them, or for them to be able to add comments and send it back to me. What’s the current best way to do this? An external md to pdf tool?

One quick workaround for now: Copy/Paste from Preview into Word, Google Docs, or whatever. Unfortunately it doesn’t carry over images, though.

Also, people talk about Pandoc being a tool for converting md to pretty-much anything, so maybe that could work?

Yes, that’s a good idea. Thank you!

Thanks @joeshirley for taking time to describe this important feature-request.
I have exactly the same background.
I’m also an old MindJet MindManager user and I have the same workflow with Export of the MindMaps to HTML5 and sharing them.
I currently use RoamResearch, I use Notion ( Sharing Kanban Boards ) , I used CintaNotes for many years and I used SSH & cloud shares with my own folder hierarchy of markdown files.
I use Hugo.io since years for many website projects and I really appreciate the strategy to store the information in plain markdown files.
But Export as HTML / PDF is so important and I’d really prefer to buy this as a module with a single price tag instead of a monthly fee.

1 Like

I wonder if there is a plug or extension for Hugo to make it talk “Obsidian”. Namely generate similar to Publish.

That’s the reason it should be also available as a One Time Payment for a plug in with this capability.
Obsidian has some engine, in the form Static Site Generator (SSG) that speaks “Obsidian” and generate those sites. If we could have it in the form of a plug in, I’d pay for it. So their model could expand into pay per service and pay per feature.

2 Likes

I am in the same situation with you . With thousands of topics in Mindjet Manager which is so unfriendly with search, I switched to OB. After lots of manually linking and embedding, those flavored marks such as ![[ ]], [[ ]], ![[ #^]] are liked to get me kidnaped by OB. In other software or platform , those linkings and embeddings just don’t work , What makes worse is, other than the linking and embedding syntax, I can’t see the content itself of the note.

2 Likes

This feature would be huge. Export to HTML5 that looks just like Obsidian Publish. If it is a problem for the Publish business model, I would happily pay for the feature with some other payment scheme.

2 Likes

For single notes you can use Typora - I’m using it to copy notes as HTML and paste them in WordPress’ back-end.

Similarly, you can merge multiple notes - either using one of the available plugins for Obsidian or manually (combining MarkDown files is the same as combining TXTs and can be done with a single command in a terminal) and then go the Typora route.

Of course, this way you lose any inter-linking between notes, and I don’t think images are supported. However, if that’s what you want, exporting hundreds of linked MarkDown notes as HTML while keeping their internal structure/links, then you need a whole different solution that I don’t think even exists.

This is not exact solution to your query, but look forward to this potential solution:

I recently found Publii. It is an offline CMS (static site generator). But currently don’t support any of the Obsidian features (except markdown input). However, they say they are going to allow extending it through ‘Plugins’.

Hope, it will help us publish Obsidian Vaults through it. Btw, I raised an issue for this specific enhancement on their Github profile. It would be nice if more persons, encourage them to bring such plugin.

Yes, exactly right. Obsidian is not as flexible as one would expect. Officially, it only supports pdf export now, which means that pdfs in dark mode don’t play any role.

pdf means that the complex CSS formatting will be broken.

Exporting with plugins also breaks Obsidian CSS formatting

html would be a great solution

1 Like

A core Plugin that supports standard export into

  • word
  • html page
  • folder to htm website
  • rtf
    etc.

would be something that would be really helpful.
All this workarounds mentioned in these topics are mostly not easy to install, depend on single user (who maintain the tool) and sometimes fail.

If Obsidian looks for commercial user…then this kind of export is really needed.

3 Likes

The tool mentioned by @Froodooo lead me to find this one called obsidian-html and man it is simple and efficient ! It might not allow to put a whole vault in one single file but it allows to locally share a working vault that can run without Obsidian from a local server or even directly as html files with relative paths. It even supports :

  • A graph (when runed on a local server)
  • Folder pane
  • Tag pane (only works with yaml front matter tags)
  • Backlink pane

It seems to me like a great way to share parts of your vault with friends and family without making a live website which is great for slightly more private stuff.

I use the Marked 2 app daily to open Markdown files, including Obsidian files, so I can share them in various ways.

After you open files in Marked, the app elegantly exports to DOCX, HTML, PDF, RTF, ODT… Perfect for sharing.

Although I have no connection to the developer, I use Marked every day and recommend it, because it’s fast and simple to use.

Sounds interesting, will check that out.
Although I still believe that solid exports should be a part of the core software.

1 Like