GithubHelp home page GithubHelp logo

ox-twbs's Introduction

ox-twbs

Summary

Export org-mode docs as HTML compatible with Twitter Bootstrap.

Example

The following org source exports to this html.

Description

Output your org-mode docs with a simple, clean and modern look.

This library implements a new HTML back-end for exporting org-mode docs as HTML compatible with Twitter Bootstrap. By default, HTML is exported with jQuery and Bootstrap resources included via osscdn.

Derived from the built-in HTML back-end of GNU Emacs, ox-html.el, which was written by Carsten Dominik and Jambunathan K.

Install

via package.el

Latest builds available on MELPA and for a bit more stability, use MELPA Stable. You can install ox-twbs using the following command:

M-x package-install [RET] ox-twbs [RET]

If the installation doesn’t work try refreshing the package list:

M-x package-refresh-contents [RET]

Manual

Put ox-twbs.el in your load path and require it. Alternatively, open ox-twbs.el in your buffer and run package-install-file, which will compile and install the package in your package folder.

Usage

Open or create an org file and run org-twbs-export-to-html. This will create an HTML file in the same dir as your org file.

You will more likely want more control and automation of the export process. You can read the org-mode docs on setting up your project. An example configuration might look like:

(setq org-publish-project-alist
      '(("org-notes"
         :base-directory "~/org/"
         :publishing-directory "~/public_html/"
         :publishing-function org-twbs-publish-to-html
         :with-sub-superscript nil
         )))

Using the above config, you can run: org-publish-all

And you might create a function which publishes the current buffers file and opens it in your system’s default browser. Here is what I use in my emacs config:

(defun my-org-publish-buffer ()
  (interactive)
  (save-buffer)
  (save-excursion (org-publish-current-file))
  (let* ((proj (org-publish-get-project-from-filename buffer-file-name))
         (proj-plist (cdr proj))
         (rel (file-relative-name buffer-file-name
                                  (plist-get proj-plist :base-directory)))
         (dest (plist-get proj-plist :publishing-directory)))
    (browse-url (concat "file://"
                        (file-name-as-directory (expand-file-name dest))
                        (file-name-sans-extension rel)
                        ".html"))))

And bind the above command. I’m on OSX and happen to use CMD-\.

