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 to convey viewers out-of-band using metadata #58

Merged
merged 5 commits into from
Jan 20, 2022
Merged

Allow to convey viewers out-of-band using metadata #58

merged 5 commits into from
Jan 20, 2022

Conversation

mk
Copy link
Member

@mk mk commented Jan 20, 2022

Clerk's viewer api has been based on functions. This isn't always what you want as it performs a transformation of your data. If this isn't what you want because you depend the unmodified value downstream. You can alternatively use metadata using the :nextjournal.clerk/viewer to convey the viewer. Valid values are viewer functions or keywords. The latter being useful when you don't want a hard dependency on Clerk.

See https://snapshots.nextjournal.com/clerk/build/1359a4f677bfac3fa33cf4c68df1dd62947af57f/index.html#/notebooks/viewer_api_meta.clj
CleanShot 2022-01-20 at 09 22 41@2x

@mk mk merged commit e898307 into main Jan 20, 2022
@mk mk deleted the meta-viewers branch January 20, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant