Coder Social home page Coder Social logo

Comments (10)

uvtc avatar uvtc commented on May 20, 2024 2

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.

uvtc avatar uvtc commented on May 20, 2024 1

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.

jgm avatar jgm commented on May 20, 2024 1

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.

uvtc avatar uvtc commented on May 20, 2024 1

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.

wooorm avatar wooorm commented on May 20, 2024 1

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.

uvtc avatar uvtc commented on May 20, 2024

That is, in https://htmlpreview.github.io/?https://github.com/jgm/djot/blob/master/doc/syntax.html.

from djot.

jgm avatar jgm commented on May 20, 2024

Well, it's hard to put three things in columns; there's not really enough room for them to display nicely.

from djot.

wooorm avatar wooorm commented on May 20, 2024

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)

Tabbed example from esbuild


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.

uvtc avatar uvtc commented on May 20, 2024

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.

waldyrious avatar waldyrious commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.