{{#each {page where tags != "template" and tags != "meta" order by created desc}}}
### [[{{name}}]]
_{{niceDate(created)}}{{#each tags}} [[π {{.}}|#{{.}}]]{{/each}}_
{{/each}}
Last active
September 8, 2025 19:01
-
-
Save zamuz/7b8a80c32384808063ddb78de460dd64 to your computer and use it in GitHub Desktop.
Index page for Silverbullet v1 instances
# TAGS
{{#each {tag select name where parent != "builtin" order by name}}}
_[[π {{name}}|#{{name}}({{tagCount(name)}})]]_ {{/each}}
# TASKS
{{#let @pages = {task select page where not done and itags != "meta"}}}
{{#if @pages}}
{{#each @p in @pages}}
**[[{{@p.page}}]]**{{#each {tag where page = @p.page}}} _[[π {{name}}|#{{name}}]]_{{/each}}
{{#each {task where page = @p.page and not done order by pos asc}}}
- {{text}}
{{/each}}
{{/each}}
{{else}}
_All done._
{{/if}}
{{/let}}
# LATEST
[[All pages|Show all ({{tagCount("page")}})]]
{{#each {page where tags != "template" and tags != "meta" order by created desc limit 15}}}
### [[{{name}}]]
_{{niceDate(created)}}{{#each tags}} [[π {{.}}|#{{.}}]]{{/each}}_
{{/each}}
silverbullet.registerFunction({name: "tagCount"}, async (tagName) => {
let result = await syscall(
"system.invokeFunction",
"index.queryObjects",
tagName,
{ filter: ["!=", ["attr", "tags"], ["string", "template"]] },
);
return result.length
});
Author
I tried to update it for Silverbullet v2 but the move to Lua has proven a bit too involved for me. I'm still on Silverbullet v1 for the foreseeable future. Sorry!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@zamuz can you update this to work with Silverbullet v2? thanks!