(add-hook 'org-mode-hook
          (lambda ()
            (local-set-key (kbd "s-\\") 'my-org-publish-buffer)))

General Org Tips

To specify a title of your org doc, other than the default:

#+TITLE: My Doc

To quickly add blocks, check this easy template section of org manual.

Be sure to understand how to edit source code blocks.

Controlling depth of section numbers, table of contents and headings can be controlled per document via a declaration like the following:

#+OPTIONS: num:5 whn:2 toc:4 H:6

And to set these via your publish configuration using the org-publish-project-alist, the options would be :section-numbers, :headline-levels and :with-toc.

The above options are described in the export settings section of the orgmode manual. This component introduces a new setting whn for per document, and :with-headline-numbers for publish config, which controls the display of section numbers. To disable, set to nil, to enable, set to t, and to control depth of display, use a whole number.

Note re: latest Org 8.3.x

Traditionally preventing section numbers from display was accomplished via the :section-numbers option, however, in 8.3.x, setting it to nil now also eliminates the numbering from the parsed document, which then breaks toc and linking. Therefore, this module introduces a new option :with-headline-numbers which can be used for toggling display of section numbers.

Customize

The first place to look is in the definition of org-twbs-head. You can set this on a per-file basis using #+HTML_HEAD:, or for publication projects using the :html-head property.

Todo

Contributions are welcome! A list of potential fixes and enhancements follows:

  • Allow users to more easily add a Twitter Bootstrap theme
  • Document areas where this package deviates from org-mode manual on HTML export
  • Improve Affix.js plugin scroll-spying/following
  • Ensure this package works well with org’s sitemap function

ox-twbs's People

Contributors

ajsteven130 avatar bricewge avatar ibnishak avatar jgkamat avatar marsmining avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ox-twbs's Issues

link to an absolute filepath still being generated with the current dir prepended

Hello,

I enjoyed your ox-twbs add-on a lot, but recently I experienced a technical difficulty:
When I insert a reference to a file, e.g., [[C:\Users\Da\Documents\work\notes\IT\Mac\somefile.org]], the html file rendered the link as
file:///C:/Users/Da/Dropbox/GTD/weekly_summary/c:/Users/Da/Documents/work/notes/IT/Mac/somefile.html

I tried to set the following:
(setq-default org-twbs-link-use-abs-url nil)
But the behavior was not changed.

Can you shed some light on this issue?
Thanks!

Da

Printing nil if a heading has CUSTOM_ID but no immediate text

The below example will explain this problem better than the title:

# more heading before this, not pasted here
* Blocks
:PROPERTIES:
:CUSTOM_ID: blocks
:END:
*** Normal blocks
: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
: eiusmod tempor incididunt ut labore et dolore magna aliqua.

I took the above example from your example org file for twbs export. The only change is that I added the CUSTOM_ID property.

clipboard01


If I put some content under that heading before the sub-heading, the nil string does not get printed.

# more heading before this, not pasted here
* Blocks
:PROPERTIES:
:CUSTOM_ID: blocks
:END:
some content
*** Normal blocks
: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
: eiusmod tempor incididunt ut labore et dolore magna aliqua.

export breaks when using both toc: t and \n:t in org-options

Hello,
I suddenly realized how FANCY your floating table of content is, by accidentally running someone's org file. However, when I used my old org files, I came across an error:
when I want to enable TOC and \n simultaneously, the exporter report the following error:
org-html-close-tag: Wrong type argument: char-or-string-p, nil

A sample code:

+OPTIONS: H:1 num:2 toc:t

+OPTIONS: \n:t

I tried the standard org-html-export, and the export works fine.
I assume this is an error in the ox-twbs.

Thanks for the great work!

Da Zhang

Export HTML not as source code

Is there a way to export HTML not as source code?

For example I would like to do something like:

+BEGIN_HTML

# +END_HTML

But ox-twbs always exports it in a source code block instead of rendering the HTML as-is. ox-html seems to "correctly" export HTML.

Symbol’s value as variable is void: org-link-escape-chars-browser

Emacs-version: GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-08-11
org-mode-version: Org-mode version 8.3.5 (release_8.3.5-1062-g0fa7f9)

Just tried this package out and this issue came up when trying to export.
I can't find any reference to this variable in my org version.
Currently I just changed it to org-link-escape-char, not sure it's a fix but it seems to not hickup.

Problem will be induced if using twbs templates in spacemacs

In my emacs, C-c Ce #,

I insert twbs templates, after exporting, the files is not bootstrap style.

If I don't use any templates, then the html will render well.

More specifically, I added #+TITLE: this is a title in the beginning, the following problems will be induced:

apply: Wrong type argument: listp, #("this is a title" 0 15 (:parent (#0)))

Any ideas?

I use spacemacs.

Improve behavior of table of contents on small screens

The toc currently is put at the bottom of the document in collapsed form (in windows with a small width). It would be more useful to either remove it, or ideally provide a way to minimize and expand it as needed.

This was also mentioned in #4 (comment)

Regardless, this is very useful, thanks for making it! If I fix this myself I can send a pull request if you'd like.

Custom special blocks support & html5

Right now all special blocks are turned into potentially non-existing tags. It would be nice to port corresponding blocks from ox-html. I'm not certain if the following will do it before cloning and submitting PR.

--- ox-twbs.el.orig     2015-10-25 20:54:33.000000000 -0500
+++ ox-twbs.el  2015-12-14 17:31:47.607772900 -0600
@@ -120,6 +120,8 @@
   '((:html-extension nil nil org-twbs-extension)
     (:html-link-org-as-html nil nil org-twbs-link-org-files-as-html)
     (:html-container "HTML_CONTAINER" nil org-twbs-container-element)
+    (:html-doctype "HTML_DOCTYPE" nil org-html-doctype)
+    (:html-html5-fancy nil "html5-fancy" org-html-html5-fancy)
     (:html-link-use-abs-url nil "html-link-use-abs-url" org-twbs-link-use-abs-url)
     (:html-link-home "HTML_LINK_HOME" nil org-twbs-link-home)
     (:html-link-up "HTML_LINK_UP" nil org-twbs-link-up)
@@ -2727,11 +2729,21 @@
   (let* ((block-type (downcase
                       (org-element-property :type special-block)))
          (contents (or contents ""))
+        (html5-fancy (and (org-html--html5-fancy-p info)
+                          (member block-type org-html-html5-elements)))
          (attributes (org-export-read-attribute :attr_html special-block)))
+    (unless html5-fancy
+      (let ((class (plist-get attributes :class)))
+       (setq attributes (plist-put attributes :class
+                                   (if class (concat class " " block-type)
+                                     block-type)))))
     (setq attributes (org-twbs--make-attribute-string attributes))
     (when (not (equal attributes ""))
       (setq attributes (concat " " attributes)))
-    (format "<%s%s>\n%s</%s>" block-type attributes contents block-type)))
+    (if html5-fancy
+       (format "<%s%s>\n%s</%s>" block-type attributes
+               contents block-type)
+      (format "<div%s>\n%s\n</div>" attributes contents))))

 ;;;; Src Block

