Skip to content

stdword/logseq13-full-house-plugin

Repository files navigation

                   Full House Templates

Tutorial | Documentation | Showcases

Version Downloads

A part of the Logseq13 family of plugins

Summary

Super-configurable, JavaScript-based Logseq Templates for Humans ❤️ focused on UX and simplicity. This is the missing power in your Logseq knowledge base.

⚜️ Features

  • 💪 Rendering templates :) Completely replaces standard templates (can render them all)
  • 🤘 Accessing to any meta information: pages titles, blocks properties & content, your graph, etc.
  • 📅 Full support of dates-work: parsing, formatting, shifting
  • 👁‍🗨 Use views (or dynamic templates) to get freshly updated data of your graph
  • ☘️ Focusing on UX and simplicity: no more headache on where to add a space to make it work
  • 🔗 Easily make a reference to any journal page: relative to now moment, the current page, specific date or whatever you want
  • 👻 High configurability with JavaScript logic: vars, conditions, loops (if you know what I mean 😈)
  • 🛠 A set of handy template tags to work with

Very quick overview

Create amazing views: Glass Card from Logseq.com landing page

details

See info about glass-card in Showroom.

Insert templates from lovely UI 🤗

Use ⌘T / Ctrl + T by default. See details in documentation.

Set cursor position after template insertion 🔱

See details in documentation.

Create parametrized data views 🪜

details

See info about pages-tagged-with in Showroom.

Add logic to templates 📖

                                                   template     →     rendered on page [[Tiago Forte — Building a Second Brain]]

details

- template:: book
  - ``{ var [ authors, name ] = c.page.name.split(' — ') }``
    alias:: ``[name]``
		author:: ``authors.split(', ').map(ref).join(', ')``
		category:: [[📖/productivity]]
		tags:: book,
  - # Book overview
  - ...
  - rendered with template «``c.template.name``» [] (``[c.template.block]``)
  - on ``date.now``

Use shortcuts for templates 🎹

See details in documentation.

Create template buttons 🔘

Easily perform actions on blocks 🥊

See details in documentation.

Create Live Views (auto-updated blocks) ✨

See details here.

Add missing Logseq commands ⌘

See details here.

Create beutiful dashboards 🎛️

details

See info about Monthly Pages in Showroom.

Use query language to get pages info 📚

template     →     rendered

details

``{
var books = query.pages()
  .tags('book')
  .property('likes')
    .value('>', '👍👍')
  .property('year')
    .value('>', 1994)
  .get()
  .sorted((p) => [p.props.likes, -p.props.year])
  .reverse()
  .groupby((p) => p.props.likes)
  .forEach(([likes, objs]) => {
     outn(likes)
     objs.forEach((p) => {
        out('   ' + p.props.year)
        outn(ref(p.propsRefs.alias.at(-1)))
     })
  })
}``

And wrap query results to Logseq-like table view 📰

See details in documentation.

Mix with standard templates syntax 💥

template     →     rendered

details

See details about fold-page-ref in Showroom.

- Mixing [./Full House Templates]([[logseq/plugins/Full House Templates]]) and stadard {{renderer(:view,"c.page.namespace.parts[0]")}} templates syntax `'in one template'.bold()`
  template:: mix-syntax
  - Current page:
    - <% current page %>
    - `[c.page]`
    - `ref(c.page)` or `c.page.name`
  - Journal pages:
    - <% tomorrow %>
    - `[tomorrow]` or `date.tomorrow`
  - NLP dates:
    - <% in two days %>
    - `[date.nlp('in two days')]` or `date.nlp('in two days')`
demo1.mp4

Create block references between template blocks 🖇️

See details in documentation.

Mix with macros: Inline properties referencing example 🔭

details

See setup instructions in Showroom.

See all plugin features in the Tutorial

If you ❤️ what I'm doing — consider to support my work

Buy Me A Coffee

Installation

From Logseq Marketplace (recommended way):

    

  • Click «...» and open the «Plugins» section (or press t p)
  • Click on the «Marketplace»
  • On the «Plugins» tab search for «Full House Templates» plugin and click install
  • See the Tutorial to start using your new superpower :)

Manual way (in case of any troubles with recommended way)

  • Enable «Developer mode» in «...» → Settings → Advanced
  • Download the latest plugin release in a raw .zip archive from here and unzip it
  • Go to the «...» → Plugins, click «Load unpacked plugin» and point to the unzipped plugin
  • ⚠️ The important point here is: every new plugin release should be updated manually

FAQ

How to fix colors of plugin UI for custom Logseq theme?

  1. After the release of Logseq v0.10.5, some issues with plugin UI colors appeared
  2. To fix them add following CSS rules to custom.css:
   :root {
      --fht-footer-text: var(--ls-page-inline-code-color);
      --fht-hightlight: var(--ls-page-mark-bg-color);
      --fht-label-text: var(--ls-page-inline-code-color);
      --fht-active: var(--ls-quaternary-background-color);
      --fht-active-text: var(--ls-secondary-text-color);
      --fht-scrollbar-thumb: color-mix(in srgb, var(--ls-scrollbar-thumb-hover-color) 50%, transparent);
      --fht-scrollbar-thumb-hover: var(--ls-scrollbar-thumb-hover-color);
   }

How to insert frequently used templates rapidly fast?

  1. Since v4.2.0 you can use shortctus feature.
  2. OR you can create the :command in config.edn. Hint: to perform fast searches, use any command name, but add a special character (e.g. the dot «.»)
    :commands
     [
     	["psy client session                                             [.]"
             [[:editor/input "{{renderer :template, psy → session, :page [[client ]], :online}}" {:backward-pos 13}]] ],
     ]
  3. Restart Logseq with ⌘R or Ctrl+R
  4. Use /-command to insert template with only 3 key presses (/.↩︎):

How to overcome the bug with new lines when using views?

It's Logseq's issue. Just append additional space «␣» to the end of every middle line.

How to use plugin with :macros?

Short answer: Use the more powerful :template-view command instead, specially designed for this case.

The only reason to use macros is to reduce the length of text to type-in:

{{mymacro ARG1, ARG2}}

versus

{{renderer :template-view mytemplate, ARG1, ARG2}}

But for that purpose it is better to use :commands to make it faster.

Long answer is here.

Alternatives

Plugin 🏛 Full House support Details
Dynamic Lookup ✅ full
Smart Blocks ⚠️ partial 🚫 forms
Power Blocks ✅ full

Credits

License

MIT License