Static Site MD Exporter

by Yunfi
5
4
3
2
1
Score: 61/100

Description

Category: 3rd Party Integrations

The Static Site MD Exporter plugin converts marked notes in your vault into standard Markdown files that can be integrated with popular static site tools. It scans for front matter fields like "published," translating your wiki links into regular URLs, so they're immediately compatible with platforms like Hugo or Hexo. Local images can be either embedded as base64 or flagged for you to handle separately. As a result, you can maintain Obsidian's native note-taking and linking conveniences while still producing files that are ready for deployment on a website. The plugin selectively processes only the material you choose, so you can keep certain notes private if needed. Whether you're hosting on GitHub Pages or another platform, it aims to streamline the workflow of transforming vault content into a public-facing site without altering your original vault files.

Reviews

No reviews yet.

Stats

34
stars
2,400
downloads
0
forks
756
days
171
days
171
days
5
total PRs
0
open PRs
3
closed PRs
2
merged PRs
5
total issues
0
open issues
5
closed issues
140
commits

Latest Version

6 months ago

Changelog

What's Changed

  • Fixes a issue that IndexedDb deletion can be slow and making subsequent operations to fail.
  • update deps

Full Changelog: https://github.com/yy4382/obsidian-static-site-export/compare/2.1.0...2.1.1

README file from

Github

Static Site MD Exporter for Obsidian

Integrate Obsidian into your blog writing process!

Export notes with the published: true front matter into plain Markdown (and upload them), so that you can use them for static site generators!

Meanwhile, wiki links[[]] and many other Obsidian features can be used normally. This plugin does the work of converting [[]] style into []() style automatically in exported markdown, leaving the links inside Obsidian untouched.

Simple guide on how to use this plugin with Hugo and Github Pages

Features (How it Works?)

[!NOTE] This plugin will not modify your files in the vault! (Since v2.0.0). It only reads the files and generate new files to upload.

