coleslaw-org / coleslaw

Flexible Lisp Blogware
BSD 2-Clause "Simplified" License
553 stars 82 forks source link

duplicate generated files #201

Closed aerphanas closed 1 year ago

aerphanas commented 1 year ago

tested on NixOS 22.11

[nix-shell:~/Projects/git/coleslaw]$ coleslaw deploy

Coleslaw, a Flexible Lisp Blogware.
Written by: Brit Butler <redline6561@gmail.com>.
Distributed by BSD license.

Command Line Syntax:

coleslaw setup [NAME]                --- Sets up a new .coleslawrc file in the current directory.
coleslaw copy-theme THEME [TARGET]   --- Copies the installed THEME in coleslaw to the current directory with a different name TARGET.
coleslaw new [TYPE] [NAME]           --- Creates a new content file with the correct format. TYPE defaults to 'post', NAME defaults to the current date.
coleslaw stage                       --- Generates the static html in the staging dir.
coleslaw generate                    --- Alias to `coleslaw stage`.
coleslaw deploy                      --- Generates the static html in the staging dir, then publish it to the deploy dir.
coleslaw preview [DIRECTORY]         --- Runs a preview server at port 5000. DIRECTORY defaults to the staging directory.
coleslaw watch [DIRECTORY]           --- Watches the given directory and generates the site when changes are detected. Defaults to the current directory.
coleslaw                             --- Alias to `coleslaw stage`.
coleslaw -h                          --- Show this help

Corresponding REPL commands are available in coleslaw-cli package.

```lisp
  (ql:quickload :coleslaw-cli)
  (coleslaw-cli:setup            &optional name)
  (coleslaw-cli:copy-theme theme &optional target)
  (coleslaw-cli:new              &optional type name)
  (coleslaw-cli:stage)
  (coleslaw-cli:generate)
  (coleslaw-cli:deploy)
  (coleslaw-cli:preview &optional directory)
  (coleslaw-cli:watch   &optional directory)

Examples:

;; loading #P"/home/adivin/.roswell/local-projects/coleslaw-org/coleslaw/plugins/analytics.fasl" ;; loading #P"/home/adivin/.roswell/local-projects/coleslaw-org/coleslaw/plugins/disqus.fasl" ;; loading #P"/home/adivin/.roswell/local-projects/coleslaw-org/coleslaw/plugins/mathjax.fasl" ;; loading #P"/home/adivin/.roswell/local-projects/coleslaw-org/coleslaw/plugins/sitemap.fasl" ;; loading #P"/home/adivin/.roswell/local-projects/coleslaw-org/coleslaw/plugins/rsync.fasl" ; rsync --delete -raz /home/adivin/.roswell/local-projects/coleslaw-org/coleslaw/themes/readable/css . ; rsync --delete -raz /home/adivin/.roswell/local-projects/coleslaw-org/coleslaw/themes/readable/img . ; rsync --delete -raz /home/adivin/.roswell/local-projects/coleslaw-org/coleslaw/themes/readable/js . ; ln -sfn 1 index.html ; rsync -avz --delete --exclude .git/ --exclude .gitignore --copy-links /tmp/coleslaw/ /home/adivin/Projects/git/coleslaw/deploy/ sending incremental file list created directory /home/adivin/Projects/git/coleslaw/deploy ./ 1 1.html atom.xml index.html posts..html rss.xml sitemap.xml css/ css/bootstrap.min.css css/custom.css date/ date/2022-12 date/2022-12.. date/2022-12... date/2022-12...html date/2022-12..html date/2022-12..md img/ img/cc-by-sa.png img/glyphicons-halflings-white.png img/glyphicons-halflings.png img/logo_small.jpg js/ js/bootstrap.min.js pages/ pages/2022-12-23.html posts/ posts/2022-12-23..html posts/2022-12-24 posts/2022-12-24.. posts/2022-12-24... posts/2022-12-24...html posts/2022-12-24..html posts/2022-12-24..md posts/2022-12-24.html posts/Initial-Commit..html tag/ tag/bar tag/bar.. tag/bar... tag/bar...html tag/bar..html tag/bar..md tag/baz tag/baz.. tag/baz... tag/baz...html tag/baz..html tag/baz..md tag/lisp-atom.xml tag/lisp-rss.xml

sent 61,738 bytes received 959 bytes 125,394.00 bytes/sec total size is 250,597 speedup is 4.00 Page deployed at the deploy dir deploy/


.coleslawrc

````sh
[nix-shell:~/Projects/git/coleslaw]$ cat .coleslawrc 
;;; -*- mode : lisp -*-
(;; Required information
 :author "adivin"                         ;; to be placed on post pages and in the copyright/CC-BY-SA notice
 :deploy-dir "deploy/"                ;; for Coleslaw's generated HTML to go in
 :domain ""                           ;; to generate absolute links to the site content. Note: with :cname option of gh-pages, this requires a url scheme, e.g. https://fake.org 
 :lang "id"
 :page-ext "html"
 :routing ((:post           "posts/~a") ;; to determine the URL scheme of content on the site
           (:tag-index      "tag/~a")
           (:month-index    "date/~a")
           (:numeric-index  "~d")
           (:feed           "~a.xml")
           (:tag-feed       "tag/~a.xml")
           (:sitemap        "~a.xml"))
 :title "Improved Means for Achieving Deteriorated Ends" ;; a site title
 :theme "readable"                        ;; to select one of the themes in "coleslaw/themes/"

 ;; Optional information
 :excerpt-sep "<!--more-->"           ;; to set the separator for excerpt in content 
 :feeds ("lisp")
 :plugins ((analytics :tracking-code "foo")
           (disqus :shortname "my-site-name")
           ; (incremental)  ;; *Remove comment to enable incremental builds.
           (mathjax)
           (sitemap)
           ;;(static-pages)
           ;; deployment plugins
           ;; deployment to github pages
           ; (gh-pages :url "git@github.com:myaccount/myrepo.git"
           ;           ; :cname t  ;; if you want to use the custom domain --- see http://pages.github.com/
           ;           )
           ;; versioned deployment. Remove comment to enable symlinked, timestamped deploys.
           ; (versioned)
           ;; default deploy method is rsync
           (rsync "-avz" "--delete" "--exclude" ".git/" "--exclude" ".gitignore" "--copy-links")
          )
 :sitenav ((:url "http://adivin.github.com/" :name "Home")
           (:url "http://twitter.com/adivin" :name "Twitter")
           (:url "http://github.com/adivin" :name "Code")
           (:url "http://soundcloud.com/adivin" :name "Music")
           (:url "http://redlinernotes.com/docs/talks/" :name "Talks"))
 :staging-dir "/tmp/coleslaw/"  ;; for Coleslaw to do intermediate work, default: "/tmp/coleslaw"
)

;; * Prerequisites described in plugin docs.
aerphanas commented 1 year ago

looks like coleslaw-cli doesn't clean up /temp/coleslaw when changes are made to .coleslawrc