emacsorphanage / org-page

[INACTIVE] A static site generator based on Emacs and org mode.
673 stars 99 forks source link

Application of themes not working/not documented #99

Closed cmacrae closed 9 years ago

cmacrae commented 9 years ago

Really wanting to move over to org-page, but I can't get themes to work. Default install from MELPA doesn't work using the basic config:

(require 'org-page)
(setq op/repository-directory "~/path/2/blog")
(setq op/site-domain "http://domain.name")
(setq op/site-main-title "Site name")
(setq op/site-sub-title "Site sub")

However, I can see the themes directory there: ~/.emacs.d/elpa/org-page-20141226.558/themes Setting (setq op/theme 'mdo) doesn't seem to work, and setting both that and (setq op/theme-root-directory "~/path/2/themes") (where the themes directory resides) doesn't work either.

Whenever I op/do-publication, the generated site isn't using any CSS. There are no warning messages in my *Messages* buffer. Here's the output in *Messages* when running with any of the above mentioned options set:

Publish all org files? (y or n) y
Publish to a directory? (to original repo if not) (y or n) y
Read post.mustache from file
Mark set
Read header.mustache from file
Render navigation bar from template
Read nav.mustache from file
Read footer.mustache from file
Read container.mustache from file
Wrote ~/path/2/blog_pub/index.html
Read about.mustache from file
Indenting region...done
Wrote ~/path/2/blog_pub/about/index.html
Wrote ~/path/2/blog_pub/rss.xml
Read tag-index.mustache from file
Indenting region...done
Wrote ~/path/2/blog_pub/tags/index.html
Publication finished: on branch 'master' of repository '~/path/2/blog'.

This happens when I publish to either a directory or the master branch (from my source branch).

Perhaps it's something I'm doing wrong, and if that is the case, perhaps a little documentation on the use of themes should be added :) Unless of course, it's so simple that such documentation would be necessary, but I'm just somehow running into an awkward issue.

Thanks in advance for any help on this @kelvinh, and thank you again for org-page! :)

sillykelvin commented 9 years ago

Whenever I op/do-publication, the generated site isn't using any CSS.

Did you mean that the css files are not in folder "/path/2/output/media/css"? Org-page does not copy the theme folder, but copies the sub folders and files under it.

cmacrae commented 9 years ago

Hmm, no, the files are there as expected:

.
├── about
│   └── index.html
├── index.html
├── media
│   ├── css
│   │   ├── main.css
│   │   └── prettify.css
│   ├── img
│   │   └── search.png
│   └── js
│       └── main.js
├── rss.xml
└── tags
    └── index.html

But, when I load the page (index.html) in a browser - be that from the filesystem on my local machine, or hosted by nginx - the page doesn't seem to be using any CSS.

sillykelvin commented 9 years ago

In the generated html files, the css files are referenced with absolute paths as following:

<link rel="stylesheet" href="/media/css/main.css" type="text/css">
<link rel="stylesheet" href="/media/css/prettify.css" type="text/css">

So, please check if you put the generated files at the root level of nginx, otherwise they cannot be found.

cmacrae commented 9 years ago

Sorry to bother you with my nonsense @kelvinh! I was just testing wrong (being lazy). I set up a fresh nginx node to try it out, and it works great.

Thanks so much for your time :)

sillykelvin commented 9 years ago

Glad to see that your problem is solved. :-)