Latex pagebreak command

I'm getting \pagebreak command to come as literal ! I've wrapped it within a #+BEGIN_LATEXT and END_LATEX but still the same issue.

org has new escape mechanism for links

In the past week or two, the signature for org-link-escape has changed. This causes ox-twbs to break on exporting. Line 2455 of ox-twbs.el needs to be changed to remove the second argument to org-link-escape.

resouce file can be download local?

three static file : botstrap.min.css, bootstrap.min.js, jquery.min.js just can be download with local ?

yep, It's cdn link, but sometimes, when the internet has problem...

can be set a variable like (setq org-twbs-static-resouce t) then download with local, default or nil with the https://cdnjs.cloudflare.com/ajax/libs/... prefix

Thans..

Should respect toc option

It seems that ox-twbs places a table of contents regardless of toc option. This results in a duplication of TOC if such option was set. Once right after container & rows divs and then just before the footer. I mean

#+OPTIONS: toc:t

Broken Navigation for Export on Windows 10

Greetings everyone!

I do most of my work in linux, but this is fairly annoying on the windows version of emacs and this package installed.

Everytime I do an export using "org-twbs-export-to-html", it does not label the section numbers for the divs properly, which breaks the TOC on the side of the page. This does work in the linux version I am using.

I have posted a code block below of the output HTML inside my browser. I tested this on multiple browsers and the same result occurs.

<div id="content" class="container">
  | <div class="row"><div class="col-md-9"><h1 class="title"></h1>
  | <div id="outline-container-sec-" class="outline-2">
  | <h2 id="sec-">Insert Date Here</h2>
  | <div class="outline-text-2" id="text-">
  | </div><div id="outline-container-sec-" class="outline-3">
  | <h3 id="sec-">Todos</h3>
  | </div>
  | <div id="outline-container-sec-" class="outline-3">
  | <h3 id="sec-">6:00 - 7:00</h3>
  | </div>
  | <div id="outline-container-sec-" class="outline-3">
  | <h3 id="sec-">7:00 - 8:00</h3>
  | </div>
  | <div id="outline-container-sec-" class="outline-3">
  | <h3 id="sec-">8:00 - 9:00</h3>
  | </div>
  | <div id="outline-container-sec-" class="outline-3">
  | <h3 id="sec-">9:00 - 10:00</h3>
  | </div>
  | <div id="outline-container-sec-" class="outline-3">
  | <h3 id="sec-">10:00 - 11:00</h3>
  | </div>
  | <div id="outline-container-sec-" class="outline-3">
  | <h3 id="sec-">11:00 - 12:00</h3>
  | </div>
  | <div id="outline-container-sec-" class="outline-3">
  | <h3 id="sec-">12:00 - 13:00</h3>
  | </div>
  | <div id="outline-container-sec-" class="outline-3">
  | <h3 id="sec-">13:00 - 14:00</h3>
  | </div>
  | <div id="outline-container-sec-" class="outline-3">
  | <h3 id="sec-">14:00 - 15:00</h3>
  | </div>
  | <div id="outline-container-sec-" class="outline-3">
  | <h3 id="sec-">15:00 - 16:00</h3>
  | </div>
  | <div id="outline-container-sec-" class="outline-3">
  | <h3 id="sec-">16:00 - 17:00</h3>
  | </div>
  | <div id="outline-container-sec-" class="outline-3">
  | <h3 id="sec-">17:00 - 18:00</h3>
  | </div>

Thanks,

Noel

TOC not recognizing non-numbered sections

Hi Brandon,

