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

Allow transclusion of API endpoint results #42

Open
jmatsushita opened this issue Apr 17, 2016 · 0 comments
Open

Allow transclusion of API endpoint results #42

jmatsushita opened this issue Apr 17, 2016 · 0 comments

Comments

@jmatsushita
Copy link
Member

jmatsushita commented Apr 17, 2016

This could be an underlying facility for #40 or #41 where the source of a page could describe an API endpoint (ideally serving a JSON object) and some form of templating to display data.

For instance:

  • have a /issues/index.md page with:
---
source: https://github.com/api/blahblah
layout: issues

---
  • have a /layouts/issues.jade file such as
each issue in issues
  li= issue.name
    a(href=issue.link) issue.description

This should be fairly easy with Metalsmith and the metadata plugin after an API fetch to file step, or by creating a plugin that directly consumes the API at each generation run (which could be based on the contentful or primsic metalsmith plugins which do this).

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

1 participant