Hi folks,
I’m new here. I’m just playing around with the app and quite like the level of customization that it offers.
I’m not quite sure if what I want to achieve is possible, but most surely it is.
I use memos for my notes, and I absolutely adore the functionality that I can just start typing and create a note without thinking where the notes belong, and I see all my notes on the index page.
The one thing that memos does not offer, is separate buckets for content separation. I have to work with #Tags that I don’t like… because I see all the memos on the index page.
What I want to reproduce is the following:
index page: query tasks for every subfolder, link to index of subfolders
in the index of subfolders: create a note and display all the notes (probably just first n lines, which can be expanded on_click on the note)
nice to have: search function only for the current subfolder
Is something like this doable? I don’t mind to code it myself or if a PLUG is needed.
I think it is definitely something that you can do. Some of your requirements are similar to my workflow. Below are a few pointers that should get you started and give you some ideas on what you can achieve. Keep in mind it is still a work in progress as I started using SilverBullet recently. My structure is inspired by the PARA method.
A button to start a new QuickNote and a link to my inbox index to sort them later.
{[Quick Note]} [[Library/Core/Quick Notes|Inbox]]
A query listing the 5 most recently modified notes
# Recently modified
```template
| Name | Last edit |
|----------|----------|
{{#each {page where name != @page.name order by lastModified desc limit 5}}}
|[[{{name}}]]|{{#if lastModified}}{{niceDate(lastModified)}}{{/if}}
{{/each}}
```
A query of my active projects linking to the project index
```template
# Running Projects ({{count({project where status = running})}})
| Name | Last edit |
|----------|----------|
{{#each {project where status = running order by lastModified desc limit 15}}}
|[[{{name}}|{{displayName}}]]|{{#if lastModified}}{{niceDate(lastModified)}}{{/if}}
{{/each}}
```
Similar queries for areas, resources and archives
I’m planning to add some task queries, but I’m not sure yet on how I want to filter and show them (immediate task, short-term, long-term etc). For now, they are only listed in their corresponding categories.
Then, once I open a Project (or other category) index, I have queries listing the notes and task relatives to this specific project. I’m just listing the notes with a link but it’s certainly possible to show also content of the note.
I think this is more or less similar to your first two point. I’m personally using tags as they provide more flexibility. SB is built around tags for filtering. However, it should be possible to use folder for filtering your queries but you may need some custom space-script for filtering/auto-tagging based on folder. For my workflow, I’m working on space-script to auto-tag notes based on which project/category page they are created from.
Regarding your last point, filtering the search this is definitely something possible but I think will need some custom code. There is a GREP search plug that can give you some ideas.
Thanks for your imputs!
Is not quite what i want. I was thinking more to display all my pages in a specific folder with content like with this syntax ![[subdir/page1]]
For example looping over and display the content, i was trying something like this:
```query
page
where name =~ /^tec//
render ![[pages in tec subdirectory]]
order by lastModified desc
```
I guess the ![[some page]] is not allowed in a query block.
In the query, render needs to point to a template to customise the rendering. If you remove the render clause, it should list all page matching your where clause using the default table.
I’m implementing a custom page template. Now i have to figure out how to get the content of the page. Could not find anything in the docs… anyone knows how?
You can create an embed inside of the template with ![[{{name}}]]. You can create a link to the note with the title like # [[{{name}}|{{replace(name, "dev/", "")}}]].
For example:
Let me explain it with an image, hope this clarifies it better.
When i enbed a page just adding it with ![[page]] i can edit the page by clicking on the chain icon
When i do it with a loop and a template… it just prints the output of the page into the block. I can only edit the query block but not the pages like in the first image
in this home.md i want to have all the notes available to edit like in the first image.
Now… my guess, with the little knowledge i have about silverbullet, i can probabely not achive this with the built in functionality.
Is there a way that i can have a collection of editable pages without creating all by hand?
With queries, you will not get the chain icon. As suggested by JSON, you could show a link to the page on top of its content. It’s essentially the same result but with a link instead of a chain icon.
If you really want the chain icon, it is technically possible with the built-in functionality (space script) but is more involved than a query.
The space-script would write to file the list of embedded page, similarly as the one you could create manually except auto-generated. You then manually run the command when you want to update the list with new pages. For the best results, it should even be possible to link the script to an editor open event. So each time you open a page, the script runs and update the list of embedded pages.
Hello, I think this is interesting and potentially something I can make use of! Could you let me know how you denote what is a project, and project status in your frontmatter?
My project index are simply tagged as project in the frontmatter. For the status, I’m using a project attribute and status sub-attributes. Having the main attributes and sub-attributes is not strictly necessary but it makes it clear what status it is. The project tag is also not strictly necessary, you could query the page where the projectattribute exists, but it’s easier to simply use a project tag.
And here is the querry listing the running project on my index:
# Running Projects ({{count({project where status = running})}})
| Name | Status| Last edit |
|----------|----------|----------|
{{#each {project where project.status = "running" order by lastModified desc limit 15}}}
|[[{{name}}|{{displayName}}]]|{{project.status}}|{{#if lastModified}}{{niceDate(lastModified)}}{{/if}}
{{/each}}
```