From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mehul Sanghvi Subject: Re: How to use my own stylesheet for publishing to html ? Date: Mon, 12 Aug 2013 22:02:19 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d0438eb67805a3604e3caa14d Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V93wE-0002ZD-4y for emacs-orgmode@gnu.org; Mon, 12 Aug 2013 22:02:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V93wC-0005vP-BG for emacs-orgmode@gnu.org; Mon, 12 Aug 2013 22:02:22 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:35163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V93wC-0005vF-1T for emacs-orgmode@gnu.org; Mon, 12 Aug 2013 22:02:20 -0400 Received: by mail-wi0-f180.google.com with SMTP id f14so73862wiw.7 for ; Mon, 12 Aug 2013 19:02:19 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: ML Emacs-orgmode --f46d0438eb67805a3604e3caa14d Content-Type: text/plain; charset=ISO-8859-1 I made some changes: - Removed #+SETUPFILE: from index.org - Added :html-head to org-publish-project-alist And that seems to have done the trick. So it seems the problem is with the template that I was referring to in #+SETUPFILE which I'll need to look at, one option at a time, unless someone can point me to what is wrong with it. cheers, mehul On Mon, Aug 12, 2013 at 6:53 PM, Mehul Sanghvi wrote: > > My project setup: > > > (setq org-publish-project-alist > '( > ;; ... add all the components here (see below)... > > ;;("inherit-styles-and-js" > ;; :base-directory "~/org/new-site/" > ;; :recursive t > ;; :base-extenstion "css\\|js" > ;; :publishing-directory "~/public_html/new-site/" > ;; :publishing-function org-publish-attachment > ;; ) > > ("org-notes" > :base-directory "~/org/new-site/" > :base-extension "org" > :section-numbers nil > :publishing-directory "~/public_html/new-site/" > :recursive t > :publishing-function org-html-publish-to-html > :headline-levels 4 ; Just the default for this > project. > :auto-preamble t > ) > > ("org-static" > :base-directory "~/org/new-site/" > :base-extension > "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" > :publishing-directory "~/public_html/new-site/" > :recursive t > :publishing-function org-publish-attachment > ) > > ("org" :components ("org-notes" "org-static")) > > )) > > > I have the following in a template file: > > > #+DATE: <2013-08-09 Fri> > #+OPTIONS: ':nil *:t -:t ::t <:t H:3 \n:nil ^:t arch:headline > #+OPTIONS: author:t c:nil creator:comment d:nil date:t e:t email:nil > #+OPTIONS: f:t inline:t num:nil p:nil pri:nil stat:t tags:not-in-toc > #+OPTIONS: tasks:t tex:t timestamp:t toc:t todo:t |:t > #+CREATOR: Emacs 23.4.1 (Org mode 8.0.7) > #+DESCRIPTION: > #+EXCLUDE_TAGS: noexport > #+KEYWORDS: > #+LANGUAGE: en > #+SELECT_TAGS: export > #+OPTIONS: html-link-use-abs-url:nil html-postamble:auto > #+OPTIONS: html-preamble:t html-scripts:t html-style:t > #+OPTIONS: html5-fancy:nil tex:t > #+CREATOR: Emacs 23.4.1 > (Org mode 8.0.7) > #+HTML_CONTAINER: div > #+HTML_DOCTYPE: xhtml-strict > #+HTML_HEAD: > #+HTML_HEAD_EXTRA: > #+HTML_LINK_HOME: > #+HTML_LINK_UP: > #+HTML_MATHJAX: > #+INFOJS_OPT: > #+STYLE: > > > > and in my index.org file I do: > > #+SETUPFILE: ~/Env/emacs/_org-templates/level-0.org > > > Yet when I publish the project, although the stylesheet gets copied to > the right place, it is not getting used in the generated index.html. It is > using org-info.js instead. I am following the tutorial for publishing that > is in the Worg. > > I am using Orgmode 8.0.3 and the behaviour is also exhibited in the latest > from git. > > > Any pointers on what I'm doing wrong or have missed ? > > > cheers, > > mehul > > -- > Mehul N. Sanghvi > email: mehul.sanghvi@gmail.com > -- Mehul N. Sanghvi email: mehul.sanghvi@gmail.com --f46d0438eb67805a3604e3caa14d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I made some changes:

=A0- Removed #+SET= UPFILE: from index.org

=A0- Added :html-head to org-publish-project-alist


And that seems to have done the trick. =A0So it seems the pr= oblem is with the template that I was referring to in #+SETUPFILE which I&#= 39;ll need to look at, one option at a time, unless someone can point me to= what is wrong with it.


cheers,

