Ben Myers 🦖 on Nostr: The problem: I have headings which I want to be able to reorder while I write, but ...
The problem:
I have headings which I want to be able to reorder while I write, but which include an incrementing counter ("Approach 1," "Approach 2"…) that would need to be updated with each reorder.
The unnecessarily engineered #Eleventy solution:
```
{% set counter = 0 %}
## Approach {% set counter = counter + 1 %}{{ counter }}: Foo
// ...
## Approach {% set counter = counter + 1 %}{{ counter }}: Bar
// ...
## Approach {% set counter = counter + 1 %}{{ counter }}: Foobar
// ...
```
I have headings which I want to be able to reorder while I write, but which include an incrementing counter ("Approach 1," "Approach 2"…) that would need to be updated with each reorder.
The unnecessarily engineered #Eleventy solution:
```
{% set counter = 0 %}
## Approach {% set counter = counter + 1 %}{{ counter }}: Foo
// ...
## Approach {% set counter = counter + 1 %}{{ counter }}: Bar
// ...
## Approach {% set counter = counter + 1 %}{{ counter }}: Foobar
// ...
```