I started using the TOC, and I saw another strange behavior:
When I have #+OPTIONS: H:2 num:1 toc:t i.e., headline level (H:) > accepted number of section levels (num:), the TOC was generated, but the links of the non-numbered items on the TOC mess up. For example, try the following code for ox-twbs export and the behavior of links in the TOC. Thanks!

#+OPTIONS: H:2 num:1 toc:t
#+OPTIONS: \n:t
#+OPTIONS: ^:nil
#+OPTIONS: <:nil todo:t *:t ^:{} ::t |:t TeX:t

* Plan 
** 1 
** 2 
** 3 
** 4
* Summary 
** Important tasks/projects done this week 
** Drawbacks 
** Thoughts/Comments 
** Time usage

Thanks for looking into this.

Da

Example file has missing information

This file from your front page example:

https://raw.githubusercontent.com/marsmining/ox-twbs/master/example/eg0.org

Contains things like this:

Here is some markup: <b>not bold text</b>

And a source block:

#+BEGIN_SRC html
<b>pow!</b>
#+END_SRC

#+BEGIN_HTML
<b>pow!</b>
<ul>
 <li>bing
 <li>bam
 <li>boom
</ul>
#+END_HTML

#+HTML: <i>italics</i>

Finally inline: @@html:<b>@@bold text@@html:</b>@@

