Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding additional files to blog/theme root like robots.txt and favicon (and the million app icons) #92

Open
BorisKourt opened this issue Sep 16, 2015 · 1 comment

Comments

@BorisKourt
Copy link

If I leave a robots.txt or any app icon related images (apple-touch-icon.png etc.) in the root of the theme or the blog they get discarded on build. Do I need to make a small plugin to specify which files to move/generate/keep? (Perhaps from looking at gh-pages)

Or are there configuration options available in .coleslawrc?

@vdikan
Copy link

vdikan commented Apr 6, 2020

If still relevant :)
I think easiest way is to patch (compile-blog) in the coleslaw.lisp:

--- a/src/coleslaw.lisp
+++ b/src/coleslaw.lisp
@@ -35,7 +35,12 @@
                          (merge-pathnames "js" theme-dir)
                          (repo-path "static")))
         (when (probe-file dir)
-          (run-program "rsync --delete -raz ~a ." dir))))
+          (run-program "rsync --delete -raz ~a ." dir)))
+      (cl-fad:walk-directory            ; sync files from `root-static`
+       (repo-path "root-static")        ; to the root of staging dir
+       #'(lambda (file)
+           (run-program "rsync --delete -raz ~a ." file))
+       :if-does-not-exist :ignore))
     (do-subclasses (ctype content)
       (publish ctype))
     (do-subclasses (itype index)

I use root-static as a hardcoded name for dir in the blog repo, same as static is hardcoded directory for other static files that do not necessarily need to show up in the root. I'm totally fine with both names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants