bast / cicero

:microphone: Serving presentation slides written in Markdown.
https://cicero.xyz
GNU Affero General Public License v3.0
55 stars 17 forks source link

API does not allow serving files in subdirectories #11

Closed bast closed 8 years ago

bast commented 8 years ago

This may well be a feature but currently this breaks the demo slides.

bast commented 8 years ago

@robertodr @olemb I am considering changing the API from currently /v1/github/namespace/repo/branch/file/remark/ to /v2/remark/github/namespace/repo/branch/file/ (while of course continuing supporting v1). The advantage would be the possibility to serve files in subdirectories. The "remark" is currently redundant since it is the only supported engine. We could drop this redundancy and "hardcode" cicero to remark. But I am a bit eye-ing at revealjs but perhaps that falls under YAGNI. Same for GitHub but my plan is to also allow GitLab and Bitbucket. Long story short what are your thoughts about /v2/remark/github/namespace/repo/branch/file/? I want a hackable URL that lives "forever".

robertodr commented 8 years ago

I am in favor of this change. But will it be easy for you to make automatic the switch from remark/github to other_engine/other_host whne the time comes?

bast commented 8 years ago

The switch is easy. My worry is more that it may never happen for some reason and then we just carry around a redundantly long URL. But I think it is good to allow room for it. The alternative would be a short v2 API and introduce more engines etc. in later versions of the API. But I don't want to support too many APIs obviously :-)

robertodr commented 8 years ago

I guess you can print out the full URL and a shortened version of it.