Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a file for listing the order #36

Open
jbrooksuk opened this issue Jul 15, 2014 · 6 comments
Open

Implement a file for listing the order #36

jbrooksuk opened this issue Jul 15, 2014 · 6 comments
Labels
feature Feature Request or Enhancement

Comments

@jbrooksuk
Copy link

Rather than using a sort key it'd be much simpler if each directory contained a toc file, where you'd list the name of the file and it'd order based on that.

At the moment if I want to move a page, I've got to go through and re-order every file's sort key, which is painstakingly boring.

@batjko
Copy link

batjko commented Jul 15, 2014

👍 Agreed.
Unless you change your structure to be more like a Wiki, linking each page to the rest of them according some virtual tree structure or something.

@gilbitron
Copy link
Collaborator

I agree this would be a much better way of managing the order of files. I'm just not sure how the structure of a "toc" file would look. Any ideas?

@vyp
Copy link
Contributor

vyp commented Aug 6, 2014

What about simply json? (Is that what you mean by structure…?)

@gilbitron
Copy link
Collaborator

Yes we could make it a JSON file (or YAML for that matter). But it would be very brittle. What happens if you spell a filename wrong in the list, or if a file is removed but it still exists in the list?

@vyp
Copy link
Contributor

vyp commented Aug 6, 2014

Well wouldn't those still be issues regardless of the structure?

Probably can't do much if the user misspells, but can't we just ignore it if the file doesn't exist (but does in the toc)?

I agree that this idea is cumbersome and requires the user to do a lot (maintain the toc file as new files are created and deleted), but I can't think of any better way to automate it?

Maybe we could automatically generate a toc, and if the user wants to modify it (the order and things), then the toc can be overwritten by another file (maybe something like toc.custom)? That way it's a simple copy paste and edit. (If the user modifies the generated toc file itself, they would lose the changes when it's automatically generated again right?)

Don't know about how often it should be generated or what happens when files are added or deleted however… can node watch directories for file changes? Would something like that even be worth implementing if possible or would it be too much work?

@ryanlelek
Copy link
Owner

Referencing my related comment on #18

Should we do a central YAML file per category and put all category, article, and sort metadata in there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature Request or Enhancement
Projects
None yet
Development

No branches or pull requests

5 participants