Skip to content

RyanGreenup/orghtml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Org-Mode HTML Converter with Syntax Highlighting

A Rust program that converts Org-mode text to HTML with syntax highlighting. It reads Org-mode content from standard input and outputs HTML to standard output with syntaxh highlighted code blocks.

This is a very small simple binary that I'm using in Chalsedony.

Usage

git clone https://github.com/RyanGreenup/orghtml
cargo install --path .
org2html < ~/Agenda/todo.org > /tmp/file.html
firefox /tmp/file.html

Example

The program reads Org-mode content from stdin and writes the HTML output to stdout. Code blocks in your Org file should specify the language using the standard Org-mode syntax:

#+TITLE: An example for the Readme

* Code Block

Here is a code block:

#+begin_src python
def hello():
    print("Hello, World!")
#+end_src
<main>
  <section></section>
  <h1>Code Block</h1>
  <section>
    <p></p>
    <p>Here is a code block:
  </p>
  <pre>
  <code class="language-python">
  <span style="font-weight:bold;color:#a71d5d;">
  def </span><span style="font-weight:bold;color:#323232;">hello</span><span style="color:#323232;">():
    </span><span style="color:#62a35c;">print</span><span style="color:#323232;">(</span><span style="color:#183691;">&quot;Hello, World!&quot;</span><span style="color:#323232;">)
  </span></code></pre></section>
</main>

License

This project is open source and available under the GPL3 License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages