Skip to content
This repository was archived by the owner on Apr 15, 2024. It is now read-only.

Reference blocks by their anchor in the layout #54

Open
gwennlbh opened this issue Feb 9, 2023 · 0 comments
Open

Reference blocks by their anchor in the layout #54

gwennlbh opened this issue Feb 9, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@gwennlbh
Copy link
Member

gwennlbh commented Feb 9, 2023

Instead of having to rely on positional indices (which may change when adding a new block before the end), naming blocks by their anchors in the layout would provide a much clearer and easy-to-maintain way to specify the layout:

---
layout: 
- [p@intro]
- [p@why, m@problem]
- [p@solution]
- [l@source, l@product]
---

@intro
This project blah blah blah

@problem
![some alt text](./thing.png "caption")

@why
Lorem ipsum dolor sit amet

etc.

This could even be simplified to

layout: 
- [intro]
- [why, problem]
- [solution]
- [source, product]

Of course, the position-based syntax would take precedence over this (so no naming your anchor "m1", what a bummer)

(using the lighter syntax for anchors, see ortfo/db#71)

@gwennlbh gwennlbh added the enhancement New feature or request label Feb 9, 2023
@gwennlbh gwennlbh self-assigned this Feb 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant