Like Obsidian Publish but for self-hosting. Plugin integrations for dataview, admonition, and more.

Overview

Obsidian Export

Obsidian Publish is great but lacks support for many of the plugins we Obsidian addicts have grown accustomed to — in particular Dataview, but also Citations, Admonition, and more.

This plugin lets you export your md notes to html static files for self-hosting. It supports a bunch of popular plugins.

For an example, check out my personal website. (You can see it's still a little wonky, but it's getting there.)


Reference

How to Export

  • As with Obsidian Publish, you just need to include a published: true field in your metadata for a note to be included in the export.
  • You can add a slug: "some-slug" or slug: ["one", "of", "several", "slugs"] to specify the slug of the file produced. Otherwise, it's just the kebab-case of your note name.
  • By default, links to unpublished notes will be removed. However, you can include an external field in an unpublished note's metadata. Then, the link will be transformed to point to the value of external.
%% In "My Random Note" %%
---
published: true slug: "custom-slug"  
external: https://www.random.org/
---

- If `published` is true, this file will be included in the export. Just like Obsidian Publish.
- If `slug` is not explicitly provided, it defaults to `my-random-note`.
	- If you provide multiple slugs, e.g., `["custom-slug-1", "custom-slug-2"]`, then the note will be exported to a file whose name is the first provided slug. Eventually, I'd like to add support for redirecting additional slugs to the first.
- If `published` is `false`, links to this note will be replaced with `https://www.random.org/`

Templates

