renard / o-blog

Standalone orgmode blog exporter. DEPECATED, NOT MAINTAINED
http://renard.github.com/o-blog-v2
260 stars 58 forks source link

Differences between rendering from org file and markdown #146

Closed rbarzic closed 4 years ago

rbarzic commented 9 years ago

Hi

While trying the git version of o-blog v2, I noticed a issue when rendering a simple org document

+TITLE: Ronan's Blog
#+DATE: Friday  22. May 2015 12.20 +0200

* Just a little test
  :PROPERTIES:
  :PAGE:     index.html
  :TEMPLATE: blog_static.html
  :END:

#+begin_jumbotron

Hello World
#+end_jumbotron

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

There is no style directory copied under the output folder

While if I'm rendering a markdown file located in the same location as the previous org file

% -*- markdown -*-
<!--/
title: index
type: page
template: blog_static.html
/-->

<jumbotron>
<h1>Hello, world!</h1>
</jumbotron>

<justify>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</justify>

the style directory got copied (there is an explicit message from emacs : Copying ~/perso/github/o-blog/templates/style/ -> out using copy-directory

rbarzic commented 9 years ago

If I add

#+TEMPLATE_DIR: ~/perso/github/o-blog/templates/
#+STYLE_DIR: ~/perso/github/o-blog/templates/style

I get the style directory to be copied. But the snippets for Copyrights/About... are not correct - They display the main text of the index page

drtutut commented 9 years ago

o-blog branch 2.6, emacs 24.3.1, org-mode 8.3.1

When generating from org-mode file, the styles are not copied in the publishing directory, althhough #+TEMPLATE_DIR: and #+STYLE_DIR are properly set.

Moreover, when inspecting the generated index.html file for the home (and any html generated file), there are strange lines relating to the head of the page :

    <script src="./style/js/sidjs.min.js" async></script>
    <script>
      Lisp error in nil: (file-error Opening input file aucun fichier ou dossier de ce type /path-to-oblog/templates/style/js/runif.min.js)
      Lisp error in nil: (file-error Opening input file aucun fichier ou dossier de ce type /path-to-oblog/templates/style/js/o-blog-init.min.js)
    </script>

note that my #+TEMPLATE_DIR: and #+STYLE_DIR directives are set as :

#+TEMPLATE_DIR: /path-to-oblog/templates
#+STYLE_DIR: /path-to-oblog/style

Thus, the STYLE directive seems to be totally ignored by the publishing process, as it points to a subdirectory of templates/

cviebig commented 8 years ago

Not sure what your issue is, but in my configuration the style directory is indeed copied. See https://github.com/cviebig/o-blog-example