Challenge 1: Build a Dynamic Notes Index

You’ve made it through the theory! Now it’s time to experiment with what you known and home in on your own notes structure.

Click here to download the training graph for the first challenge. Unzip the folder and open it in Logseq. In it, you’ll find a collection of notes that I pulled from my (Ramses’) Logseq graph.

To add a new graph, choose the Add new graph option from the left sidebar:

The aim today is to get a feel for the different ways of structuring notes in Logseq. As you’ll see in the graph, there’s no fixed way of doing things; just make sure to indent and link your notes.

In today’s journal page under the heading Exercise, you’ll find a handful exercises to get you started working with the training notes. The challenge is to find as many ways as possible to query the example notes.

If you get stuck, you’ll find some hints under the heading Stuck? Use these features for the challenge. However, don’t feel limited; they’re merely suggestions to get you to experiment with queries.

All examples are from my personal graph. In case you want me to use your notes as an example (i.e. to see how I would structure and query them), please send me a DM and add your notes as .md files.

Extra: easy indexes using namespaces

If you use namespaces in your graph, there’s a cool macro you can use: {{namespace }}

The namespace macro is much like a query in that it takes a [[link]] as input. However, in this case, the link is not a value in a block, but a page that has children in its namespace. Here’s an example:

This is the macro to create the index from the example above:

{{namespace [[HTML/tag]]}}

There’s also a namespace filter for use in queries:

{{query (namespace [[HTML/tag]]) }}

If this is the first time you hear of namespaces, this video by Sawhney is a great introduction:

Exercise

  • On the [[David Perell]] page, create an index of his content based on the author property.
  • On the [[Dashboard]] page, create an index for all notes to process.
  • On the [[Twitter page]], create an index for:
    • Tips and Tricks
    • Curation
    • Audience Building
    • How to write a good tweet
  • On the [[status]] page, create an index for each status value.
  • Create an index with all pages about CSS properties in the graph.
  • Create an index with all pages in the display namespace that’s within the CSS namespace.
  • Create an index with all HTML attributes.

Need help?

If you get stuck or have any questions, make sure you to post them in this forum thread. That way, everyone can learn.

In the live session of today, I showed how to approach these challenges:

Have fun running experiments with notes, and feel free to ask any questions!

4 Likes

was there an answer to this one somewhere to reference?
Underneath this block, create an index with all pages in the display namespace that’s within the CSS namespace.

  • I wrote 2 queries, and I have 2 questions.
  • 1 : {{query (and [[Notes]] [[To process]]) }}
    • This query works good.
    • My question is what is the differens between “{{query (and [[To process]] [[Notes]] ) }}” and this. performance speed? Note is containing B ?
  • 2 : {{query (and (property status [[To process]]) [[Notes]])}}
    • This does not work. I don’t know why.

Are the actual answers to these queries available somewhere. I’m getting stuck on a lot of them. Some of it is the wording of the task. I’ll come back when my mind is fresh and maybe some of them will make more sense.

Unfortunately not. But now that you say that, it’s a good idea that I’ll use for future courses.

Lots of people solved the challenges by asking here on the forum (by asking in #queries) or in Discord (there’s a queries channel there as well). When you post in the community to get help with queries, please mention at least:

  1. The query code you’ve written.
  2. The output you expect to get.
  3. The output you get instead.
1 Like

I am trying to follow each lesson with their accompanying videos. But the whole order is messed-up. Next time please consider creating a youtube playlist in the order that reflects these lessons.

1 Like

Hi @Ramses ! The link for downloading the training graph is broken. :slightly_frowning_face: Is there any chance you could re-upload the files? :pray:t4:

1 Like

Sorry for the late reply @Manax. And my bad; I turned off our ConvertKit plan as the course ended over a year ago.

But I didn’t realize that people would still do the challenges via the forum.

Here’s the Logseq graph for chis challenge.

1 Like