{"html_url": "https://github.com/simonw/datasette/issues/1688#issuecomment-1079582485", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1688", "id": 1079582485, "node_id": "IC_kwDOBm6k_c5AWR8V", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-26T03:15:34Z", "updated_at": "2022-03-26T03:15:34Z", "author_association": "OWNER", "body": "Yup, you're right in what you figured out here: stand-alone plugins can't currently package static assets other then using the static folder.\r\n\r\nThe `datasette-plugin` cookiecutter template should make creating a Python package pretty easy though: https://github.com/simonw/datasette-plugin\r\n\r\nYou can run that yourself, or you can run it using this GitHub template repository: https://github.com/simonw/datasette-plugin-template-repository \r\n\r\n", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1181432624, "label": "[plugins][documentation] Is it possible to serve per-plugin static folders when writing one-off (single file) plugins?"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1689#issuecomment-1079779040", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1689", "id": 1079779040, "node_id": "IC_kwDOBm6k_c5AXB7g", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-26T21:35:57Z", "updated_at": "2022-03-26T21:35:57Z", "author_association": "OWNER", "body": "Fixed: https://docs.datasette.io/en/latest/internals.html#add-message-request-message-type-datasette-info", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1182065616, "label": "datasette.add_message() documentation is incorrect"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1690#issuecomment-1079788346", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1690", "id": 1079788346, "node_id": "IC_kwDOBm6k_c5AXEM6", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-26T22:42:40Z", "updated_at": "2022-03-26T22:42:40Z", "author_association": "OWNER", "body": "I don't want to do a `response.set_actor_cookie()` method because I like `Response` not to carry too many Datasette-specific features.\r\n\r\nSo `datasette.set_actor_cookie(response, actor, expire_after=None)` would be a better place for this I think.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1182141761, "label": "Idea: `datasette.set_actor_cookie(response, actor)`"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1690#issuecomment-1079788375", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1690", "id": 1079788375, "node_id": "IC_kwDOBm6k_c5AXENX", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-26T22:43:00Z", "updated_at": "2022-03-26T22:43:00Z", "author_association": "OWNER", "body": "Then I can update this section of the documentation which currently recommends the above pattern: https://docs.datasette.io/en/stable/authentication.html#the-ds-actor-cookie", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1182141761, "label": "Idea: `datasette.set_actor_cookie(response, actor)`"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1688#issuecomment-1079550754", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1688", "id": 1079550754, "node_id": "IC_kwDOBm6k_c5AWKMi", "user": {"value": 9020979, "label": "hydrosquall"}, "created_at": "2022-03-26T01:27:27Z", "updated_at": "2022-03-26T03:16:29Z", "author_association": "NONE", "body": "> Is there a way to serve a static assets when using the plugins/ directory method instead of installing plugins as a new python package?\r\n\r\nAs a workaround, I found I can serve my statics from a non-plugin specific folder using the [--static](https://docs.datasette.io/en/stable/custom_templates.html#serving-static-files) CLI flag.\r\n\r\n```bash\r\ndatasette ~/Library/Safari/History.db \\\r\n --plugins-dir=plugins/ \\\r\n --static assets:dist/\r\n```\r\n\r\nIt's not ideal because it means I'll change the cache pattern path depending on how the plugin is running (via pip install or as a one off script), but it's usable as a workaround.\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1181432624, "label": "[plugins][documentation] Is it possible to serve per-plugin static folders when writing one-off (single file) plugins?"}, "performed_via_github_app": null}