jdan / cleaver

30-second slideshows for hackers
http://jdan.github.io/cleaver
MIT License
4.02k stars 305 forks source link

Support frontmatter for options #177

Closed sapegin closed 5 years ago

sapegin commented 6 years ago

Close #175

sapegin commented 6 years ago

@sudodoki please have a look.

sudodoki commented 6 years ago

Cloned & tried that locally. Generally, looks good & loving the possibility to add classes 👍 💯 . One thing that makes me cringe a little is

---

--

that doesn't result in any slides, but I think that's no biggie once you get used to ig. Might want to add frontmatter being a option to README, but would suggest hearing whether @jdan thinks there might be any backfiring regarding to non-standard syntax being used somewhere in unexpected way. For example, will this affect any inline code that features this syntax / slides self referencing? 🤔

sapegin commented 6 years ago

I think we can support this syntax too:

image 2018-04-10 at 10 54 33 am

(Extra -- after frontmatter isn't required, you can separate slides with -- or ---.)

But I'm not not sure, it will make code a bit more complicated.

regarding to non-standard syntax being used somewhere in unexpected way.

I'd say that frontmatter is more standard than having YAML as text ;-)

For example, will this affect any inline code that features this syntax / slides self referencing? 🤔

Could you show some examples? I can add them to an example file.

sudodoki commented 6 years ago

But I'm not not sure, it will make code a bit more complicated.

Personally, would prefer simpler code if this is not affecting default flow / and can be automated in the script that one would use to generate template for presentation

I'd say that frontmatter is more standard than having YAML as text ;-)

No, I was referencing possibility of someone already using --- or something in the slides, don't have any quarrel with frontmatter for sure.

Could you show some examples?

Tried quick searching over some of the slides, closest I found were tables markup |---|---|---| but given you are matching ^/$ this shouldn't be an issue. Overall, was speaking hypothetically from standpoint of edge cases and being cautious, so asked for double check, but I don't think this is something too breaking :)