Macros and Commands - let's share

@stdword how ti use the full house template plugin?
Currently I have a template for meeting and I would like to have a shortcut to create it. How to do it?
Is there a more exhaustive stent step guide?
Thanks

  1. Assumption: Full House Templates plugin is already installed.
  2. Open Settings (t s shortcut)
  3. Press «Edit config.edn» button
  4. Find line with :commands:

    Note: it is not line #9 by default
  5. Add this code to :commands (between [ and ]):
     ["YOUR-COMMAND-NAME                                             [CHARACTER]"
          [[:editor/input "{{renderer :template, YOUR-TEMPLATE-NAME}}" {:backward-pos 2}]] ],
    
  6. Replace YOUR-COMMAND-NAME, YOUR-TEMPLATE-NAME and CHARACTER with your values. CHARACTER can be any punctuation sign.
  7. If you have only one command in config, it would look like that (example provided for my template):
  8. Reload Logseq. It is necessary step before command usage.
  9. Start editing any block and type in «/» to open «/»-commands menu:
  10. Type in your CHARACTER or YOUR-COMMAND-NAME:
  11. Press Enter on selected command. Then exit editing block (via Esc or Enter or mouse click on another block) to render the template.
  12. PROFIT
1 Like

Thanks. I see that in your example you add also pages and r other “dynamic variable” this to do that?

Templates in Full House Templates can be rendered with arguments. The :page and :online is an arguments for my template. See documentation here.

For simple templates you don’t need arguments.

1 Like

I start to use today. Is crazy cool.
Much easier to input template even only with ctrl T.
Thanks!!!

1 Like

I created a macro like this:

:macros {
“prop” “tags:: CSS property”

      }

But it doesn’t tag the block when I use it.
Am I doing something wrong or macros can’t be used with properties?

Thanks!

1 Like

Thanks, I will take a look.