Skip to content

skinit/marked-launcher

Repository files navigation

Marked Launcher

An Obsidian plugin for macOS that allows you to open the currently displayed markdown file in the Marked app using Marked's URL scheme, with optional CSS styling.

⚠️ Requirements

  • macOS only - This plugin uses macOS-specific features and URL schemes
  • Obsidian Desktop - Plugin is not compatible with Obsidian mobile apps
  • Marked app - You must have Marked installed on your Mac

Features

  • Open markdown files in Marked app using URL scheme integration
  • Right-click context menu for opening files from file explorer and editor
  • Command palette integration for quick access
  • Configurable command templates for opening files and applying styles
  • Predefined CSS themes dropdown with popular Marked themes
  • Configurable pause duration between opening file and applying styling
  • Optional file name as title feature (copies to /tmp with H1 title)
  • Optional YAML header removal for cleaner display in Marked
  • macOS-specific integration using Marked's URL scheme

Installation

  1. Install dependencies:

    npm install
  2. Build the plugin:

    ./build.sh
  3. Copy the built files to your Obsidian plugins directory:

    # Define target directory
    TARGET_DIR="[path to your vault]/.obsidian/plugins/marked-launcher"
    
    # Create target directory if it doesn't exist
    mkdir -p "$TARGET_DIR"
    
    # Copy files to target directory
    cp main.js "$TARGET_DIR/"
    cp manifest.json "$TARGET_DIR/"
    cp styles.css "$TARGET_DIR/"
  4. Restart Obsidian and enable the plugin in Settings > Community plugins

Usage

Opening Files in Marked

You can open markdown files in Marked using any of these methods:

  1. Command Palette: Use Cmd+P and search for "Open current file in Marked"
  2. Right-click in File Explorer: Right-click on any markdown file and select "Open in Marked"
  3. Right-click in Editor: Right-click while viewing a markdown file and select "Open in Marked"
  4. Hotkey: Assign a custom hotkey to the command in Obsidian settings

Configuration

Go to Settings > Plugin Options > Marked Launcher to configure:

  • Open command: Template for opening files (default: open "x-marked://open?file={{MarkDownFile}}")
  • Style command: Template for applying CSS (default: open "x-marked://style/all?css={{CssTheme}}")
  • CSS Theme: Select from predefined themes or leave empty for no styling
  • Pause duration: Time to wait before applying styling (default: 0.2 seconds)
  • Include file name as title: Copy file to /tmp and add filename as H1 title
  • Display YAML Header: Remove YAML frontmatter when displaying in Marked

Available CSS Themes

  • Swiss
  • Ink
  • Multi-Column
  • GitHub
  • Amblin
  • Upstanding Citizen
  • Lopash
  • Manuscript
  • Grump
  • Custom CSS Example
  • BrettTerpstra.com+2023

Technical Requirements

  • Obsidian v0.15.0 or later
  • See Requirements section above for platform and app dependencies

Development

The plugin uses TypeScript and esbuild for compilation. Development commands:

  • npm run dev - Watch mode for development
  • npm run build - Production build
  • ./build.sh - Build the plugin

About

Plugin for Obsidian to launch the application Marked to display the selected markdown file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors