-
Notifications
You must be signed in to change notification settings - Fork 23
Improved examples #67
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
Conversation
… compacting and turning into RDF (both tabular, Turtle/TriG representations). Fixes #26.
Does the Preview / Diff happen automagically somehow? Should I wait for it to appear? |
It’s supposed to happen automatically, and may still. You can always see it with rawgit. |
We may want to consider styling for print, which could expand all parts of the examples, and add some sub-example headers. |
I am not sure why the preview does not work. In any case https://rawgit.com/w3c/json-ld-syntax/improved-examples/index.html is the right rawgit reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it a lot!
I wonder whether there is a way to force a colored syntax output for the expanded form and for Turtle. While this may be available in JSON I however doubt that there is a syntax coloring tool for Turtle, though...
S when we add comments or emphasis, we need to turn off the syntax highlighting. |
@gkellogg this looks great, thank you! @iherman I filed an issue for supporting Turtle highlighting back in 2017. It seems Respec uses highlight.js which (still) lacks a Turtle highlighter. If we make one for highlight.js, then Respec can integrate that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it!
Regarding syntax highlighting for Turtle, there is a PR for highlight.js that adds Turtle and SPARQL support, but has been sitting in limbo for quite some time: |
Part of the problem for us using syntax highlighting is that we markup our examples with |
Makes most of the changes called for in #26.
Tabbed UI could use some styling assistance.
There remain some examples which didn't make sense to use the tabular format, and in some cases, examples are interrelated (as before), but include attributes to allow them to be checked against each other.
Examples do not include graphical images representing the equivalent graphs. These would add even more of a burden, and each would require it's own separate accessibility explanation, so doesn't seem worth it. That said, we may want to include more graphics on a case-by-case basis.
Visually, the document is somewhat shorter, but the HTML source is inflated quite a bit. I'm not in favor of splitting the document into multiple parts, regardless.