Just realized the difference between page properties and block properties - please double check

If I look at the Properties.md file from the Logseq docs on Properties, I see that the beginning of the page is:

type:: [[Feature]]
platforms:: [[All Platforms]]
description:: Annotates any block or page with multiple pairs of values e.g. `rating:: 8` or `name:: foo`. Building block for organizing graphs

- ## Usage...

Up until now, I was pretty sure that in Logseq, the word Block referred to an unordered list item in markdown. Above, the page-level properties are not applied to an unordered list item, but are instead applied to the “markdown frontmatter”.

Typically markdown frontmatter looks like this:

---
title: Meeting Notes
tags: #meeting #team
date: 2024-12-12
---

In Logseq, markdown frontmatter looks more like the first example above:

title:: Meeting Notes
tags:: #meeting #team
date:: 2024-12-12

- Today's agenda:
  - Discuss project roadmap
  - Allocate tasks for the week
- Notes:
  - The deadline for the project is 2024-12-31.

Something that’s confusing me is that the Properties docs says:

Page properties are defined by putting them into the first block of the page (frontmatter).

Either my understanding of a Logseq Block is incorrect, or this line in the docs is incorrect. If Logseq considers “Frontmatter” to be a type of a “Block”, then the sentence above makes sense. If, instead, Logseq considers “Frontmatter” to be different from the content of the page, which to my observation seems like the more likely case, not to mention more idiomatic with what’s typically done with the markdown community, then the docs should likely be revised to something like:

Page properties are defined by adding attributes to the beginning of a page before any other content.

This caused me some confusion because while trying to publish a Logseq graph to a website, I created a home page like this:

- # Home
  public:: true

and upon export, the page did not show up. When, instead, I made it

public:: true
- # Home

then it showed up. This was new to me.

Please check my understanding here and fill in the details if there are additional aspects I may be missing about this.

3 Likes
  • There is no standard markdown, frontmatter etc.
    • Logseq follows its own conventions, like everybody else does.
      • The more the features the more the needed conventions.
  • In Logseq MD:
    • graphs
      • have a folder in the file system
      • have connections that live in a local database
        • recreated on every re-indexing
      • have no concept of place or order
    • pages
      • are nodes in a graph
      • are files inside a graph’s folder hierarchy
        • unless they never had any content
      • are very much like special blocks
        • Especially in queries, they are just different entries in a mostly homogeneous database.
      • are often treated differently by Logseq’s built-in functionalities
      • are conceptually a different entity with a separate role
        • But this is not strictly enforced.
    • blocks
      • belong to a page’s outline
        • In outlines, everything has its own place in a strict hierarchical structure.
      • have always a parent
        • either their page or another block of the same page
      • have potentially one or more siblings
        • always ordered
    • frontmatter
      • belongs to a page
        • It is about that page’s meta-data.
          • Typically its properties.
          • They have their own order.
            • But that order has no special meaning.
      • is characterized by being:
        • in the beginning of a file
        • without dashes (-)
      • is edited from within its page’s first bullet
        • Sometimes this is mentioned as a block, while it is a mere bullet.
          • All blocks correspond to a bullet, but this bullet corresponds to the page.
        • While editing, sometimes this convention fails (aka a bug).
          • i.e. the first bullet may or may not contain frontmatter
          • Whenever this happens, it needs external editing of the markdown.
3 Likes

Thanks for this information!