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

Enable includes #11

Open
mojavelinux opened this issue Aug 13, 2014 · 9 comments
Open

Enable includes #11

mojavelinux opened this issue Aug 13, 2014 · 9 comments

Comments

@mojavelinux
Copy link
Member

In theory, includes should be able to work in DocGist. First, set the safe option to 'server'. Then, set the base_dir option to the base URL of the file being rendered. Some content-origin stuff might need to be set to make this work...however docgist is pulling the original content, the include mechanism needs the same access.

@nawroth
Copy link
Contributor

nawroth commented Sep 4, 2014

Right, we'd need to give Asciidoctor access to the gist fetchers somehow.
How about patching the include macro?

@mojavelinux
Copy link
Member Author

Patching the include macro is as straightforward as implementing an IncludeProcessor extension.

While there are some caveats with this extension point at the moment, it will work for 80% of the cases rather easily.

The main caveat is that a custom IncludeProcessor must handle all aspects of the include, which includes line and tag selection. I do plan to make that a concern that is handled by the core after invoking the IncludeProcessor#process method, but that's in the future.

@mojavelinux
Copy link
Member Author

As a side note, this is the extension point that will eventually allow includes to work on GitHub, assuming they entertain the idea.

@nawroth
Copy link
Contributor

nawroth commented May 5, 2015

What's the current state of the IncludeProcessor?

@mojavelinux
Copy link
Member Author

mojavelinux commented May 5, 2015 via email

@nawroth
Copy link
Contributor

nawroth commented Nov 19, 2015

I realized that a document with many includes could use up the allowed rate limit on the GitHub API pretty fast. "For unauthenticated requests, the rate limit allows you to make up to 60 requests per hour." Could work for other hosts though.

@jexp
Copy link

jexp commented Nov 19, 2015

We could use gh-pages

@mojavelinux
Copy link
Member Author

This is a major value proposition for DocGist since GitHub security is unwilling or unable to enable includes. DocGist provides an ideal workaround. The rate limit is just something we'll have to work through, but I don't think we should let it be a show stopper.

@mojavelinux
Copy link
Member Author

Since includes work in the Chrome extension, I'm not entirely sure I understand why we can't make it work the same way in DocGist. In theory, the Chrome extension and DocGist would be subject to the same rate limit problem, and that's never been a factor. cc: @Mogztter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants