thescientist13 / greenwood-starter-presentation

A Greenwood plugin and general purpose starter kit for creating slide decks and presentations from markdown.
https://awesome-bhaskara-b7d76c.netlify.app
3 stars 0 forks source link

Greenwood not preserving filesystem order #49

Open thescientist13 opened 2 years ago

thescientist13 commented 2 years ago

Type of Change

Summary

It looks like when I got to page 10.md, that slide started showing up in the 1x.md sequence, instead of after the 9x.md sequence, causing the last page to show up at the beginning of the slides list. :/ Screen Shot 2021-10-23 at 5 50 40 PM

Details

What's interesting is that at least to me in VSCode the order is as expected, 10.md is at the end BUT, running ls returns the sort order in the UI, with 10.md coming after 1.md, but before 1a.md.

% ls -l src/pages/slides
total 224
-rw-r--r--  1 owenbuckley  staff  170 Oct 23 18:02 1.md
-rw-r--r--  1 owenbuckley  staff   11 Oct 25 12:25 10.md
-rw-r--r--  1 owenbuckley  staff  689 Oct 23 16:43 1a.md
-rw-r--r--  1 owenbuckley  staff  190 Oct 24 14:43 2.md
-rw-r--r--  1 owenbuckley  staff  154 Oct 24 13:36 2a.md
-rw-r--r--  1 owenbuckley  staff  123 Oct 24 13:36 2b.md
-rw-r--r--  1 owenbuckley  staff  135 Oct 24 13:36 2c.md
-rw-r--r--  1 owenbuckley  staff  160 Oct 23 17:41 3.md
-rw-r--r--  1 owenbuckley  staff  107 Oct 24 13:36 3a.md
-rw-r--r--  1 owenbuckley  staff  193 Oct 24 13:36 3b.md
-rw-r--r--  1 owenbuckley  staff  622 Oct 24 14:27 3c.md
-rw-r--r--  1 owenbuckley  staff  151 Oct 24 14:08 4.md
-rw-r--r--  1 owenbuckley  staff  189 Oct 24 14:08 4a.md
-rw-r--r--  1 owenbuckley  staff  198 Oct 24 14:09 4b.md
-rw-r--r--  1 owenbuckley  staff  459 Oct 24 14:29 4c.md
-rw-r--r--  1 owenbuckley  staff  159 Oct 23 17:46 5.md
-rw-r--r--  1 owenbuckley  staff  159 Oct 24 14:29 5a.md
-rw-r--r--  1 owenbuckley  staff  212 Oct 24 14:14 5b.md
-rw-r--r--  1 owenbuckley  staff  571 Oct 24 14:30 5c.md
-rw-r--r--  1 owenbuckley  staff  162 Oct 23 17:47 6.md
-rw-r--r--  1 owenbuckley  staff  128 Oct 24 14:31 6a.md
-rw-r--r--  1 owenbuckley  staff  224 Oct 24 14:23 6b.md
-rw-r--r--  1 owenbuckley  staff  595 Oct 24 14:28 6c.md
-rw-r--r--  1 owenbuckley  staff  284 Oct 24 14:38 7.md
-rw-r--r--  1 owenbuckley  staff  159 Oct 24 14:39 8.md
-rw-r--r--  1 owenbuckley  staff  135 Oct 24 14:35 8a.md
-rw-r--r--  1 owenbuckley  staff  148 Oct 24 14:35 8b.md
-rw-r--r--  1 owenbuckley  staff  153 Oct 24 13:45 9.md

Not sure what the "right" order is here, but presumably since we claim to preserve file based routing, so seems like it would be up to this project to handle "alpha" based routing like seen in the screenshot, or document the discrepancy between the terminal and VSCode?

thescientist13 commented 2 years ago

So this isn't really a Greenwood issue it seems. Basically, the source of truth is the filesystem, but it looks like VSCode does not respect that, despite its sort order settings options.

, so looking in the explorer gives the impression of a different order then what is actually loaded in the graph / browser.

TL;DR VS Code is giving misleading information. Screen Shot 2021-10-25 at 9 30 15 PM


BUT, it would be nice to for this project to maybe support an order like this? (notice the position of 10.md)

% ls -l src/pages/slides
total 224
-rw-r--r--  1 owenbuckley  staff  170 Oct 23 18:02 1.md
-rw-r--r--  1 owenbuckley  staff  689 Oct 23 16:43 1a.md
-rw-r--r--  1 owenbuckley  staff  190 Oct 24 14:43 2.md
-rw-r--r--  1 owenbuckley  staff  154 Oct 24 13:36 2a.md
-rw-r--r--  1 owenbuckley  staff  123 Oct 24 13:36 2b.md
-rw-r--r--  1 owenbuckley  staff  135 Oct 24 13:36 2c.md
-rw-r--r--  1 owenbuckley  staff  160 Oct 23 17:41 3.md
-rw-r--r--  1 owenbuckley  staff  107 Oct 24 13:36 3a.md
-rw-r--r--  1 owenbuckley  staff  193 Oct 24 13:36 3b.md
-rw-r--r--  1 owenbuckley  staff  622 Oct 24 14:27 3c.md
-rw-r--r--  1 owenbuckley  staff  151 Oct 24 14:08 4.md
-rw-r--r--  1 owenbuckley  staff  189 Oct 24 14:08 4a.md
-rw-r--r--  1 owenbuckley  staff  198 Oct 24 14:09 4b.md
-rw-r--r--  1 owenbuckley  staff  459 Oct 24 14:29 4c.md
-rw-r--r--  1 owenbuckley  staff  159 Oct 23 17:46 5.md
-rw-r--r--  1 owenbuckley  staff  159 Oct 24 14:29 5a.md
-rw-r--r--  1 owenbuckley  staff  212 Oct 24 14:14 5b.md
-rw-r--r--  1 owenbuckley  staff  571 Oct 24 14:30 5c.md
-rw-r--r--  1 owenbuckley  staff  162 Oct 23 17:47 6.md
-rw-r--r--  1 owenbuckley  staff  128 Oct 24 14:31 6a.md
-rw-r--r--  1 owenbuckley  staff  224 Oct 24 14:23 6b.md
-rw-r--r--  1 owenbuckley  staff  595 Oct 24 14:28 6c.md
-rw-r--r--  1 owenbuckley  staff  284 Oct 24 14:38 7.md
-rw-r--r--  1 owenbuckley  staff  159 Oct 24 14:39 8.md
-rw-r--r--  1 owenbuckley  staff  135 Oct 24 14:35 8a.md
-rw-r--r--  1 owenbuckley  staff  148 Oct 24 14:35 8b.md
-rw-r--r--  1 owenbuckley  staff  153 Oct 24 13:45 9.md
-rw-r--r--  1 owenbuckley  staff   11 Oct 25 12:25 10.md