Be nicer with strict Content-Security-Policy
This commit is contained in:
parent
237ff9754d
commit
f9a153c458
|
@ -178,6 +178,17 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
|
|||
</style>
|
||||
"""
|
||||
|
||||
MDTOREVEAL_JS = """
|
||||
Reveal.initialize({
|
||||
controls: true,
|
||||
progress: true,
|
||||
center: true,
|
||||
hash: true,
|
||||
disableLayout: false,
|
||||
plugins: [ RevealZoom, RevealNotes, RevealSearch, RevealMarkdown, RevealHighlight ]
|
||||
});
|
||||
"""
|
||||
|
||||
TPL = """
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
@ -216,16 +227,7 @@ TPL = """
|
|||
<script src="{{ revealjs_url }}/plugin/search/search.js"></script>
|
||||
<script src="{{ revealjs_url }}/plugin/markdown/markdown.js"></script>
|
||||
<script src="{{ revealjs_url }}/plugin/highlight/highlight.js"></script>
|
||||
<script>
|
||||
Reveal.initialize({
|
||||
controls: true,
|
||||
progress: true,
|
||||
center: true,
|
||||
hash: true,
|
||||
disableLayout: false,
|
||||
plugins: [ RevealZoom, RevealNotes, RevealSearch, RevealMarkdown, RevealHighlight ]
|
||||
});
|
||||
</script>
|
||||
<script src="mdtoreveal.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
|
@ -258,6 +260,7 @@ def main():
|
|||
|
||||
root = Path(args.html).resolve().parent
|
||||
(root / "mdtoreveal.css").write_text(MDTOREVEAL_CSS)
|
||||
(root / "mdtoreveal.js").write_text(MDTOREVEAL_JS)
|
||||
reveal_dir = f"reveal.js-{REVEAL_JS_VERSION}"
|
||||
reveal_path = root / reveal_dir
|
||||
if not reveal_path.exists():
|
||||
|
|
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||
|
||||
[project]
|
||||
name = "mdtoreveal"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
description = "Transform a flat markdown to a reveal.js presentation."
|
||||
authors = [
|
||||
{ name = "Julien Palard", email = "julien@palard.fr" },
|
||||
|
|
Loading…
Reference in New Issue