Skip to content

Markdown support #331

Open
Open

Description

@jingsam

Any plan to add markdown support?

Activity

  1. pepelsbey commented on Sep 3, 2018

    @pepelsbey
    Contributor

    How exactly you see it? Make it a proper feature request :)

    Currently we find HTML easy enough to write to keep it default format. Also Markdown would require tons of hacks to attach class names or even inline styles to elements, which is crucial for any presentation that want to use built-in theme features or create some custom styles. Otherwise it would be just a boring PowerPoint slides with bullet lists and heading.

  2. jingsam commented on Sep 3, 2018

    @jingsam
    Author

    Why developers love markdown? Because it is simple, human readable and expressive. With markdown, users do not need to remember the tags and classes to build a slide. It is also easy to be read and edit. Some similar projects like reveal.js, remark all have markdown support. These projects do not just produce boring bullet lists and heading slides. Markdown syntax can be extended to fit the specific needs of slides, which does not mean just bullet lists and heading.

    I admit that HTML is more powerful and covering more use cases than markdown. But it brings more complexities and inconveniences. I think it's ok to use HTML as internal format for the shower engine. Parsing markdown does not need much hacks, as there have a lot of open sources libraries such as marked.

  3. sergeicodes commented on Sep 3, 2018

    @sergeicodes
    Member

    @jingsam I think using markdown for slides is totally different approach of creating slides. How would you like combine it with shower?

    With markdown you will lose the freedom of creating really custom unique slides - that's what people like about shower I guess. I tried several presentation engines and decided to stick with shower, cause when you got familiar with it, it gives you so much power and freedom.

  4. jingsam commented on Sep 3, 2018

    @jingsam
    Author

    Adding markdown support does not mean dropping current HTML style. We can add a transforming tool that paring markdown to shower html elements.

    In my point of view, the most use cases of shower is for simple and quick presentation, such as technique talks. If users need a really custom unique slides that have unique style and complex transitions, I think they would choose PowerPoint or Keynote.

  5. pepelsbey commented on Sep 3, 2018

    @pepelsbey
    Contributor

    @jingsam but could you please show how you’d write something like this using Markdown? Just a few slides from Ribbon theme demo page. Do you want the whole presentation to become MD file or you want everything inside of <body> to be formatted in Markdown, or just inside of slides?

    Markdown support is a too vague feature request.

  6. jingsam commented on Sep 3, 2018

    @jingsam
    Author

    Maybe we could add a interface like this:

    new shower({
      source: "./readme.md",
      ratio: "16:9",
      ....
    })
    

    I have found someone use markdown to generate shower slides:

    image

    image

  7. jingsam commented on Sep 3, 2018

    @jingsam
    Author

    I found a code snippet in index.html:

        <section class="slide">
            <h2>Code samples</h2>
            <pre>
                <code>&lt;!DOCTYPE html&gt;</code>
                <code class="mark">&lt;html lang="en"&gt;</code>
                <code><mark>&lt;head&gt;</mark> <span class="comment">&lt;!--Comment--&gt;</span></code>
                <code>    &lt;title&gt;Shower&lt;/title&gt;</code>
                <code>    &lt;meta charset="<mark class="important">UTF-8</mark>"&gt;</code>
                <code>    &lt;link rel="stylesheet" href="screen.css"&gt;</code>
                <code><mark>&lt;/head&gt;</mark></code>
            </pre>
        </section>
    

    I don't think any users like to highlight code like this. Use Github Flavored Markdown is more convenient:

    ```javascript
       \\ some js code
    ```
    
  8. pepelsbey commented on Sep 3, 2018

    @pepelsbey
    Contributor

    I totally agree that code samples workflow is far from being optimal, but there’s PR for that that might fix some problems and will be probably integrated to shower-cli, have you see it? It’s still WIP, but we’ll feature it soon on @shower_me Twitter.

    From the screenshots above I only see that you want speakers to bore an audience to death with the convenience of headings and lists. But I specifically asked you to imagine how you’d write slides using rich Shower features, not plain lists and headings. Let’s try again: how you’d write sample presentation like this using Markdown instead of HTML?

  9. pepelsbey commented on Sep 3, 2018

    @pepelsbey
    Contributor

    Speaking of

    new shower({
      source: "./readme.md",
      ratio: "16:9",
      ....
    })
    

    This is exactly what made me start (and keep developing) my own presentation engine. I hate complexity and limitations of Reveal.js and such tools. So this never going to happen. I want to keep Shower as simple and declarative as possible. No JS for enabling features, but declarative tags or attributes. No configs, but smart defaults or CLI tools with flags.

    Everything should just work once you open index.html in a browser on any computer. Without build steps, sometimes even without JS! There might be some intermediate formats like Markdown to be converted to HTML, but they should be fully-featured to enable speakers to create rich and interesting presentations.

  10. mfrigerio17 commented on May 20, 2019

    @mfrigerio17

    Markdown support should not be "internal" in shower, the ideal would be an extension to exisiting markdow engines to generate shower-compatible HTML.

    @pepelsbey

    Everything should just work once you open index.html in a browser on any computer. Without build steps, sometimes even without JS!

    I like this, totally agree

    @pepelsbey

    Do you want the whole presentation to become MD file or you want everything inside of to be formatted in Markdown, or just inside of slides?

    The whole presentation. Markdown allows to insert regular html code, which is left untouched during the markdown-to-html conversion. So one can always resort to direct html programming to exploit the features of shower (if I understand correctly, @pepelsbey's main objection is that with Markdown one would loose expressiveness)
    On the other hand, I want to write something like this

    [slide]
    # Shower key features
     - Built on HTML, CSS and JavaScript
    - Works in all modern browsers
    - Themes are separated from engine
    ...
    [note](Shower ['ʃəuə] noun. A person or thing that shows.)
    

    rather than the html tags. Also, support for code highilighting would come for free from existing markdown extensions.

  11. pepelsbey commented on May 23, 2019

    @pepelsbey
    Contributor

    @mfrigerio17 just like you I absolutely adore Markdown, I use it myself every day. But when it comes to not just writing structured plain text, but something a bit more complicated, I always switch to HTML.

    For example, here’s the typical slide from the last presentation I made:

    <section class="slide clear" style="background: #302683">
        <a href="https://htmlacademy.ru/">
            <img class="place" width="700"
                src="pictures/projects/html-academy.svg"
                alt="HTML Academy">
        </a>
        <img class="place next" style="margin: -100px 0 0 -350px" width="128" src="pictures/academy/1.svg" alt="">
        <img class="place next" style="margin: 170px 0 0 65px" width="128" src="pictures/academy/2.svg" alt="">
        <img class="place next" style="margin: -150px 0 0 300px" width="128" src="pictures/academy/3.svg" alt="">
    </section>

    image

    How am I supposed to write something like this in Markdown?

  12. mfrigerio17 commented on May 29, 2019

    @mfrigerio17

    How am I supposed to write something like this in Markdown?

    You don't.

    In the same file, use markdown (with some appropriate, simple extensions (e.g. [slide])) whenever suitable, pure html otherwise (like in your example). The markdown engine (markdown-to-html converter) converts the markdown sections, and leaves untouched the html sections.

    From the original docs

    For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.

    So, as I said, an extension to a markdown engine (like python-markdown ) might be very useful here. I think.

    [slide]
    # This is a very simple slide
     - Just some structured text here
    
    <section class="slide clear" style="background: #302683">
      <h2>This is a complex one</h2>
      <p class="fancy"> whatever </p>
    </section>
    
  13. pepelsbey commented on May 30, 2019

    @pepelsbey
    Contributor

    I can only see it as a CLI feature that might work this way: you have your index.md with HTML/MD mix that can be converted to HTML and published.

    I don’t see it as a part of the Shower itself. I won’t take MD in HTML files option seriously, like Reveal.js unfortunately does.

    @nikolay-govorov, what do you think?

  14. mrdimidium commented on May 31, 2019

    @mrdimidium

    We can discuss the possibility of passing in a CLI not index.html, and index.md, but it is important to understand that now shower just works — CLI adds, but does not take away. Markdown support breaks backward compatibility.

    In addition, you may need Markdown — a rather limited syntax. I'm not sure sewing it into the CLI is a good idea. Perhaps we should make it possible to add third-party plugins to the CLI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions