Comments (10)
Hm. Good point, @wooorm . Maybe it depends upon who the reader is. I suspect:
- if the reader just quickly wants to see which syntax yields what output, I think that "djot --> rendered html" will be most useful to them.
- if the reader wants a concise reference of djot behavior, then "djot --> raw html" may be most useful to them.
Anyhow though, regardless: the syntax reference in question happens to be using html for its output examples. The djot readme says djot is not HTML-centric. So, for users who are not targetting html as their output format (and who may not even know much html at all), it would help them to see some kind of rendered output.
Incidentally, I found this markdown doc that goes with three cols for the smaller examples, but then reverts to the sequential style when it gets to blockquotes and images.
from djot.
Since some of the examples are wide things like tables or hr's, maybe the rendered html could be displayed underneath both, in its own row that spans the two cols? Could even have a different background color than the jdot and html blocks/cells.
from djot.
I could try just having the rendered HTML.
Or to be really fancy, show the rendered HTML but allow clicking something to show the HTML.
from djot.
I think it's most valuable to be able to look at the jdot and the rendered html at the same time.
It could also be valuable to see the raw html sometimes.
Maybe optimal would be jdot markup and rendered html side-by-side, and then a click-to-reveal the raw html if the reader wants to see it.
from djot.
if the reader just quickly wants to see which syntax yields what output
This could partially also be solved with a cheatsheet-like page, something along the lines of https://commonmark.org/help/. The markdown doc you later link also is such a page.
from djot.
That is, in https://htmlpreview.github.io/?https://github.com/jgm/djot/blob/master/doc/syntax.html.
from djot.
Well, it's hard to put three things in columns; there's not really enough room for them to display nicely.
from djot.
I could try just having the rendered HTML.
Or to be really fancy, show the rendered HTML but allow clicking something to show the HTML.
Maybe something like this? (https://esbuild.github.io/getting-started/#bundling-for-the-browser)
I think it's most valuable to be able to look at the jdot and the rendered html at the same time.
I disagree. I find it more important to see what the function of jdot is: itβs input, and its output. Not how browsers render such output.
from djot.
I think @wooorm 's idea of a separate cheatsheet is a great idea.
@jgm , I'm ok with closing this issue, but am leaving it open in case you are still thinking about adding reveal buttons to the syntax reference.
from djot.
Note: even though there's now a cheatsheet (thanks for adding it in #39, @uvtc!), I still think it would be worth showing the rendered HTML output in the full syntax document.
from djot.
Related Issues (20)
- Explicit admonition types HOT 31
- Blockquote attribution / citation HOT 1
- Inclusion of other djot documents HOT 18
- Tight list and attributes HOT 1
- Task list item should allow for non-Latin checkmark HOT 4
- Limit numbers in ordered list markers HOT 5
- `[text][]` is shorthand for `[text][text]` β should `[text]()` mean `[text](text)`? HOT 3
- Footnote labels may contain spaces but not newlines
- Inline container precedence with attributes HOT 2
- Document implicit section behavior HOT 6
- Relax disallowing multiple words in `code block` / `div` first line? HOT 12
- Introduce leaf div (with `::`)
- Make `<section/>` wrappers optional (for HTML) HOT 4
- Normalize names of inline/block flavors HOT 2
- Canonical large-ish djot document (and related pandoc issues) HOT 5
- Parsing ambiguity: bracketed content followed by footnote? HOT 4
- Syntax for ruby (<ruby>) HOT 1
- Block level referencing and reuse syntax HOT 1
- URLs with parenthesis break parser HOT 1
- SyntaxError after installation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from djot.