danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 480 forks source link

Including directive to require file remotely #234

Closed dadario closed 8 years ago

dadario commented 8 years ago

Requesting a content string that includes other files that are remote.

With this option, it's possible add directive <!-- include(/path/file.md) filesystem(host) -->

And indicating to system where the remote file can be located Ex: bin/aglio.js -i file.md -s -H http://localhost:3001

Motivation: Each API has your own markdown files and hosted together with your endpoints services

When a API has a lot of endpoints, the markdown file remain huge, so to simplify the included file, not locally but remotely, this PR was created.

Then a server to provide the documentation of all APIs can render the HTML files including all others markdown files remotely

danielgtaylor commented 8 years ago

@dadario thanks, this is really great work! Due to the official API Blueprint moving toward Hercule I'd like to hold off on any new features to the Aglio-specific inclusion functionality.

My suggestion would be to add this sort of feature to Hercule so that all the various API Blueprint tools can use it. Right now one of the problems a lot of users experience with Aglio is that the include directive doesn't work when they take their API Blueprint file over to e.g. Dredd for automated testing. Hercule should help to fix this as it will be the standard all the tools use!

danielgtaylor commented 8 years ago

@dadario actually it looks like this will be solved by #241, which will be merged soon. I'm closing this in favor of that, but do please reopen if you feel I've missed something!