Skip to content

Conversation

@cpmech
Copy link

@cpmech cpmech commented Feb 5, 2021

This PR creates a directory named templates where HTML files using CDN could be added to. Based on #2893

This could be an even easier way for beginners to start using reveal.js. They can simply edit the HTML file and "hit refresh" on their browser.

Those using Debian/Ubuntu/Linux could use the accompanying xmonitor.bash script, but this should not be recommended to beginners.

The documentation should say:

"It only takes a second to get set up. Learn how to create your first presentation in the installation instructions!"

And the installation instructions should recommend the CDN usage first (templates directory) because not everyone would have Node.JS installed nor would be willing to install GIT, NPM, etc...

markdown

PS: On a side note, it's important to explain that RevealHighlight must be loaded AFTER RevealMarkdown.

Best,

@Izhaki
Copy link

Izhaki commented Apr 3, 2021

@hakimel What's stopping merging this?

@lasjaz
Copy link

lasjaz commented Sep 25, 2021

Good morning

@swirly
Copy link

swirly commented Nov 7, 2021

I found the project and use it with cdnjs, which is really the simpler way for me.
This PR is really a great addition

@cpmech
Copy link
Author

cpmech commented Nov 7, 2021

I'm glad it helps :-)

@lasjaz
Copy link

lasjaz commented Nov 8, 2021 via email

@swirly
Copy link

swirly commented Nov 16, 2021

I do not use node.js, I don't download js files. I use them directly with cdnjs. Here is what my code looks like

<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- feuilles de style -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2/reveal.min.css" 
        integrity="sha512-WFGU7IgfYR0dq5aORzbD+NApAXdExNZFb7LaoO8olYImBW/iZxAwjKEuT+oYcFR6gOd+DAFssq/icMn8YVbQxQ==" 
        crossorigin="anonymous" referrerpolicy="no-referrer" />    
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2/theme/white.min.css" 
        integrity="sha512-RoEy1xOWgzryoplQ1g0eNHizP2BRqEq8eLGpRyI6OvM2FvmxpUyiPotvW4rp/I67VN6eFq4DDXQNcFKbNZ5Rrg==" 
        crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2/plugin/highlight/monokai.min.css" 
        integrity="sha512-z8wQkuDRFwCBfoj7KOiu1MECaRVoXx6rZQWL21x0BsVVH7JkqCp1Otf39qve6CrCycOOL5o9vgfII5Smds23rg==" 
        crossorigin="anonymous" referrerpolicy="no-referrer">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/styles/vs2015.min.css" 
        integrity="sha512-mtXspRdOWHCYp+f4c7CkWGYPPRAhq9X+xCvJMUBVAb6pqA4U8pxhT3RWT3LP3bKbiolYL2CkL1bSKZZO4eeTew==" 
        crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="style/light.css">
</head>
<body>
    <div class="reveal">

        <div class="slides">

            <!-- Use external markdown resource, separate slides by three dashes; vertical slides by two dashes -->
            <section>
                <section data-markdown="base-python/variables.md" data-separator="^\n---\n" data-separator-vertical="^\n--\n"></section>
            </section>
        </div>
    </div>

    <!-- javascript -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2/reveal.js" 
        integrity="sha512-46BlbGDQDy4ki38kj1yCeCSSQXyyZUHsqDX02+RZaTYdrJL+Sqr6TGrwlSP8soII5Dk4SZDb2bDRcmcyHmYAvQ==" 
        crossorigin="anonymous" referrerpolicy="no-referrer">
    </script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2/plugin/markdown/markdown.min.js" 
        integrity="sha512-VMIcHSU7cVYRxUYr9l/t/iRO98QUfuTw8inT0mFklWb6HhKwLkjA0F24O42RL39RKGenNEK/TlEWB2NEy8w4Ng==" 
        crossorigin="anonymous" referrerpolicy="no-referrer">
    </script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2/plugin/highlight/highlight.min.js" 
        integrity="sha512-NVdqCvsrfhXUYzGTEGGBFf5jxheVVcglfdvO8r+WdG0BKMrRYvaiCGIC0S+wf4hkE3Xq43gTd1k3Mwl/UNgdvw==" 
        crossorigin="anonymous" referrerpolicy="no-referrer">
    </script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2/plugin/notes/notes.min.js" 
        integrity="sha512-yXOjsMbgGf4hR0LU+GpyMvCxK0cQ4oYEwBbW0DTVW+hFsMmuN86J60roDyj5ge9b9xLpzV7YLVVBpYh3eoPBJg==" 
        crossorigin="anonymous" referrerpolicy="no-referrer">
    </script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2/plugin/math/math.min.js" 
      integrity="sha512-3HmB6PODGpVVNHOzPd/iva9nhAtO8o5lNh8ukjgcswV+iQTRZFqdMWJW25dvcSploiX4I4M6uuUKIV9BaogQhw==" 
        crossorigin="anonymous" referrerpolicy="no-referrer">
    </script>    
    <script>
        Reveal.initialize({
            controls: true,
            progress: true,
            history: true,
            center: true,
            touch: true,
            autoAnimateDuration: 0.5,
            plugins: [ RevealMarkdown, RevealHighlight, RevealNotes, RevealMath ]
        });

    </script>

</body>

</html>

Just have to add the correct markdown file and "voila"

I think this should be added to templates no ?

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.

4 participants