See org-mode manual [[http://orgmode.org/manual/Quoting-HTML-tags.html#Quoting-HTML-tags][Quoting HTML tags]].

* Footnote

Here lies exact instructions [fn:a] for random [fn:b] noise.

Which do not appear on two different machines I've tried on your example page here:

http://clubctrl.com/org/prog/ox-twbs.html

I suspect you updated the org mode file but not the rendered HTML file.

mess up the orginal ox-html customizations

When customizing the Org Export group there are two similar entries for Org Export HTML. Going to both of these entries lead to the customization of ox-twbs only, so it's impossible to customize ox-html anymore.

ox-twbsshould not be mingled with the originalox-html`.

I tired to solve this but I didn't managed to find where this is setup up.

Style TODO states

The TODO states are currently just text.
Bootstrap provides a "label" component which could be used to style the states to make them stand out more and make it look prettier.

In the same way you maybe could use the "badge" component for tags.

It doesn't work with org-mode 8.3+

The export is failing because of the use of a deprecated function.

org-twbs--format-toc-headline: Symbol's function definition is void: org-export-solidify-link-text

Syntax Highlighting

Not sure if this is already possible, but it would be really nice to have SyntaxHighlighting for code snippets

<for example>

If already in, apologies for the unneeded issue.

Support BEGIN_EXPORT html blocks

For me,

#+BEGIN_HTML
<br>
<h2>This is the footer.</h2>
<p>You can put stuff here.</p>
<br>
#+END_HTML

works as expected, but the new format of

#+BEGIN_EXPORT html
<br>
<h2>This is the footer.</h2>
<p>You can put stuff here.</p>
<br>
#+END_EXPORT

leads to the html being re-rendered, rather than inserted literally.

Junk chacters get generated in the `BEGIN_SRC` block

Junk characters "" get generated in the BEGIN_SRC block.
(BTW, these are &#57344;&#57345;&#57345; when viewed as HTML source)

Use the following test.org and then M-x org-twbs-export-to-html

* Section 1
** Section 1.1
#+BEGIN_SRC shell
$ ipython
Python 3.5.2 (default, Jan 16 2017, 16:01:21)
Type "copyright", "credits" or "license" for more information.

IPython 4.0.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: from datetime import date

In [2]: date(2017, 6, 27)
Out[2]: datetime.date(2017, 6, 27)

In [3]:
Do you really want to exit ([y]/n)? y
#+END_SRC

BTW , the exported HTML of this also has some "black boxes" in place of white spaces. This was not seen in my other org file.

How to change the contents of the footer?

Hi there! It's me again!

On the footer of the exported Org file to HTML, I see the following:

Author: Rene Froger
Created: 2016-01-23 za 20:35
Emacs 25.0.50.2 (Org mode 8.2.10)

I would like to change that. So I went to M-x customize-group
ox-export-twbs, and emptied the org-twbs-creator-string. Restarted Emacs,
and I still see the same.

So I looked into the source code of ox-twbs.

I noticed the following:

(defcustom org-twbs-postamble-format
'(("en" "<p class=\"author\">Auteur: %a (%e)</p>
<p class=\"date\">Datum: %d</p>
<p class=\"creator\">%a</p>"))

So in my dot-emacs I set the following:

(setq org-twbs-postamble-format
'(("en" "<p class=\"author\">Auteur: %a (%e)</p>
<p class=\"date\">Datum: %d</p>"))

And restarted my Emacs. But that didn't help. I still see the same information
in the footnoter. Could you tell me how I could change the contents of the footnoter?

Wrong type argument (when TITLE exists)

I'm not sure why this occurs. I've seen this reported elsewhere. Could be related to ox-twbs but I could reproduce with ox-html. The solution offered in the linked report, removing packaged compiled elisp in org-mode dirs, seems to work.

Needs more investigating.

Exported internal links display as numbers

With this input:

 * A
 [[A]]

The output is:

 <div id="outline-container-sec-1" class="outline-2">
    <h2 id="sec-1"><span class="section-number-2">1</span> A</h2>
    <div class="outline-text-2" id="text-1">
        <p>
        <a href="#sec-1">1</a>
        </p>
    </div>
</div>

Note that the link text in the output is unfortunately not "A" -- it's "1".

If I normally export HTML it works. This only happens in Org 8.3 (or perhaps with the latest version of twbs).
For now I am forced to revert to Org 8.2 to get things to work.

ekko-lightbox friendly img export

It would be nice to have a provision for lightbox image gallery thing. At least like having clickable image thumbnails that would pop into twbs modal full size image browser for all images on the page.
One show stopper (for me) is that we need to wrap our figure tag with a having href attribute pointing to an image but we have contents blob most of the time..see update below
Perhaps javascript can come to rescue as a workaround.

Build warnings

Installed using M-x package-install RET ox-twbs

In org-twbs-htmlize-generate-css:
ox-twbs.el:1208:4:Warning: ‘org-pop-to-buffer-same-window’ is an obsolete
    function (as of Org 9.0); use ‘pop-to-buffer-same-window’ instead.

In org-twbs-fontify-code:
ox-twbs.el:1638:61:Warning: ‘font-lock-fontify-buffer’ is for interactive use
    only; use ‘font-lock-ensure’ or ‘font-lock-flush’ instead.

"Unknown keyword: :export-block" when using the latest beta of org-mode

Hi,

I am on this org-mode version:

Org-mode version 8.3.2 (release_8.3.2-457-g4a6d19 @ /home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)

( http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=4a6d195dea5edfff5badebdde5bc217ad5af0fdd )

With that, I am getting the below error when I evaluate ox-twbs,el:

Debugger entered--Lisp error: (error "Unknown keyword: :export-block")
  signal(error ("Unknown keyword: :export-block"))
  error("Unknown keyword: %s" :export-block)
  org-export-define-backend(twbs ((bold . org-twbs-bold) (center-block . org-twbs-center-block) (clock . org-twbs-clock) (code . org-twbs-code) (drawer . org-twbs-drawer) (dynamic-block . org-twbs-dynamic-block) (entity . org-twbs-entity) (example-block . org-twbs-example-block) (export-block . org-twbs-export-block) (export-snippet . org-twbs-export-snippet) (fixed-width . org-twbs-fixed-width) (footnote-definition . org-twbs-footnote-definition) (footnote-reference . org-twbs-footnote-reference) (headline . org-twbs-headline) (horizontal-rule . org-twbs-horizontal-rule) (inline-src-block . org-twbs-inline-src-block) (inlinetask . org-twbs-inlinetask) (inner-template . org-twbs-inner-template) (italic . org-twbs-italic) (item . org-twbs-item) (keyword . org-twbs-keyword) (latex-environment . org-twbs-latex-environment) (latex-fragment . org-twbs-latex-fragment) (line-break . org-twbs-line-break) (link . org-twbs-link) (paragraph . org-twbs-paragraph) (plain-list . org-twbs-plain-list) (plain-text . org-twbs-plain-text) (planning . org-twbs-planning) (property-drawer . org-twbs-property-drawer) (quote-block . org-twbs-quote-block) (quote-section . org-twbs-quote-section) (radio-target . org-twbs-radio-target) (section . org-twbs-section) (special-block . org-twbs-special-block) (src-block . org-twbs-src-block) (statistics-cookie . org-twbs-statistics-cookie) (strike-through . org-twbs-strike-through) (subscript . org-twbs-subscript) (superscript . org-twbs-superscript) (table . org-twbs-table) (table-cell . org-twbs-table-cell) (table-row . org-twbs-table-row) (target . org-twbs-target) (template . org-twbs-template) (timestamp . org-twbs-timestamp) (underline . org-twbs-underline) (verbatim . org-twbs-verbatim) (verse-block . org-twbs-verse-block)) :export-block "HTML" :filters-alist ((:filter-final-output . org-twbs-final-function)) :menu-entry (119 "Export to TWBS HTML" ((72 "As HTML buffer" org-twbs-export-as-html) (104 "As HTML file" org-twbs-export-to-html) (111 "As HTML file and open" (lambda (a s v b) (if a (org-twbs-export-to-html t s v b) (org-open-file (org-twbs-export-to-html nil s v b))))))) :options-alist ((:html-extension nil nil org-twbs-extension) (:html-link-org-as-html nil nil org-twbs-link-org-files-as-html) (:html-container "HTML_CONTAINER" nil org-twbs-container-element) (:html-link-use-abs-url nil "html-link-use-abs-url" org-twbs-link-use-abs-url) (:html-link-home "HTML_LINK_HOME" nil org-twbs-link-home) (:html-link-up "HTML_LINK_UP" nil org-twbs-link-up) (:html-mathjax "HTML_MATHJAX" nil "" space) (:html-postamble nil "html-postamble" org-twbs-postamble) (:html-preamble nil "html-preamble" org-twbs-preamble) (:html-head "HTML_HEAD" nil org-twbs-head newline) (:html-head-extra "HTML_HEAD_EXTRA" nil org-twbs-head-extra newline) (:html-head-include-default-style nil "html-style" org-twbs-head-include-default-style) (:html-head-include-scripts nil "html-scripts" org-twbs-head-include-scripts) (:html-table-attributes nil nil org-twbs-table-default-attributes) (:html-table-row-tags nil nil org-twbs-table-row-tags) (:html-inline-images nil nil org-twbs-inline-images) (:creator "CREATOR" nil org-twbs-creator-string) (:with-latex nil "tex" org-twbs-with-latex) (:with-toc nil nil 2) (:with-creator nil nil t) (:with-headline-numbers nil "whn" t) (:section-numbers nil nil t) (:latex-header "LATEX_HEADER" nil nil newline)))

I can avert the problem if I comment out this line:

:export-block "HTML"

But I am not sure what's the right solution and so I have posted a question on the org-mode list: http://thread.gmane.org/gmane.emacs.orgmode/103736/focus=104051

Unmatched bracket or quote error

I have ox-twbs installed and the following in my config (copied verbatim from your README):

(setq org-publish-project-alist '(("org-notes" :base-directory "~/org/" :publishing-directory "~/public_html/" :publishing-function org-twbs-publish-to-html :with-sub-superscript nil )))

On one of my org documents, if I run org-twbs-export-to-html, I get 'unmatched bracket or quote'. This only happens on some of my org files.

My emacs config. I'm running Emacs 26.1 if that helps

Any ideas why? Perhaps there's a problem elsewhere (not ox-twbs related) in my config?

compiling error: Symbol's function definition is void: org-link-types

Issue
When I attempt to install the package (either via .spacemacs or the install feature in the GUI) I looks like its happy - but as soon as reload emacs it auto-deletes the package as though it were an orphan. It could be this issue maybe? syl20bnr/spacemacs#1538 but just in case theres more I can do on your side I'm posting this issue here.

spacemacs v25.3 (9.0)
org-mode v9.1.6

I did see this error at one point - but I solved it by adding (package-initialize) to my init.el as suggested by following suggestions here syl20bnr/spacemacs#8334

Compiling file /Users/olaf/.emacs.d/elpa/ox-twbs-20161103.1316/ox-twbs.el at Thu Feb  1 21:19:45 2018
Entering directory ‘/Users/olaf/.emacs.d/elpa/ox-twbs-20161103.1316/’
ox-twbs.el:44:1:Error: Symbol’s function definition is void: org-link-types

I don't see anything else useful? But maybe I'm not looking in the right spots?

Request - Allow the table of contents to scroll

I find myself in situations where the table of contents itself must be scrollable. Easy enough to do manually so long as I remember, but requesting that it be added as a default.

Thank you.

is there a way to customize the TODO done and undone styles?

Hello,

I have some a light customization on the appearance of TODO and TAGS, using org-twbs-head-extra (see the code below).
However, with the newest version of ox-twbs, this customization stopped working.
Is there a work-around to make the styles specified in org-twbs-head-extra take higher priority than the default behavior? Thank you very much!

Da

(setq org-twbs-head-extra "<style type="text/css">
/* @group Org Keywords */

.todo {
color: #b22222; /firebrick/
background: #fff0f5 /LavenderBlush/
}

.done {
color: #228b22; /forestgreen/
background: #f0fff0 /honeydew, green-ish/
}

.tag {
color: blue;
background: #e0ffff; /LightCyan, blue-ish/
text-transform: uppercase;
/* This will be obscured by the surrounding span tag, so blank everything. */
border: none;
text-align: right;
right: 1em;
}

.timestamp {
}

.timestamp-kwd {
/* keyword associated with a time stamp, like SCHEDULED */
}

.target {
/* target for links */
}

/* @EnD */
</style>"
)

Wrong type argument: listp, "org-notes"

Hi there!

Thanks for sharing this package! I decided to follow the tutorial on your readme.

Starting from usage section, I have the directories org and public_html
set up in my home directory.

I have the following setup:

(use-package ox-twbs
:config

(setq org-publish-project-alist
        '("org-notes"
        :base-directory "~/org/"
        :publishing-directory "~/public_html/"
        :publishing-function org-twbs-publish-to-html
        :with-sub-superscript nil
        ))
 )

When I call org-publish-all inside the org document, I got an error:

org-publish-file: Wrong type argument: listp, "org-notes"

When googling around, it seems none have the same issue as I. So do you have any suggestion how to tackle this issue?

TOC breaks when section numbers disabled in org-mode 8.3.x

With Org 8.2.x :section-number nil just toggled the display of section numbers, but the "id" attribute was in place. Org-mode 8.3.x parsing of the document will not include headline numbering if :section-number nil, therefore section numbers are broken at the actual section and the TOC meant to link there.

src line num

I tried to add the line num to the source code , but it failed

If use the original: M-x org-html-export-to-html, can be generated, but the style was so general, and when the election and the line number is also brought into the copy. Very unfriendly

Table column alignment is not working

Exporting columns with specified alignement (etc. <r> to align right - as noted here) does not end with cells aligned to right.
Resulting html table cells has class right, which does not align textual content of the cell to the right. Shouldn't there be class text-right instead?

Table example:

| col1 |
|------|
| <r>  |
| text |

Possible fix:
on https://github.com/marsmining/ox-twbs/blob/master/ox-twbs.el#L2893
use class=\"text-%s\"" instead of just class=\"%s\""

derived backend

Hi,

The way your backend is written is rather duplicative. Perhaps, rather than defining a new backend you could define a derived backend, see the docstring of org-export-define-derived-backend, or ox-md, ox-beamer and ox-koma-letter for examples. You'd automatically inherit all keywords and the like from ox-html. Further, you would only need to provide new functions for the elements where you are actually unhappy with their current output (e.g. org-twbs-subscript is rather pointless). Also, you would not need to redefine every defcustom which is sort of pity (presumably if org-html-link-org-files-as-html is non-nil than org-html-twbs-org-files-as-html is non-nil). From a user perspective it's also nicer since my html filters will automatically apply.

If you'd follow sort of the "proper" way of creating a backend it would be cool to include it in contrib/lisp or lisp, as people occasionally ask for bootstrap'ed output. Paperwork is required for lisp.

edit: oh, incidentally, this is also a/the solution to #13.

Cheers,
Rasmus

Question : Can this be used to create a blog ?

One important feature that is required is to have TOC of all the posts.

(It seems) currently, this is built towards exporting single HTML at a time.

Is there a way where we can generate "archive" page, let's say, which is an index of all the other exported HTMLs

Even if this were not part of "core" functionality, can you suggest if such a thing may be possible (even if it involves some sort of manual work)

Shell batch export

Hi,

Is there possible to directly export from terminal like I do with basic html ?

emacs myorgfile.org --batch -f org-html-export-to-html --kill

When I tried emacs myorgfile.org --batch -f org-twbs-export-to-html --kill, I have this error :

Loading 00debian-vars...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Symbol's function definition is void: org-twbs-export-to-html

I want to export in CRON task and copy on remote server with SCP.
Thx in advance, best regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.