• 0 Posts
  • 10 Comments
Joined 2 years ago
cake
Cake day: June 10th, 2023

help-circle
  • In that sense it is a bit of scripting, it’s a templating language similar to Jinja, so you put things you want to display between {{ }}, for example {{name}} will get rendered as the content of the name variable. [[ ]] is the way Silverbullet habgles links, so [[Something]] is a link to the file Something.md, so [[ {{ name }} ]] is a link to the file with the name from the variable.

    Also that’s because I wanted a custom view, a very similar thing could be done with:

    \```query
    recipe
    \```
    

    BTW, you can have a table of contents on Silverbullet by just putting a block named toc, i.e. ```toc and closing it on the next line.



  • Let me give you an example, I have a page with this:

     ```template
     | Name | Keywords |
     |-----------|-----------------|
     {{#each {recipe}}}
     | [[{{name}}]] | {{keywords}} |
     {{/each}}
    \ ```
    

    Then each recipe page has a header, so for example if I have a file named Recipes/Steak.md with the content:

    ---
    tags: recipe
    keywords: beef easy
    ---
    
    # Ingredients 
    
    Yadda yadda yadda...
    
    

    So that table gets populated with all of the recipes wherever they are and I can add other columns or info there. It’s very neat and customizable.


  • Silverbullet is open source and has a very simple architecture with slightly extended markdown files which are easy to sync using whatever you use for syncing files. Plus it syncs files locally and allows you to edit offline and sync later (with a basic sync conflict resolution to avoid losing changes) and a very cool feature is that it allows you to write your own scripts to get whatever feature you want.


  • Another vote for Silverbullet, I’ve been using it for a while and it’s great. There is a tree view plugin that’s very easy to install, however I disabled it after a short while because I realized that, because of the way I take notes, that is a lot less useful than other features.

    For example, I have a folder with all my cooking recipes, at first I thought having a Tree view would be good there, but actually if I use the querying mechanism I can have tables that give me more information than just the name, e.g. tags, difficulty, etc. also this works regardless of where the recipes are, so if I want to create a subfolder structure or scrap recipes from elsewhere in the whole space it would work (granted, not very useful for recipes, but I also have a table for work tools, some of which are embebed on another page, some of which are a page of their own, and I have a table that lists all of the tools to give me an overview)


  • Wow, that’s very unfortunate. If you installed docker through package manager and have added yourself to the group I believe this to be self-imposed, I don’t know which mechanism Docker uses to give access to users in the group to its service, but seems related to that since it looks like the service is running but just your user can’t access it. To confirm it’s just that run the compose command as root, i.e. sudo docker compose up, this is not ideal but if that works you know it’s a permission problem with your user.

    You seem to know your way around Linux, so it’s probably not something obvious. I’m almost sure it’s something stupid and self imposed, I’ve done my fair share of stupid shit like leaving a config file malformatted or deleting a library or installing something through manually copying files only for something else to break because I overwrote something important.


  • I know you probably heard this thousands of times, but really, if you’re into self-hosting docker is a blessing. People make it harder than it needs to be when explaining all of the ins and outs. I assume you have a Linux box where you run your stuff, just install docker and docker compose there (you might need to enable the docker service, add your user to the docker group and reboot, unless you’re using a user friendly distro like Ubuntu). Then just make a folder anywhere for Silverbullet, create a file named compose.yaml and put the following text there:

    # services means that everything inside is a service to be deployed 
    services:
      # this is the name of the service, you can put whatever you want
      silverbullet:
        # this is the docker image to use
        image: zefhemel/silverbullet
        # this is the rule to restart in case of crashes
        restart: unless-stopped
        # these are environment variables you want defined
        environment:
        # this is a specific variable for Silverbullet, it's essentially username:password change this accordingly 
        - SB_USER=admin:admin
        # volumes are local folders you want to be available
        volumes:
          # in this case we want that the folder ./space be mounted as /space inside the container
          - ./space:/space
        # these are the ports we want to expose
        ports:
          # This means expose port 3000 on port 3000, if you want to access Silverbullet on port 8080 this would be 8080:3000 (because internally the service is still listening to 3000)
          - 3000:3000
    

    Then run docker compose up and you should be able to access it on the port 3000.

    Ling story short docker compose looks for a file named compose.yaml in the local directory, and that file above has all of the information it needs to run the server. I’ve annotated each line there, feel free to remove the comments.




  • Not what you’re asking, but in case it helps. I don’t use Obsidian, I use https://silverbullet.md/ it’s very similar, markdown files with the ``[[other note]]` syntax (as well as some querying mechanism that I believe Obsidian also has), in short it’s almost an open source version of obsidian but it has some advantages IMO:

    • It is open source
    • It provides a sync mode, where you download the text to your device and it’s accessible offline to get sync afterwards.
    • It’s hackable so you can write your own functions and styles

    I’m surprised almost no one has heard of it, the main developer is here on Lemmy, that’s how I found out about it. BTW I also use syncthing to keep backups of my data, and even specifically to not sync a work folder outside of the work computer even though the rest is synced, so I can access Silverbullet from localhost on the work computer and get everything there and any changes to non-work stuff get synced to my home server, and from my personal server get everything except work stuff.