{"action":"opened","issue":{"url":"https://api.github.com/repos/Ceasar/staticjinja/issues/72","repository_url":"https://api.github.com/repos/Ceasar/staticjinja","labels_url":"https://api.github.com/repos/Ceasar/staticjinja/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/Ceasar/staticjinja/issues/72/comments","events_url":"https://api.github.com/repos/Ceasar/staticjinja/issues/72/events","html_url":"https://github.com/Ceasar/staticjinja/issues/72","id":173790425,"number":72,"title":"Rendering from data (not individual files)","user":{"login":"u8sand","id":1341861,"avatar_url":"https://avatars.githubusercontent.com/u/1341861?v=3","gravatar_id":"","url":"https://api.github.com/users/u8sand","html_url":"https://github.com/u8sand","followers_url":"https://api.github.com/users/u8sand/followers","following_url":"https://api.github.com/users/u8sand/following{/other_user}","gists_url":"https://api.github.com/users/u8sand/gists{/gist_id}","starred_url":"https://api.github.com/users/u8sand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u8sand/subscriptions","organizations_url":"https://api.github.com/users/u8sand/orgs","repos_url":"https://api.github.com/users/u8sand/repos","events_url":"https://api.github.com/users/u8sand/events{/privacy}","received_events_url":"https://api.github.com/users/u8sand/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-29T14:40:21Z","updated_at":"2016-08-29T14:40:21Z","closed_at":null,"body":"I had a use-case where I created a static webpage to display information available in a database. In particular it required me to create my own render function/loop:\r\n\r\n```\r\ndef render(template, dump, **kwargs):\r\n  ''' Render custom page with jinja template engine '''\r\n  print('Rendering %s...' % (dump))\r\n  site.get_template(template).stream(**dict(config.funcs, **kwargs)).dump(os.path.join(config.build, dump))\r\n\r\nfor post in posts:\r\n  render('_post.html', 'post/%s.html' % (post['id']), **post.items())\r\n```\r\n\r\nWould there be a way to register these pages with staticjinja such that they would be regenerated if the underlying `_post.html` page was changed. Perhaps even a \"changed\" hook could be exposed so that the underlying data could report changes and get it regenerated.\r\n\r\nI'm specifically interested if there is already a way to do this, else I may fork and contribute a solution if you're interested.\r\n"}}
{"actor":{"display_login":"u8sand"}}