The "All validate files - Static Site MD Export" button on panel (Ribbon) transforms links/tags and handles images, while the "Current file - Static Site MD Export" does similar staff, but only validate the current note, not all the notes.

  1. Get all (if use the "all" button) or active note(s) in vault with front matter "published" (or other key you configured) and the value is true (bool value).
  2. For [[]] or ![[]] links (also []() that doesn't point to an URL, or say, those obsidian thinks is a wiki link) in notes, it finds the target note, and transform them into standard markdown format (if target note also has published: true property). See Transformation Details for more details.
  3. Change tags in front matter into 1-depth format (discarding content before /), removing tags in the content and merge them into the front matter.
  4. Upload the markdown files via git. You can also choose which folder in git repo to upload to. More upload methods will be supported in the future.

Handle images

Obsidian also views images that stores in the assets folder as wiki links, so they are transform together with other links.

However, handling local images like this is kind of tricky. This plugin has 2 builtin options: embed image in output markdown via base64, or abort the export process if there any image of this kind.

The latter option implies you need to upload them manually first, or find another plugin to do this for you, e.g. my obsidian-image-upload, which I find useful in blog workflows. A basic description for it:

A simple plugin that uploads local images in a note to S3 (and S3 compatible services), replace the image link with the S3 link, and remove the images from the vault if they're exclusively used within that note. (optional).

Or, instead of S3, you can write a custom function to upload the image via Custom JS plugin.

[!NOTE] If you delete a file in your vault, your file in git won't be deleted. You need to go there to delete them. Similarly, if you change the slug of a post, you need to delete the markdown file in git with the original slug as name.

Transformation Details

Every link that obsidian thinks is a wiki link. Basically, any link that doesn't target to an URL is a wiki link.

It may either in form of [[Note]], ![[Embedded]], or [title](not/a/url), ![alt](https://raw.githubusercontent.com/yy4382/obsidian-static-site-export/HEAD/not/a/url).

How will they be transformed?

Say that we have the following files in vault:

Ref.md:

---
title: Ref
slug: ref-slug
published: true
---

Note to be linked.

## Section example

Note.md:

<!-- frontmatter omitted -->
## Sec 1
[[Ref]]
[[Ref|Display Name]]
## Sec 2
[[Ref#section-example]]
[[Ref#section-example|Display Name]]
[[#Sec 1]]
[[#Sec 2|Display Name]]
[[NoteThatNotExist]]
## Sec 3
![[image.png]]
![[imageThatDoesNotExist.png]]

An options "Post prefix" is set to "/post/" in this example. This is used to generate path in the URL.

When using "Abort" option for image, the plugin refused to export Note.md. If use base64, the transform result will be:

<!-- frontmatter omitted -->
## Sec 1
[Ref](/post/ref-slug)
[Display Name](/post/ref-slug)
## Sec 2
[Ref > section-example](/post/ref-slug#section-example)
[Display Name](/post/ref-slug#section-example)
[Sec 1](#sec-1)
[Display Name](#sec-2)
[[NoteThatNotExist]]
## Sec 3
![image.png][img1]
![[imageThatDoesNotExist]]

[img1]:
data: image/png;base64, omitted

Tags

Tags in frontmatter and content will be merged into frontmatter, then remove "#" and anything before the last "/".

Roadmap

  • Support more upload methods (add back the S3 method that v1 supports).
  • Support custom handler for image.

Contributing

Contributions are welcome! Please submit a pull request with your changes.

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Better Export PDF
2 years ago by l1xnan
Obsidian PDF export enhancement plugin
Copy Local Graph Paths
a year ago by Amy Z
copy-local-graph-paths is a simple Obsidian plugin that copies the paths of notes linked to your current page.
Export Graph View
a year ago by Sean McGhee
Plugin to export your vault's graph view.
Export To TeX
5 years ago by Zach Raines
export obsidian markdown files in a format that can be pasted into a TeX file
Gitlab Wiki Exporter
2 years ago by Josef Rabmer
Image Magician
2 years ago by luxmargos
This is a plugin for Obsidian (https://obsidian.md). Supports viewing and exporting various image formats using ImageMagick.
Import/Export TiddlyWiki
3 years ago by Lucas Bordeau
Import/export TiddlyWiki tiddler files with Obsidian
Kindle Export
4 years ago by Simeon Stanek
A plugin which converts .md files from Obsidian to your Kindle/PocketBook
Latex Exporter
a year ago by Matthew S. Scott
Linked Note Exporter
9 months ago by the-c0d3r
Obsidian plugin to export a note along with all its attachments and linked notes—cleanly, conveniently, and ready to share.
Metadata Extractor
5 years ago by kometenstaub
Obsidian Plugin that provides metadata export for use with third-party apps.
my anime list text exporter
2 years ago by XmoncocoX
a plugin who create an obsidian page for an anime with the data from my anime list.
Obsidian Enhancing Export
4 years ago by YISH
This is an enhancing export plugin base on Pandoc for Obsidian (https://obsidian.md/ ). It's allow you to export to formats like Markdown、Markdown (Hugo https://gohugo.io/ )、Html、docx、Latex etc.
Obsidian markdown export
3 years ago by bingryan
This plugin allows to export directory/single markdown to a folder. support output format(html/markdown/text)
Pandoc
5 years ago by Oliver Balfour
Pandoc document export plugin for Obsidian (https://obsidian.md)
PDF break page
2 years ago by CG
Plugin for obsidian that adding shortcuts to create breakpages for pdf exports.
Quarto Exporter
2 years ago by Andreas Varotsis
Export Obsidian notes to Quarto-compatible QMD files.
Screwdriver
4 years ago by vorotamoroz
Static File Server
5 years ago by Elias Sundqvist
Serve obsidian vault subfolders with a static web server
Strapi Exporter AI
2 years ago by Cinquin Andy
[prod] - 🚀 Strapi Exporter: Supercharge Your Obsidian-to-Strapi Workflow, export an obsidian notes directly to your Strapi API
Webpage HTML Export
3 years ago by Nathan George
Export html from single files, canvas pages, or whole vaults. Direct access to the exported HTML files allows you to publish your digital garden anywhere. Focuses on flexibility, features, and style parity.
WhatsApp export note
a year ago by JoaoEmanuell
Obsidian plugin to export notes for whatsapp
Yandex Wiki Integration
10 months ago by Pavel Sokolov