Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stdword/logseq13-full-house-plugin

Logseq Templates you will really love ❤️ 🏛️
https://github.com/stdword/logseq13-full-house-plugin

knowledge-management logseq logseq-plugin note-taking

Last synced: about 1 month ago
JSON representation

Logseq Templates you will really love ❤️ 🏛️

Awesome Lists containing this project

README

        


                  
Full House Templates








Tutorial |
Documentation |
Showcases

[![](https://img.shields.io/badge/status-support-e89829)](https://github.com/stdword/logseq13-full-house-plugin/releases)
[![Version](https://img.shields.io/github/v/release/stdword/logseq13-full-house-plugin?color=5895C9)](https://github.com/stdword/logseq13-full-house-plugin/releases)
[![Downloads](https://img.shields.io/github/downloads/stdword/logseq13-full-house-plugin/total.svg?color=D25584)](https://github.com/stdword/logseq13-full-house-plugin#from-logseq-marketplace-recommended-way)

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](https://stdword.github.io/logseq13-full-house-plugin/#/reference__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](https://github.com/stdword/logseq13-full-house-plugin/discussions/9).

### Insert templates from lovely UI 🤗

Use ⌘T / Ctrl + T by default. See details in [documentation](https://stdword.github.io/logseq13-full-house-plugin/#/reference__commands?id=insertion-ui).

### Set cursor position after template insertion 🔱

See details in [documentation](https://stdword.github.io/logseq13-full-house-plugin/#/reference__syntax?id=cursor-positioning).

### Create parametrized data views 🪜

details

See info about `pages-tagged-with` in [Showroom](https://github.com/stdword/logseq13-full-house-plugin/discussions/21).

### Add logic to templates 📖


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


details

```markdown
- 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](https://stdword.github.io/logseq13-full-house-plugin/#/reference__configuring?id=insertion-shortcut).

### Create template buttons 🔘

### Easily perform actions on blocks 🥊

See details in [documentation](https://stdword.github.io/logseq13-full-house-plugin/#/reference__tags_advanced?id=blocks-actions).

### Create Live Views (auto-updated blocks) ✨

See details [here](https://github.com/stdword/logseq13-full-house-plugin/discussions/55).

### Add missing Logseq commands ⌘

See details [here](https://github.com/stdword/logseq13-full-house-plugin/discussions/49).

### Create beutiful dashboards 🎛️

details

See info about `Monthly Pages` in [Showroom](https://github.com/stdword/logseq13-full-house-plugin/discussions/44).

### Use query language to get pages info 📚


template     →     rendered



details

```javascript
``{
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](https://stdword.github.io/logseq13-full-house-plugin/#/reference__query_language__table).

### Mix with standard templates syntax 💥


template     →     rendered


details

See details about `fold-page-ref` in [Showroom](https://github.com/stdword/logseq13-full-house-plugin/discussions/7).

```markdown
- 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')`
```

### Create block references between template blocks 🖇️

See details in [documentation](https://stdword.github.io/logseq13-full-house-plugin/#/reference__tags_advanced?id=blocks-uuid).

### Mix with macros: Inline properties referencing example 🔭

details

See setup instructions in [Showroom](https://github.com/stdword/logseq13-full-house-plugin/discussions/34).

### See all plugin features in the [Tutorial](https://stdword.github.io/logseq13-full-house-plugin/#/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](https://stdword.github.io/logseq13-full-house-plugin/#/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](https://github.com/stdword/logseq13-full-house-plugin/releases/latest) 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`:
```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?
0. Since `v4.2.0` you can use [shortctus](https://stdword.github.io/logseq13-full-house-plugin/#/reference__configuring?id=insertion-shortcut) feature.
1. **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 «.»)
```clojure
: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`](https://stdword.github.io/logseq13-full-house-plugin/#/reference__commands?id=template-view-command) 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](#how-to-insert-frequently-used-templates-rapidly-fast).

**Long answer** is [here](https://stdword.github.io/logseq13-full-house-plugin/#/alt__macros).

## Alternatives
|Plugin|`🏛 Full House` support|Details|
|:-:|:-:|:--|
|[Dynamic Lookup](https://github.com/peanball/logseq-dynamic-lookup)| ✅ full | [→](https://stdword.github.io/logseq13-full-house-plugin/#/alternatives?id=dynamic-lookup) |
|[Smart Blocks](https://github.com/sawhney17/logseq-smartblocks)| ⚠️ partial | 🚫 forms |
|[Power Blocks](https://github.com/hkgnp/logseq-powerblocks-plugin)| ✅ full | |

## Credits
- *Inspiration*:
- [Obsidian Templater](https://github.com/SilentVoid13/Templater) by SilentVoid13
- [Logseq SmartBlocks](https://github.com/sawhney17/logseq-smartblocks) by sawhney17
- [Logseq Assets Plus](https://github.com/xyhp915/logseq-assets-plus) by xyhp915
- *Tech*:
- [Eta](https://github.com/eta-dev/eta): Lightweight embedded JS templating engine
- [Day.js](https://day.js.org): A minimalist JavaScript library for dates and times work
- [fuzzysort](https://github.com/farzher/fuzzysort): SublimeText-like fuzzy search
- [NeatJSON](https://github.com/Phrogz/NeatJSON): Pretty-print JS-objects
- Icon created by monkik

## License
[MIT License](https://github.com/stdword/logseq13-full-house-plugin/blob/main/LICENSE)