Giter Site home page Giter Site logo

bridgetown-obsidian's Introduction

Bridgetown Obsidian Plugin

A Bridgetown plugin to convert Obsidian notes to Bridgetown posts.

This plugin allows you to use Obsidian's internal links feature to cross reference your Bridgetown posts and embed images. It replaces all the wikilinks references in src/_posts with Bridgetown compatible versions:

  1. Converts wikilinks from [[My Markdown Post]] to <a href="/my-markdown post/">My Markdown Post</a>
  2. Supports optional link titles such as [[My Markdown Post|with an optional title]]
  3. Converts image references from ![[attachments/image.jpg]] to <img src="/attachments/bridge.jpg" alt="" />

Installation

Run this command to add this plugin to your site's Gemfile:

bundle add bridgetown_obsidian

Then add the initializer to your configuration in config/initializers.rb:

init :bridgetown_obsidian

Obsidian Setup

There are two main ways you can use this plugin with obsidian.

  1. Create a new vault that points to your src/_posts folder in Bridgetown. In this case you might want to add .obsidian to your .gitignore file.

  2. Create an symbolink link in your existing vault to your Bridgetown folder. This option is strongly advised against by Obsidian so use at your own risk.

ln -s /path/to/bridgetown/folder/src/_posts "My Blog"

In either case, turn on Use [[Wikilinks]] option in Files & Links settings.

Usage

Edit your posts in Obsidian. If you have a Bridgetown server running, you can see your changes in real-time. If not, your changes will get reflected the next time you build your site.

Testing

  • Run bundle exec rake test to run the test suite.

Credits

Check out these other great plugins that helped to inspire this one:

Contributing

  1. Fork it (https://github.com/onurozer/bridgetown-obsidian)
  2. Clone the fork using git clone to your local development machine.
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.