=A0 =A0= =A0 mehul



On Mon, Aug 12, 2013 at 6:53 PM, Mehul Sanghvi <mehul.sanghvi@gmail.com> wrote:

My proj= ect setup:


(setq org-publish-p= roject-alist
=A0 =A0 =A0 '(
=A0 =A0 =A0 =A0 ;; ... add all the compon= ents here (see below)...=A0

;;("i= nherit-styles-and-js"
= ;; :base-directory "~/org/new-site/"
;; :recursive t
;; :base-extenstion "= ;css\\|js"
;; := publishing-directory "~/public_html/new-site/"
;; :publishing-function org-pu= blish-attachment
;; = )

=A0 =A0 =A0 =A0 ("org-notes"
=A0 =A0 =A0 =A0 =A0:base-directory "~/org/new-site/"
= =A0 =A0 =A0 =A0 =A0:base-extension "org"
:section-numbers nil
=A0 =A0 =A0 = =A0 =A0:publishing-directory "~/public_html/new-site/"
=A0 =A0 =A0 =A0 =A0:recursive t
=A0 =A0 =A0 =A0 =A0:publishi= ng-function org-html-publish-to-html
=A0 =A0 =A0 =A0 =A0:headline= -levels 4 =A0 =A0 =A0 =A0 =A0 =A0 ; Just the default for this project.
=A0 =A0 =A0 =A0 =A0:auto-preamble t
=A0 =A0 =A0 =A0 =A0)

=A0 =A0 =A0 =A0 ("or= g-static"
=A0 =A0 =A0 =A0 =A0:base-directory "~/org/new= -site/"
=A0 =A0 =A0 =A0 =A0:base-extension "css\\|js\\|= png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
=A0 =A0 =A0 =A0 =A0:publishing-directory "~/public_html/new-site/= "
=A0 =A0 =A0 =A0 =A0:recursive t
=A0 =A0 =A0 =A0 = =A0:publishing-function org-publish-attachment
=A0 =A0 =A0 =A0 = =A0)

=A0 =A0 =A0 =A0 ("org" :components = ("org-notes" "org-static"))

=A0 =A0 =A0 =A0 ))


<= /div>
I have the following in a template file:

=

#+DATE: <2013-08-09 Fri>
#+OP= TIONS: ':nil *:t -:t ::t <:t H:3 \n:nil ^:t arch:headline
#+OPTIONS: author:t c:nil creator:comment d:nil date:t e:t email= :nil
#+OPTIONS: f:t inline:t num:nil p:nil pri:nil stat:t tags:no= t-in-toc
#+OPTIONS: tasks:t tex:t timestamp:t toc:t todo:t |:t
#+CREATOR: Emacs 23.4.1 (Org mode 8.0.7)
#+DESCRIPTION:
#+EXCLUDE_TAGS: noexport
#+KEYWORDS:
#+LANGUAGE: = en
#+SELECT_TAGS: export
#+OPTIONS: html-link-use-abs-u= rl:nil html-postamble:auto
#+OPTIONS: html-preamble:t html-scripts:t html-style:t
#+OPT= IONS: html5-fancy:nil tex:t
#+CREATOR: <a href=3D"http://www.gnu.or= g/software/emacs/">Emacs</a> 23.4.1 (<a href=3D"<= a href=3D"http://orgmode.org" target=3D"_blank">http://orgmode.org"= ;>Org</a> mode 8.0.7)
#+HTML_CONTAINER: div
#+HTML_DOCTYPE: xhtml-strict
#+HTML_HEAD:
#+HTML_HEAD_EXTRA:
#+HTML_LINK_HOME:
#+HTML_LINK_UP:
#+HTML_MATHJAX:
#+INFOJS_OPT:
#+STYLE: <link rel=3D"stylesheet" type=3D"text/css&q= uot; href=3D"css/worg.css" />

<= br>

and in my index.org file I do:

#+SETUPFILE: ~/Env/emacs/_org-templates/level-0.org

<= div>
Yet when I publish the project, =A0although the styleshe= et gets copied to the right place, it is not getting used in the generated = index.html. =A0It is using org-info.js instead. =A0I am following the tutor= ial for publishing that is in the Worg.

I am using Orgmode 8.0.3 and the behaviour is also exhi= bited in the latest from git. =A0


A= ny pointers on what I'm doing wrong or have missed ?=A0


cheers,

=A0 =A0 =A0mehul
=

--
Mehul = N. Sanghvi
email: mehul.sanghvi@gmail.com



--
Mehul N. San= ghvi
email: mehul.sanghvi@gma= il.com
--f46d0438eb67805a3604e3caa14d--