Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added examples for org-mode and markdown #280

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/examples/clojure-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<link rel="stylesheet" type="text/css" href="https://storage.googleapis.com/app.klipse.tech/css/codemirror.css" />

# sample Clojure code
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lambda-knight
Sorry for the late reply.
Can you share the cli command you run in order to generate the html file?

I tried to use marked but it generates only the body of the html

$ marked docs/examples/clojure-example.md
<link rel="stylesheet" type="text/css" href="https://storage.googleapis.com/app.klipse.tech/css/codemirror.css" />

<h1 id="sample-clojure-code">sample Clojure code</h1>
<pre><code class="language-clj">(map inc &#39;(1 2 3 4 5 6 7 8 9 10))</code></pre>
<script type="text/javascript">window.klipse_settings = {selector: '.language-clj'};</script>
<script src="https://storage.googleapis.com/app.klipse.tech/plugin/js/klipse_plugin.js"></script>

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lambda-knight @MageMasher Can you share the cli command you run in order to generate the html file?


``` clj
(map inc '(1 2 3 4 5 6 7 8 9 10))
```

<script type="text/javascript">window.klipse_settings = {selector: '.lang-clj'};</script>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'.lang-clj' => '.language-clj', otherwise it worked great!

<script src="https://storage.googleapis.com/app.klipse.tech/plugin/js/klipse_plugin.js"></script>
20 changes: 20 additions & 0 deletions docs/examples/org-clojure-demo.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#+html_head_extra: <link rel="stylesheet" type="text/css" href="https://storage.googleapis.com/app.klipse.tech/css/codemirror.css" />

* Sample Clojure code

** sample defn

#+BEGIN_SRC clojure
(defn add [x y]
(+ x y))
#+END_SRC

** sample invoking function
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having Klipse integrated with org mode is awesome!

Two things:

  1. What kind of specific use cases do you have in mind?
  2. There is a CSS conflict somewhere. In the Klipse snippets there is a light trail separating lines of code (see screenshot below).
    image


#+BEGIN_SRC clojure
(add 1 2)
#+END_SRC

#+html: <script type="text/javascript">window.klipse_settings = {selector: '.src-clojure'};</script>
#+html: <script src="https://storage.googleapis.com/app.klipse.tech/plugin/js/klipse_plugin.js"></script>