All Projects → gongzhitaao → Orgcss

gongzhitaao / Orgcss

Licence: other
Simple and clean CSS for Org-exported HTML

Projects that are alternatives of or similar to Orgcss

org-tanglesync.el
A package to pull external changes into an org-mode source block if that block is tangled to an external file
Stars: ✭ 80 (-70.48%)
Mutual labels:  org-mode
vim-minimd
A fast, folding Markdown outliner for Vim
Stars: ✭ 27 (-90.04%)
Mutual labels:  org-mode
ob-ess-julia
A lightweight Julia support for org mode using Emacs Speaks Statistics
Stars: ✭ 16 (-94.1%)
Mutual labels:  org-mode
org-babel-eval-in-repl
Send and eval org-mode babel code blocks in various REPLs (therefore it's async)
Stars: ✭ 49 (-81.92%)
Mutual labels:  org-mode
talks
Resources to various talks given by 200ok team members at various locations.
Stars: ✭ 33 (-87.82%)
Mutual labels:  org-mode
org-starter
Configure files and directories in Org mode more easily
Stars: ✭ 73 (-73.06%)
Mutual labels:  org-mode
Eorg
new version: https://github.com/SoftMaple/Editor
Stars: ✭ 27 (-90.04%)
Mutual labels:  org-mode
Org Projectile
Manage org-mode TODOs for your projectile projects
Stars: ✭ 259 (-4.43%)
Mutual labels:  org-mode
org-notes-style
A light CSS theme for Org mode HTML export
Stars: ✭ 20 (-92.62%)
Mutual labels:  org-mode
org-roam-server-light
compatible org-roam-server written in python for better performance with large network graphs
Stars: ✭ 27 (-90.04%)
Mutual labels:  org-mode
knowledge-base
Personal Wiki
Stars: ✭ 16 (-94.1%)
Mutual labels:  org-mode
emacs-habitica
Emacs Extension for Habitica
Stars: ✭ 61 (-77.49%)
Mutual labels:  org-mode
org-sort-tasks
Functions to keep TODO tasks in orgmode sorted and organized.
Stars: ✭ 26 (-90.41%)
Mutual labels:  org-mode
preview-org-html-mode
Emacs minor mode for an (optionally) live preview of Org exports to HTML using Xwidgets.
Stars: ✭ 16 (-94.1%)
Mutual labels:  org-mode
Org Roam Bibtex
Connector between Org-roam, BibTeX-completion, and Org-ref
Stars: ✭ 253 (-6.64%)
Mutual labels:  org-mode
zettel-mode
A Zettelkasten-style note-taking helper
Stars: ✭ 32 (-88.19%)
Mutual labels:  org-mode
emacs.d
My personal emacs setup.
Stars: ✭ 27 (-90.04%)
Mutual labels:  org-mode
Org Transclusion
(alpha) Emacs package to enable transclusion with Org Mode
Stars: ✭ 251 (-7.38%)
Mutual labels:  org-mode
Mu4e Dashboard
A dashboard for mu4e (mu for emacs)
Stars: ✭ 259 (-4.43%)
Mutual labels:  org-mode
.emacs.d
Vanilla, Evil, literate Emacs configuration
Stars: ✭ 62 (-77.12%)
Mutual labels:  org-mode

OrgCSS - Stylesheet for Org-exported HTML

License: MIT LICENSE 996.icu

Table of Contents

Usage

Add the following setup to your org file to use the stylesheet.

#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://gongzhitaao.org/orgcss/org.css"/>

Caveats

As the Orgmode is frequently updated, the structure of the exported source code is changed drastically. As a result, I added tags (since Orgmode v9.1.4) to indicate the corresponding Orgmode version.

Code Highlight

When exported to HTML, there are three options for code highlighting, controlled by the variable org-html-htmlize-output-type.

  1. (setq org-html-htmlize-output-type 'inline-css)

    This is the default setting. It highlights the code according to the current Emacs theme you are using. It directly applies color to the code with inline styles, e.g., int.

    The problem is that the highlight theme depends on the Emacs theme. If you use a dark theme in your Emacs but a light theme (usually we like light themed web pages) web pages, the exported code are hardly illegible due to the light font color, or vice versa.

  2. (setq org-html-htmlize-output-type nil)

    This configuration disables highlighting by htmlize. You may use a third-party Javascript highlight library. I recommend highlight.js if I need code highlight. There are two problems:

    1. The problem is that you have to rely on highlight.js support on a certain language which is occasionally missing, e.g., emacs-lisp, org, etc.
    2. highlight.js by default does not recognized the tags and classes exported by org mode. You need some extra Javascript code in your Org file.
  3. (setq org-html-htmlize-output-type 'css)

    This is my preferred way. If you use my org.css, then set this option in your init file and you are all set.

    This is similar to the first optional, instead of using inline styles, this will assign classes to each component of the code, e.g., <span class="org-type">int</span>, and you could create your own stylesheet for .org-type.

    To obtain a list of all supported org classes, run M-x org-html-htmlize-generate-css. This will create a buffer containing all the available org style class names in the current Emacs session (refer to src/css/htmlize.css for an example).

    Note: remember to (setq org-html-head-include-default-style nil) to avoid any unexpected styles from the default styles, see Issue #14.

Related

The CSS classes used by ox-html are documented here.

  1. fniessen/org-html-themes
  2. mowen/gist326524
  3. Web Pages Made with Org-Mode
  4. thomasf/solarized-css
  5. org-spec
  6. Organize Your Life In Plain Text!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].