Hi,

Sorry about the late response. Life got in the way.

> Org-publish, by default, only processes org files. If you want to include CSS
> 
> files, images, and other non-org content, you need to process them as
> 
> attachments.

Sure, but I don't see a reason why my original snippet wouldn't work. If I 
replace the local css file with a cdn link instead, for example

(setq org-html-validation-link nil
      org-html-head-include-scripts nil
      org-html-doctype "html5"
      org-html-html5-fancy t
      org-html-html-include-default-style nil
      ;; org-html-head "<link rel=\"stylesheet\" type=\"text/css\" 
href=\"new.css\" />")
      org-html-head "<link rel=\"stylesheet\"
      
href=\"https://cdn.jsdelivr.net/npm/@exampledev/new.css@1.1.2/new.min.css\"; />")

works just fine. It only seems to have a problem when the css file is local. 
Any way to mitigate this? I initially thought that perhaps its an issue with 
orgmode being unable to find the stylesheet due to some incorrect path but 
doesn't seem to be the case.

Kind regards,
Ashish

March 23, 2025 at 6:42 AM, "Rohit Patnaik" <quanti...@quanticle.net> wrote:



> 
> Org-publish, by default, only processes org files. If you want to include CSS
> 
> files, images, and other non-org content, you need to process them as
> 
> attachments.
> 
> So, for example, this is what I have:
> 
> (setq org-publish-project-alist 
> 
>  '(("website-orgfiles"
> 
>  :base-directory "$HOME/website_src/"
> 
>  :publishing-directory "$HOME/website_publish/"
> 
>  :recursive t
> 
>  :headline-levels 6
> 
>  :sections-numbers nil
> 
>  :html-head-include-default-style nil
> 
>  :html-head 
> 
>  "<link rel=\"stylesheet\" type=\"text/css\" href=\"/website_style.css\" />) 
> 
>  ("website-images"
> 
>  :base-directory "$HOME/website_src/images/"
> 
>  :publishing-directory "$HOME/website_publish/images/"
> 
>  :recursive t
> 
>  :base-extension "png\\|jpg\\|gif"
> 
>  :publishing-function org-publish-attachment)
> 
>  ("website-css"
> 
>  :base-directory "$HOME/website_src/css/"
> 
>  :publishing-directory "$HOME/website_publish/"
> 
>  :base-extension "css"
> 
>  :publishing-function org-publish-attachment)
> 
>  ("website"
> 
>  :components ("website-orgfiles"
> 
>  "website-images"
> 
>  "website-css"))))
> 
> In other words, I break up my website project into separate subprojects for 
> CSS,
> 
> images, and org-files, and include them as components of the main website
> 
> project.
> 
> -- Rohit
>

Reply via email to