Skip to content
/ o2 Public
forked from songkg7/o2

Converts obsidian markdown syntax to other platforms.

License

Notifications You must be signed in to change notification settings

L2HYUNN/o2

 
 

Repository files navigation

O2

GitHub release (latest by date) CI CodeFactor codecov GitHub license Obsidian downloads

Write once, convert to multiple platforms.

O2 is a tool that converts your Obsidian Markdown files to other Markdown platforms such as Jekyll.

But, currently, it only supports Jekyll. I will add more platforms in the future. If you have any suggestions, please let me know.

Prerequisites

Structure of your vault

You should have a folder structure like this. (of course, you can change the folder names in settings)

Your vault
├── ready (where the notes you want to convert are placed)
├── backup (where the original notes before converting are placed)
└── attachments (where the attachments are placed)

Other Folders will be ignored.

How to use

If you want to convert your notes, you should move them to the ready Folder.

then, Execute the command O2: convert to Jekyll Chirpy via obsidian's cmd + p shortcut.

if exception occurs, you can see the original note in the backup folder.

Supported platforms

Jekyll Chirpy

Settings

your jekyll project (ex: /Users/user1/Documents/GitHub/user1.github.io)
├── _posts (where the converted notes are placed)
└── assets
    └── img
        └── yyyy-MM-dd-title (where the attachments are placed. yyyy-MM-dd is replaced by the date of converting)
  • jekyllPath is the path of your jekyll project (ex: /Users/user1/Documents/GitHub/user1.github.io).
  • Attachments will be copied by the date under the assets/img/<yyyy-MM-dd> folder.
  • Auto create folders: If enabled, the plugin will automatically create the necessary folders if they do not exist. You can toggle this setting in the plugin settings tab.

Syntax

Feature Obsidian (AS-IS) Jekyll Chirpy (TO-BE) Description
Wiki link [[What is Obsidian?]] What is Obsidian?
Image ![[NewJeans.png]] ![image](/assets/img/<yyyy-MM-dd>-<title>/NewJeans.png) yyyy-MM-dd is replaced by the date of converting
Resize image (width) ![[NewJeans.png|100]] ![image](/assets/img/<yyyy-MM-dd>-<title>/NewJeans.png){: width="100" }
Resize image (w & h) ![[NewJeans.png|100x200]] ![image](/assets/img/<yyyy-MM-dd>-<title>/NewJeans.png){: width="100" height="200" }
Embeds ![[Obsidian#This is Obsidian!]] Obsidian
Comments %% This is a comment %% <!-- This is a comment -->
Footnotes [^1] [^fn-nth-1] Currently, only supports the simple syntax
Curly braces {{ content }} {% raw %}{{ content }}{% endraw %} Optional

Grammars not in the table are ignored. If there is a syntax you would like to convert, please let me know in an issue.

Plugins that work well together

Contributing

Pull requests are always welcome. For major changes, please open an issue first to discuss what you would like to change.

Articles

Welcome to write articles about O2!

License

This project is published under MIT license.

ko-fi

About

Converts obsidian markdown syntax to other platforms.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.1%
  • JavaScript 4.5%
  • CSS 0.4%