Discussion: Unify pages and blocks

But the main issue discussed here as not been addressed yet i.e. now in DB version we have a menu entry named “Node reference” that let the user pick a page or a block and it appears as a [[wikilink]] using the title of a page or the content of a block. But when you manually type the same wikilink somewhere else it creates the classic page.

So we have wikilinks that looks exactly the same but point to different things:

There is this fundamental issue of how to reference a block with [[unique name]] and on Discord I have suggested the following:

  1. The blocks could have an optional name: property set manually by the user or automatically (more later)

  2. [[name]] could display the unique name given to the block

  3. ![[name]] could display the content of the block when used inline with other text…

  4. …and embed the whole block with children when used on its own line

For example:

- content of the block
  Name: short unique name
  - child block
- This is a reference to [[short unique name]]
- This is an inline embed of ![[short unique name]]
- ![[short unique name]]

Rendered as:

- This is a reference to short unique name
- This is an inline embed of content of the block
- content of the block
  - child block

The same would happen with pages and their titles.

“Short unique name” could be set manually by the user or by a ML algorithm (for faster workflows when using the current Node reference menu selecting blocks with no name) and it doesn’t matter the format as long as it’s unique. For example the algorithm could use parent and children blocks to infer that a proper name could be The Title (book) and assign it if there isn’t another block with that name. The user could change that later.

What do you think?