Skip to content

RoamJS/smartblocks

Repository files navigation

SmartBlocks

Create custom and programmable templates from within Roam!

Overview

SmartBlocks makes it easy to reuse text in a dynamic way in Roam. It can be compared to other snippet/template insertion tools like TextExpander and Alfred. However, SmartBlocks completely lives in your Roam graph and can smartly interact with your graph. All SmartBlocks workflows are defined in the graph and are performed in your graph. SmartBlocks are made of the following key components:

  • Workflows: These are the definitions of what the SmartBlock will do, it serves as a template for the SmartBlocks actions. These can be predefined or custom workflows.

  • Commands: Commands are instructions that make your SmartBlock workflow do amazing and dynamic things.

  • Trigger: The keystrokes you type so that the workflow is run. The default keystroke is jj.

Table of Contents

The following steps dive into all the features SmartBlocks has to offer in increasing complexity; from beginners to developer.

  1. Trigger Your Workflow
  2. Understanding Commands
  3. Using Pre-Defined Workflows
  4. Make Your Own Workflows
  5. Command Reference
  6. Alternative Methods
  7. Developer Docs

Demo

Migration

This extension was inspired by and acts as version 2 of the original SmartBlocks module in the Roam42 extension. It will soon replace the current SmartBlocks module in Roam42. For a list of all the non-backward compatible changes from V1 to V2, check out the Migration Guide.

Support

There is an active community at roamresearch.slack.com in the #roamjs channel discussing and building SmartBlocks.

Stop by if you need help or want to share your ideas.