You can create a custom template to wrap your notes in template.html (put this in your vault's top-level directory). This uses mustache, with the following options

{
	nav: {
		brand: string,
			items
	:
		{
			label: string, href
		:
			string
		}
	}
,
	// Already rendered:
	main: string, // This is where your note's contents go 
		head
:
	string,
		footer
:
	string,
}

Styling

You can also provide custom styling in a publish.css (again in your vault root). Currently, your snippets, theme, and obsidian.css are all included in the export. (There is no option yet to opt out).


How it works

This plugin uses remark under the hood to do the converting. It uses a set of plugins to recreate "Obsidian-flavored markdown", including:

Plus a few new modifications to do things like comments and embed wikilinks ![[]]. Eventually, I'll probably publish this as a new remark plugin (so you can access Obsidian-flavored markdown in other projects). Conversely, I'll add support for arbitrary remark plugins, so you have even more to choose from.


Available plugins

  • Dataview (partial).
    • You can use dataviewjs blocks and inline attributes. dataview blocks and inline blocks are still unsupported.
  • Citations.
  • Buttons (only for link buttons)
  • CustomJS

Stuff to do

  • Core
    • Basics
      • Fix/remove links (using slug and external)
      • CSS snippets
      • Obsidian theme
      • HTML templates to wrap exported files
    • "Obsidian-flavored markdown"
      • Wiki-links
      • Embed wiki-links
        • Images
        • PDFs
        • Page embeds
        • Block embeds
      • Tags (#abc)
      • Block ids (^123456)
      • Comments (%% ... %%). This plugin currently just ignores comments. Another option would be to convert to html comments.
      • Highlighting (==...==)
  • Plugins
You might also like...

Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

May 3, 2022

Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

Jan 3, 2023

Short sample and instructions for configuring a Flutter Web application to deploy-on-push to Firebase Hosting

Short sample and instructions for configuring a Flutter Web application to deploy-on-push to Firebase Hosting

Nov 17, 2022

Official repository hosting the Runtipi App Store. Submit apps and updates here.

Tipi App Store ⛺️ This is the official repository for the Tipi App Store. It contains all the apps that are available for download on Tipi. Apps avail

Jan 3, 2023

2 player tictactoe-hosting TCP server in 640 bytes

tictactinytoe 2 player tictactoe-hosting TCP server in 640 bytes: F=_={x=o=z=0;t=1};F();require("net").createServer(c={h="\n";w=s=c.write(s+h);if(o

Jul 27, 2022

Image hosting based on Cloudflare R2. Supports PicGo.

Cloudflare R2 ImageBed English | 简体中文 CF-R2-ImageBed is a image hosting service based on Cloudflare R2 object storage. PicGo supported. Cloudflare R2

Oct 4, 2022

the music metadata you love, with IPFS hosting on nft.storage :rainbow:

the music metadata you love, with IPFS hosting on nft.storage :rainbow:

Music NFT IPFS Metadata Standard for musicians pioneered by Catalog & Mint Songs. Compatible with contracts created by: Catalog Sound.xyz Manifold - W

Oct 17, 2022

TypeScript plugin for service-to-service (aka. "functionless") cloud integrations.

Functionless λ Functionless is a TypeScript plugin that transforms TypeScript code into Service-to-Service (aka. "functionless") integrations, such a

Jan 2, 2023

Semantic Release plugin to create and publish NuGet packages.

semantic-release-nuget semantic-release plugin to create and publish a NuGet package. Step Description verifyConditions Verify the presence of the NUG

Jan 2, 2023
Comments
  • multiple typescript erros when running npm run build

    multiple typescript erros when running npm run build

    
    > [email protected] build /home/monyarm/Documents/Obsidian Notes/obsidian-export
    > tsc -noEmit -skipLibCheck && node esbuild.config.mjs production
    
    main.ts:251:43 - error TS2663: Cannot find name 'app'. Did you mean the instance member 'this.app'?
    
    251   const customJS = loadCustomJS(basePath, app)
                                                  ~~~
    
    main.ts:252:10 - error TS2339: Property 'customJS' does not exist on type 'Window & typeof globalThis'.
    
    252   window.customJS = customJS
                 ~~~~~~~~
    
    src/plugins/customJS/customJS.ts:7:30 - error TS2339: Property 'plugins' does not exist on type 'App'.
    
    7  const customJSPlugin = app?.plugins?.plugins?.customjs;
                                   ~~~~~~~
    
    src/plugins/customJS/customJS.ts:10:79 - error TS2339: Property 'plugins' does not exist on type 'App'.
    
    10   console.log(`[Obsidian export]: CustomJS not found among`, Object.keys(app?.plugins?.plugins))
                                                                                     ~~~~~~~
    
    src/plugins/customJS/customJS.ts:34:4 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
      No index signature with a parameter of type 'string' was found on type '{}'.
    
    34    customJS[className] = window.eval(file)
          ~~~~~~~~~~~~~~~~~~~
    
    src/plugins/obsidian-dataview/remarkDataview.ts:12:11 - error TS2430: Interface 'DataviewAPIExtended' incorrectly extends interface 'DvAPIInterface'.
      The types returned by 'list(...)' are incompatible between these types.
        Type 'Node' is missing the following properties from type 'Promise<void>': then, catch, finally, [Symbol.toStringTag]
    
    12 interface DataviewAPIExtended extends DataviewAPI {
                 ~~~~~~~~~~~~~~~~~~~
    
    src/plugins/obsidian-dataview/remarkDataview.ts:25:10 - error TS7051: Parameter has a name but no type. Did you mean 'arg0: any'?
    
    25  clean: (any) => Node;
                ~~~
    
    src/plugins/obsidian-dataview/remarkDataview.ts:58:5 - error TS2339: Property 'clean' does not exist on type 'Partial<DataviewAPIExtended>'.
    
    58  dv.clean = clean
           ~~~~~
    
    
    Found 8 errors.
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 2
    npm ERR! [email protected] build: `tsc -noEmit -skipLibCheck && node esbuild.config.mjs production`
    npm ERR! Exit status 2
    npm ERR! 
    npm ERR! Failed at the [email protected] build script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/monyarm/.npm/_logs/2022-05-05T18_30_48_325Z-debug.log
    
    

    I'm running Gentoo Linux

    opened by monyarm 0
Owner
null
Enables creating databases based on files in Obsidian - like Dataview, but with editing!

Obsidian Database Plugin Do you like Dataview plugin for Obsidian? This one is taking Dataview to next level, but not only allowing you to view the da

Łukasz Tomaszkiewicz 115 Jan 4, 2023
Micro.publish is an Obsidian plugin to publish notes directly to Micro.blog, written in TypeScript

Micro.publish Micro.publish is a community maintained plugin for Obsidian to publish notes to a Micro.blog blog. Installing This plugin will be availa

Otavio Cordeiro 14 Dec 9, 2022
Easily publish notes to the web This plugin integrates with obsius.site to publish markdown notes on the web.

Obsius Publish Easily publish notes to the web This plugin integrates with obsius.site to publish markdown notes on the web. Limitations The type of c

Jon Grythe Stødle 66 Dec 20, 2022
A plugin for Obsidian (https://obsidian.md) that adds a button to its search view for copying the Obsidian search URL.

Copy Search URL This plugin adds a button to Obsidian's search view. Clicking it will copy the Obsidian URL for the current search to the clipboard. T

Carlo Zottmann 6 Dec 26, 2022
Publish your Obsidian note to a Telegraph page.

Obsidian Telegraph Publish Publish your Obsidian note to a Telegraph page. Features: Publish the active file to a new Telegraph page (create). Publish

Xiao Meng 21 Dec 12, 2022
Write on Obsidian. Publish to Ghost with a single click.

Obsidian & Ghost A simple plugin for Obsidian to publish to Ghost site with a single click. How to use Create a custom integration follow this link. Y

Jay Nguyen 36 Dec 22, 2022
A example vault to collect and showcase various dataview queries. Created on behalf of AB1908

Obsidian Example Vault for Dataview Queries Good day! This example vault showcases different usages of the Dataview plugin for Obsidian.md. You'll fin

s-blu 184 Jan 5, 2023
For data quality enthousiasts (and dataview lovers): manage the metadata of your notes.

Metadata Menu This plugin is made for data quality enthousiasts: access and manage the metadata of your notes in Obsidian. Metadata Menu adds context

mathieu 139 Dec 23, 2022
Manage GitHub resources like repositories, teams, members, integrations and workflows with the AWS CDK as Custom Resources in CloudFormation.

CDK Github Manage GitHub resources like repositories, teams, members, integrations and workflows with the AWS CDK as Custom Resources in CloudFormatio

Pepperize 8 Nov 25, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022