Closed jdan closed 10 years ago
Definitely +1
The values merge with those in the markdown. And with the option to specify the path to a config file.
Maybe even some logic to get the default title from the first level 1 header? This way we can externalise everything not specific to the presentation.
Of course I assume a config object can be passed to the node.js api?
@jdan Yes, I'm truly feel unconvienent recently, the first thing I do is copy the conf metadata from README and paste when I open a markdown file. I agree with your proposal, but don't you think that makes the command-line too long with those options when user start a new markdown file. What's more, how do you handle the cleaver.json which each markdown file has one? It makes things a little complex in my mind.
My proposal:
cleaver init filename.md
With this option, when you start a new file, add the conf metadata at new file's begining. If the file alearedy exists, just append the conf metadata at the begining.
Good idea @keith3, there's some work being done in #70 for that
If you use cleaver.json it would mean you cannot have all your presentation in single folder, but rather have each wrapped in folder with .md & .json file in it. Not sure it's a frequent use-case, but it's thing worth mentioning.
Yeah, not a fan of this after thinking about it more. Thanks for chiming in.
A modest proposal
I'd like to start a conversation about this.
Currently, cleaver presentations contain metadata:
This is, in my opinion, a little weird. I would like to separate documents into two parts: the actual presentation (just markdown) and a new file called cleaver.json, which may look like this:
I'd also like to reopen the possibility of handling command-line options (we used to do this)
so you could avoid creating a cleaver.json.
Benefits
Separation of presentation content and settings. I feel like having the content and settings tightly coupled is a little counterintuitive. We could keep things more organized, which could open the door to a few new features - plugins, middleware, that sort of thing.
Downsides
No longer one file :(. The whole idea is that cleaver presentations are super portable, both when they're being creating and when they're rendered. You can still have your entire presentation contained in a single file, though, and simply use command-line options to achieve what you can now.
What are your thoughts?