This repository has been archived by the owner on Dec 4, 2023. It is now read-only.
generated from hauptrolle/nextplate
-
Notifications
You must be signed in to change notification settings - Fork 235
Template sorting #14
Labels
enhancement
New feature or request
Comments
I guess the most simple solution would be to just add a prefix to the template names like |
Another idea would be, to not use the filesystem as the source of truth, and just create a plain object which holds all the data. For example: const data = [
{
name: "Page Sections",
url: "page-sections",
children: [
{
name: "Features",
url: "features",
children: [
{
name: "Grid list with heading",
fileName: "gridListWithHeading",
},
{
name: "Simple three column grid",
fileName: "simpleThreeColumns",
},
],
},
],
},
]; With this we are more flexibel for how we
Downsides:
What is your opinion on this subject @lazarnikolov94 ? |
I like the idea of structuring the data in a plain object. It does add a dependency when adding new templates, but on the other hand it'll give us a lot of room for custom features, such as easy sorting, IDs, tags maybe etc... |
Sounds good! Will try to refactor a little bit :) |
Closed
Fixed in #17 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Feature request
Describe the feature you need
It should be possible to sort templates.
Additional information
The text was updated successfully, but these errors were encountered: