cryogen-project / cryogen

A simple static site generator written in Clojure
http://cryogenweb.org/
Eclipse Public License 1.0
1.1k stars 96 forks source link

Lotus Theme error, "resource content/themes/lotus/img not found" #256

Closed jlangson closed 1 year ago

jlangson commented 1 year ago

I installed sass globally and updated the config.edn as required for the Lotus theme. When I run lein serve I get the message "Error: resource content/themes/lotus/img not found". That partially makes sense because I do not have a content/themes folder. But why is it looking for a content/themes?

The full output of lein serve

loading module: Flexmark parser compiling assets... compiling sass themes/lotus/css --> themes/lotus/css copying theme resources themes/lotus/css --> public/css themes/lotus/js --> public/js themes/lotus/html/404.html --> public/404.html themes/lotus/img --> public/img copying resources content/themes/lotus/img --> public/img Error: resource content/themes/lotus/img not found "Elapsed time: 558.30913 msecs" 2023-01-30 19:29:17.817:INFO:oejs.Server:jetty-7.6.13.v20130916 2023-01-30 19:29:17.832:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:3000 Started server on port 3000

And this is my config.edn.

{:site-title                   "My website"
 :author                       "Jared Langson"
 :description                  "This blog is awesome"
 :site-url                     "https://jaredlangson.com/"
 :post-root                    "posts"
 :page-root                    "pages"
 :post-root-uri                "posts-output"
 :page-root-uri                "pages-output"
 :tag-root-uri                 "tags-output"
 :author-root-uri              "authors-output"
 :public-dest                  "public"
 :blog-prefix                  ""
 :rss-name                     "feed.xml"
 :rss-filters                  ["cryogen"]
 :recent-posts                 3
 :post-date-format             "yyyy-MM-dd"
 :archive-group-format         "yyyy MMMM"
 :sass-src                     ["themes/lotus/css"]
 :sass-path                    "sass"
 :theme                        "lotus"
 :resources                    ["themes/lotus/img" "img"]
 :keep-files                   [".git"]
 :disqus?                      false
 :disqus-shortname             ""
 :ignored-files                [#"\.#.*" #".*\.swp$"]
 :previews?                    false
 :posts-per-page               5
 :blocks-per-preview           2
 :clean-urls                   :trailing-slash
 :collapse-subdirs?            false
 :hide-future-posts?           true
 :klipse                       {}
 :description-include-elements #{:p :h1 :h2 :h3 :h4 :h5 :h6}
 :debug?                       false}
yogthos commented 1 year ago

I think it's the result of adding the path in resources :resources ["themes/lotus/img" "img"] since those are assumed to be relative to content. That should get resolved by themes/lotus/config.edn that has:

{:sass-src             ["css"]
 :resources            ["img"]}
jlangson commented 1 year ago

Changing :sass-srcand :resourcesto their default values fixed it. I got confused misreading the directions on the theme's github. Thanks!