Code Monkey home page Code Monkey logo

coleslaw's Introduction

coleslaw

Build Status Quicklisp

coleslaw logo

Czeslaw Milosz was the writer-in-residence at UNC c. 1992. I used to see him all the time at the Hardback Cafe, always sitting at a two-top drinking coffee, reading, writing, eating chips and salsa. I remember a gentleness behind the enormous bushy eyebrows and that we called him Coleslaw. - anon

Coleslaw is Flexible Lisp Blogware similar to Frog, Jekyll, or Hakyll.

Have questions?

See the wiki for a list of coleslaw-powered blogs.

Coleslaw should run on any conforming Common Lisp implementations but testing is primarily done on SBCL and CCL.

Features

plugins plugins plugins
Sitemap generation Incremental builds Analytics via Google or Matomo
Comments via Disqus Comments via isso Hosting via Amazon S3
Hosting via Github Pages Embedding gfycats Tweeting about new posts
Mathjax Posts in ReStructured Text Wordpress import
Pygments colorize

Installation/Tutorial

Step 1: Install this library.

$ ros install coleslaw-org/coleslaw      # With [Roswell](https://roswell.github.io/)
$ export PATH="$HOME/.roswell/bin:$PATH" # If you haven't done this before for Roswell
or
CL-USER> (ql:quickload :coleslaw-cli)

Step 2: Initialize your blog repository.

$ mkdir yourblog ; cd yourblog
$ git init
$ coleslaw setup              # or
CL-USER> (coleslaw-cli:setup)

coleslaw setup / (coleslaw-cli:setup) will generate a .coleslawrc file in the current directory, which contains the configuration of the static website.

Step 3: Write a post file in the current directory. The file should contain a certain metadata, so use the coleslaw new command, which instantiates a correct file for you.

$ coleslaw new
Created a post 2017-11-06.post .
# or 
CL-USER> (coleslaw-cli:new "post")
Created a post 2017-11-06.post .

Step 4: Generate the site from those post files. The result goes to the staging directory specified in the .coleslawrc file. The staging directory is /tmp/coleslaw/ by default.

$ coleslaw          # or
$ coleslaw generate # or
$ coleslaw stage    # or
CL-USER> (coleslaw-cli:generate) ; or
CL-USER> (coleslaw-cli:stage)    ; --- these are all aliases

Step 5: You can launch a web server to check the result on a browser. (Running a webserver sometimes has a benefit over just opening an html file, e.g. the relative links behaves differently on a file:/// protocol)

$ coleslaw preview     # or
CL-USER> (coleslaw-cli:preview)

Step 6: and watch the file system to automatically regenerate the site!

$ coleslaw watch          # or even better,
$ coleslaw watch-preview  # or, on REPL,
CL-USER> (coleslaw-cli:watch)      ;; watch-preview does not work on REPL right now

Step 7: When you think your article is publishable, run

$ coleslaw deploy             # or
CL-USER> (coleslaw-cli:deploy)

To move the contents in the staging dir to the deploy dir. By default, this deploy command uses rsync to sync the directories, where the deploy dir could be a remote directory on the server which is running your website. By using a plugin, you can customize this behavior e.g. running the deploy on gh-pages.

For further customization, e.g. adding a new plugin, developing a new plugin, changing the deploy option, or creating a new theme, see the config docs.

We provide three default themes: hyde, the default, and readable (based on bootswatch readable).

A core goal of coleslaw is to be both pleasant to read and easy to hack on and extend. If you want to understand the internals and bend coleslaw to do new and interesting things, I strongly encourage you to read the Hacker's Guide to Coleslaw. You'll find some current TODO items towards the bottom.

coleslaw's People

Contributors

abeaumont avatar cipherself avatar cl-ment avatar cmstrickland avatar danieldickison avatar dertuxmalwieder avatar dkochmanski avatar douglarek avatar egao1980 avatar equwal avatar ferada avatar guicho271828 avatar herdigiorgi avatar jsjolen avatar jsmpereira avatar juszczakn avatar khinsen avatar kingcons avatar ljanyst avatar mawis avatar puercopop avatar shinmera avatar shukryzablah avatar sternenseemann avatar svetlyak40wt avatar tychoish avatar vilmibm avatar woudshoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coleslaw's Issues

Code blocks should be able to have default language set

3bmd apparently has the *code-blocks-default-colorize* setting to supply a default language to use for code blocks. It would be great if we can set this from the meta data of a post (or even the global blog settings?). The same would also apply to other settings - I'd even say that having some place to include custom code would be nice, e.g. in the blog settings and in the post meta data.

The other option I see would be modifying 3bmd with additional syntax to set variables, but that seems messier and less general.

Unable to compile blog

Hi, I just pulled your latest change and now I cannot compile my blog any more. The code signal the following error:

debugger invoked on a TYPE-ERROR in thread
#<THREAD "main thread" RUNNING {10029E9523}>:
  The value #<COLESLAW::TAG {10071DFB33}>
  is not of type
    (OR (VECTOR CHARACTER) (VECTOR NIL) BASE-STRING SYMBOL CHARACTER).

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Ignore runtime option --eval "(coleslaw:main \"/home/minh/Documents/Workplace/minhdo.org/deploy/\")".
  1: [ABORT   ] Skip rest of --eval and --load options.
  2:            Skip to toplevel READ/EVAL/PRINT loop.
  3: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

(SB-KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER
 #<unavailable argument>
 #.(SB-SYS:INT-SAP #X7FFFF6CE76A0)
 #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X7FFFF6CE71C0 :TYPE (*
                                                             (STRUCT
                                                              SB-VM::OS-CONTEXT-T-STRUCT))>
 (469 21))

Documentation inconsistency: Date metadata is required

The readme states that Posts require the title: and format: fields.. However Posts require dates as well, otherwise the call ALL-MONTHS signals an error as (subseq nil 0 7) is out of bounds.

Should we modify the readme or modify the code so that it doesn't require the date? Another option would be for the date could be filled with the creating-time of the file which shouldn't be much code.

UNBOUND-VARIABLE

Yes, this always happens after deploying, and pages are fine. I tried to modify the src/indices.lisp according to the ce12c56 and the information changes from

remote: debugger invoked on a UNBOUND-VARIABLE in thread
remote: #<THREAD "main thread" RUNNING {AAF8A09}>:
remote:   The variable COLESLAW::VALID-P is unbound.

to

remote: debugger invoked on a UNBOUND-VARIABLE in thread
remote: #<THREAD "main thread" RUNNING {AAF8A09}>:
remote:   The variable E2D1FFF8AA178BF91748BF1559EBF4BF91666092 is unbound.

How to get a backtrace ? All infomations I got from the git push origin master ?

Ensure DEPLOY is atomic

@datagrok seems to allege otherwise here. Specifically, a new symlink should be created and mv should be used rather than my current update-symlink method in utils.lisp.

Make it possible to use djula as templating engine

Caveman's default template engine is Djula, so the rest of my website is written in Djula. So instead of maintaining two template bases it would be nice to be able to use Djula. I'm planning on implementing this week, is this something that has a possibility to be merged back upstream?

Package COLESLAW-CONF does not exist.

CL-USER> (ql:quickload :coleslaw)
To load "coleslaw":
Load 1 ASDF system:
coleslaw
; Loading "coleslaw"
;
; caught ERROR:
; READ error during COMPILE-FILE:
;
; Package COLESLAW-CONF does not exist.
;
; Line: 72, Column: 42, File-Position: 2833
;
; Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/ebrasca/src/lisp/coleslaw/src/util.lisp" {1006128A73}>
;
; compilation unit aborted
; caught 3 fatal ERROR conditions
; caught 1 ERROR condition

.

Sorry, issue created by mistake! I was unable to delete this :(

Images in posts

I am trying to add images to posts. This works fine if I put the gnus.svg in the static folder.

I reference the image in the post with Gnus and this generates a img
element in the post html like Gnus
and indeed this works.

However if I go the post itself (clicking on the header, or probably through an archive)
the link is not correct anymore, because the post is in that case not located in the root, but in the subfolder posts.

One way of solving this is by putting the full URL in my markdown post. But I rather not do that, because:
1 - It makes moving the blog more cumbersome
2 - Previewing the blog on my laptop in the train will not work. (same reason as 1 actually)

Another way to solve this is by adding a symbolic link from the posts subdirectory to the static folder.

I am tempted to implement this. But if smells funny. Maybe you have a better suggestion?

Kind regards,
Wim Oudshoorn.

Sitemap plugin doesn't create sitemap.xml

The sitemap object doesn't inherit from content. Quick and easy patch works for me:

--- a/plugins/sitemap.lisp	2017-10-03 06:51:49.003216580 +0000
+++ b/plugins/sitemap.lisp	2017-10-03 06:52:04.350754494 +0000
@@ -6,6 +6,7 @@
                           #:find-all
                           #:publish
                           #:theme-fn
+			  #:content
                           #:add-document
                           #:write-document)
   (:import-from :alexandria #:hash-table-values)
@@ -13,7 +14,7 @@
 
 (in-package :coleslaw-sitemap)
 
-(defclass sitemap ()
+(defclass sitemap (content)
   ((urls :initarg :urls :reader urls)))
 
 (defmethod page-url ((object sitemap)) "sitemap.xml")

Fixed bug in Clozure

Under Clozure, generating Atom feeds did not work. I traced the bug back to cl-closure-template, and the fix has been merged there. But I thought I should still say something here in case you want to add a regression test.

Feature wish: Postponed articles

Hi,

in WordPress and some static blog systems there is a way to publish new articles after reaching their timestamp. This is handy if you - like me - have recurring articles like a new music article every Monday at 8:30 a.m.

However, Coleslaw seems to ignore timestamps; if I understand the code correctly, it blindly compiles everything that vaguely resembles a Markdown file immediately and links it on the front page without checking the timestamp first. I propose you to change this behavior.

Error when content line break is CR-LF.

Can you apply the following patch?

--- content.lisp.orig	2016-11-14 12:19:20.537514400 +0900
+++ content.lisp	2016-11-15 17:36:08.327274800 +0900
@@ -70,7 +70,7 @@
 (defun parse-metadata (stream)
   "Given a STREAM, parse metadata from it or signal an appropriate condition."
   (flet ((get-next-line (input)
-           (string-trim '(#\Space #\Newline #\Tab) (read-line input nil))))
+           (string-trim '(#\Space #\Return #\Newline #\Tab) (read-line input nil))))
     (unless (string= (get-next-line stream) (separator *config*))
       (error "The file, ~a, lacks the expected header: ~a" (file-namestring stream) (separator *config*)))
     (loop for line = (get-next-line stream)

COLESLAW::URL unbound error

When I do (coleslaw::main "my/project/path") the above error is signalled.

It is signalled by the static-page plugin when it loads my only defined page and it fails in the following function code:


(defmethod initialize-instance :after ((object page) &key)
  (with-slots (coleslaw::url coleslaw::text format) object
    (setf coleslaw::url (make-pathname :defaults coleslaw::url) <- error here
          format (alexandria:make-keyword (string-upcase format))
          coleslaw::text (render-text coleslaw::text format))))

Since coleslaw::url is unbound the MAKE-PATHNAME call will fail.

This is a minimal .page file for reproducing the bug:

;;;;;
title: 
tags: 
date: yyyy-mm-dd hh:mm:ss
format: md
;;;;;

And this is my .coleslawrc

(:author "Brit Butler"
 :deploy-dir "/home/git/blog/"
 :domain "http://blog.redlinernotes.com"
 :feeds ("lisp")
 :plugins ((analytics :tracking-code "foo")
           (disqus :shortname "my-site-name")
           ; (incremental)  ;; *Remove comment to enable incremental builds.
           (mathjax)
           (sitemap)
           (static-pages)
           ; (versioned)    ;; *Remove comment to enable symlinked, timestamped deploys.
          )
 :routing ((:post           "posts/~a")
           (:tag-index      "tag/~a")
           (:month-index    "date/~a")
           (:numeric-index  "~d")
           (:feed           "~a.xml")
           (:tag-feed       "tag/~a.xml"))
 :sitenav ((:url "http://redlinernotes.com/" :name "Home")
           (:url "http://twitter.com/redline6561" :name "Twitter")
           (:url "http://github.com/redline6561" :name "Code")
           (:url "http://soundcloud.com/redlinernotes" :name "Music")
           (:url "http://redlinernotes.com/docs/talks/" :name "Talks"))
 :staging-dir "/tmp/coleslaw/"
 :title "Improved Means for Achieving Deteriorated Ends"
 :theme "hyde")

problems with static-pages and ccl on ArchLinux

I am using ccl 1.10-r16196 on ArchLinux and I have this static page test.page:

;;;;;
title: test
url: /about.html
;;;;;
Test, foo

and I'm getting this error:

To load "coleslaw":
  Load 1 ASDF system:
    coleslaw
; Loading "coleslaw"
...
;Loading #P"/home/lukas/quicklisp/local-projects/coleslaw/plugins/static-pages.lx32fsl"...
> Error: #<COLESLAW-STATIC-PAGES::PAGE #x18FD26C6> has no slot named COLESLAW-STATIC-PAGES::TEXT.
> While executing: #<CCL::STANDARD-KERNEL-METHOD SLOT-MISSING (T T T T)>, in process listener(1).
> Type :GO to continue, :POP to abort, :R for a list of available restarts.
> If continued: Skip loading "generate.lisp"
> Type :? for other options.

It could be true that I'm doing something wrong but I didn't find to much docs about the static-pages plug-in :/

Feature request: Posts have their own pages

I have started porting over a jekyll blog to coleslaw. The first main issue I came up against was that my entire post was being shown on the index page, when ideally only a preview should be there. Clearly this is a preference of mine and it's fine if it is not the norm. But having this functionality may be useful to others as well.

Can you point me in the right direction so that I can implement this feature myself, eg. is this a feature of the theme or the generator itself.

error in loading quicklisp.lisp

hi.
my vps is debian.

apt-get install sbcl
wget http://beta.quicklisp.org/quicklisp.lisp
sbcl

then i input

  • (load "quicklisp.lisp")

it showS:

debugger invoked on a UNBOUND-VARIABLE in thread #<THREAD
"initial thread" RUNNING
{AAE56C1}>:
The variable “ is unbound.

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.

(SB-INT:SIMPLE-EVAL-IN-LEXENV “ #)
0]

it didn't show: "quicklisp quickstart loaded",why?how to fix it?

tags starting with a `.`

I used the following tag: .net and this made the resulting coleslaw .net tag list not work.

This is not coleslaws fault, it is that apache by default will see the .net as hidden and will not serve it.

Are you open for rewriting the tag name in the directory structure?
(I have not looked yet how easy this is.)

Kind regards,
Wim Oudshoorn.

Standalone Binary Install

Not everyone will want to install SBCL and Quicklisp to run Coleslaw. Those users should just need a config file and the binary dropped on a server. We'll need new install instructions for that case too.

Let's get a standalone binary going with buildapp. How do we support plugins though? :-/

Tags bug

my tags shown in the index page are all "#" and link to "#<TAG {100849E683}>.html"

BTW, I've tried your latest util.lisp and content.lisp, there is an error shown in the sbcl:

TRUENAME of "~/.quicklisp/local-project/coleslaw/plugins/(mathjax).lisp" is not found

tag-index doesn't take into account the page-ext setting.

In the theme templates the extension of the tags are controlled by the page-ext setting. However that tag pages URL built using the value (:routing (:tag-index ...)). This allows the user to configure the blog in an inconsistent state.

In addition the sample config file suggests using an .xml extension in the tag index and doesn't set the page-ext accordingly which would lead to the tag indices URL's to point to 404.

Unable to compile blog

I'm still unable to compile the blog. This time it's a new error. Having tried commenting out some settings, I think the problem is in method deploy :after of plugins/gh-pages.lisp.

INFO: Control stack guard page unprotected
Control stack guard page temporarily disabled: proceed with caution

debugger invoked on a SB-KERNEL::CONTROL-STACK-EXHAUSTED in thread
#<THREAD "main thread" RUNNING {10029E9523}>:
  Control stack exhausted (no more space for function call frames).
This is probably due to heavily nested or infinitely recursive function
calls, or a tail call that SBCL cannot or has not optimized away.

PROCEED WITH CAUTION.

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Ignore runtime option --eval "(coleslaw:main \"/home/minh/Documents/Workplace/minhdo.org/deploy/\")".
  1: [ABORT   ] Skip rest of --eval and --load options.
  2:            Skip to toplevel READ/EVAL/PRINT loop.
  3: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

(SB-KERNEL::CONTROL-STACK-EXHAUSTED-ERROR)
0] 

The slot COLESLAW:DEPLOY-DIR is unbound in the object #<BLOG {1004C978C3}>.

Linux, SBCL 1.3.14debian, coleslaw from Quicklisp.

I am trying to set up a new blog, with source being in ~/quicklisp/local-projects/phoe.github.io.src/ and output dir being ~/quicklisp/local-projects/phoe.github.io/

CL-USER> (ql:quickload :coleslaw)
CL-USER> (coleslaw:main "~/quicklisp/local-projects/phoe.github.io.src/")

Results in:

The slot COLESLAW:DEPLOY-DIR is unbound in the object
#<BLOG {1004C978C3}>.
   [Condition of type UNBOUND-SLOT]

Restarts:
 0: [USE-VALUE] Return a value as the slot-value.
 1: [STORE-VALUE] Store and return a value as the slot-value.
 2: [RETRY] Retry SLIME REPL evaluation request.
 3: [*ABORT] Return to SLIME's top level.
 4: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {10025C7FA3}>)

Backtrace:
  0: (SB-KERNEL:WITH-SIMPLE-CONDITION-RESTARTS ERROR NIL UNBOUND-SLOT :NAME COLESLAW:DEPLOY-DIR :INSTANCE #<COLESLAW::BLOG {1004C978C3}>)
  1: ((:METHOD SLOT-UNBOUND (T T T)) #<unavailable argument> #<COLESLAW::BLOG {1004C978C3}> COLESLAW:DEPLOY-DIR) [fast-method]
  2: (SLOT-VALUE #<COLESLAW::BLOG {1004C978C3}> COLESLAW:DEPLOY-DIR)
  3: (COLESLAW::DIR-SLOT-READER #<COLESLAW::BLOG {1004C978C3}> COLESLAW:DEPLOY-DIR)
  4: ((:METHOD COLESLAW:DEPLOY (T)) #P"/tmp/coleslaw/") [fast-method]
  5: ((SB-PCL::EMF COLESLAW:DEPLOY) #<unavailable argument> #<unavailable argument> #P"/tmp/coleslaw/")
  6: (SB-INT:SIMPLE-EVAL-IN-LEXENV (COLESLAW:MAIN "~/quicklisp/local-projects/phoe.github.io.src/") #<NULL-LEXENV>)
  7: (EVAL (COLESLAW:MAIN "~/quicklisp/local-projects/phoe.github.io.src/"))
 --more--

My .coleslawrc:

(:author "Michał \"phoe\" Herda"
 :deploy-dir "/home/phoe/quicklisp/local-projects/phoe.github.io/"
 :domain "http://phoe.github.io"
 :feeds ("lisp")
 :plugins (;; (analytics :tracking-code "foo")
           ;; (disqus :shortname "phoe")
           (gh-pages :cname t)
           (mathjax)
           (sitemap)
           (static-pages)
           (versioned))
 :routing ((:post           "posts/~a")
           (:tag-index      "tag/~a")
           (:month-index    "date/~a")
           (:numeric-index  "~d")
           (:feed           "~a.xml")
           (:tag-feed       "tag/~a.xml"))
 :sitenav ((:url "http://phoe.github.io/" :name "Home")
           (:url "http://github.com/phoe/" :name "GitHub")
           (:url "http://raptorlauncher-github.io/" :name "Raptor Launcher"))
 :staging-dir "/tmp/coleslaw/"
 :title "phoe's nest"
 :theme "readable")

RST formatter generates HTML document with it's own html/head tags

For example, here what I have in my page:

<!DOCTYPE html>
<html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>12 Forks</title> <meta name\
="viewport" content="width=device-width, initial-scale=1.0"> <link href="/css/bootstrap.min.css" rel="stylesheet" media="scree\
n"> <link href="/css/custom.css" rel="stylesheet" media="screen"> <link rel="alternate" href="/rss.xml" type="application/rss+\
xml" />  </head> <body> <div class="container-fluid"> <div class="row-fluid"> <div class="offset2 span8"> <div class="row-flui\d"> <div class="navbar navbar-inverse"> <div class="navbar-inner"> <a class="brand" href="/">12 Forks</a> <ul class="nav"> <li\> <a href="/1.html">Blog</a> </li><li> <a href="/about.html">About</a> </li><li> <a href="https://github.com/12forks/command-l\ine/releases">Download</a> </li> </ul> </div> </div> </div> <div class="row-fluid"> <!-- POST --> <div class="row-fluid">      <h1 class="page-header"></h1>                                                                                                  <p>  </p> <p class="date-posted"> <!-- POST-BEFORE-DATE-POSTED -->  <!-- POST-AFTER-DATE-POSTED --> </p> <!-- BEFORE_POST_TEXT\
 --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>                                                                                                                         <link rel="stylesheet" href="default.css" type="text/css" />
<title>Rationale</title>
</head>
<body>
<div id="rationale" class="document"><h1 class="title">Rationale</h1>
<p>GitHub is great, but sometimes it is difficult to estimate if there are some valuable code in project's forks. Especially f\
or popular project like xxx.</p>
<p>This script builds a report with all non merged forks and their commit messages. This allows to read or grep through and fi\
nd if there are something useful.</p>

Pay attention to the second DOCTYPE html PUBLIC occurrence.

Cannot run using Quicklisp package

It just gives out the same problem that "valid-p" is unbounded.
After I fixed the code manually like ce12c566, it gives out another error that undefined function: COLESLAW::EXIT.

Error: External-format (:UTF-8) is not a property list

hey, I want to generate locally, then i evaluate the code in slime (backend is ccl).

(ql:quickload :coleslaw) 
(coleslaw:main "~/blog/") 

But i got the error Error: External-format (:UTF-8) is not a property list.

Blow is my directory tree in ~/blog/ and config file:

drwxr-xr-x   5 geekerzp  staff   170B 11  4 00:47 .
drwxr-xr-x+ 79 geekerzp  staff   2.6K 11  4 01:18 ..
-rw-r--r--   1 geekerzp  staff   946B 11  4 00:39 .coleslawrc
drwxr-xr-x   2 geekerzp  staff    68B 11  4 00:34 deploy
drwxr-xr-x   2 geekerzp  staff    68B 11  2 23:21 posts
(:author "Brit Butler"
 :deploy-dir "~/blog/deploy"
 :domain "http://blog.redlinernotes.com"
 :feeds ("lisp")
 :plugins ((analytics :tracking-code "foo")
           (disqus :shortname "my-site-name")
           (mathjax)
           (sitemap)
           (static-pages)
          )
 :routing ((:post           "posts/~a")
           (:tag-index      "tag/~a")
           (:month-index    "date/~a")
           (:numeric-index  "~d")
           (:feed           "~a.xml")
           (:tag-feed       "tag/~a.xml"))
 :sitenav ((:url "http://redlinernotes.com/" :name "Home")
           (:url "http://twitter.com/redline6561" :name "Twitter")
           (:url "http://github.com/redline6561" :name "Code")
           (:url "http://soundcloud.com/redlinernotes" :name "Music")
           (:url "http://redlinernotes.com/docs/talks/" :name "Talks"))
 :staging-dir "/tmp/coleslaw/"
 :title "Improved Means for Achieving Deteriorated Ends"
 :theme "hyde")

Is there anything wrong? Thanks!!!

Emacs lock files

Just a quick question. Would it be ok for you to not process 'hidden' files by default?
(I mean files whose name start with a . as on Unix based file systems.)

The reason is that emacs locks files by creating links whose name is of the form:

.#Filename

Which means that if my-great.post is locked, coleslaw will try to read also .#my-great.post. Which for obvious reasons does not work.

If this is ok, I will make a patch for you to include

Default Hyde mobile theming

The default Hyde theme looks fine IMO, however it is not responsive at all to mobile devices. It would be great if the default theme laid the site out better on mobile.

I'm going to be updating it for mobile myself, will send a PR if wanted.

plugin gh-pages can't work well

SBCL show

Failed to find the TRUENAME of /home/xxxx/blog/.curr

I changed

(defmethod deploy :after (staging)
  (let ((blog (truename (rel-path (deploy-dir *config*) ".curr"))))
    (delete-file (rel-path blog "index.html"))
    (cl-fad:copy-file (rel-path blog "1.html") (rel-path blog "index.html"))
    (with-open-file (out (rel-path blog "CNAME")
                     :direction :output
                     :if-exists :supersede
                     :if-does-not-exist :create)
      (format out "~A~%" *cname*))))

to

(defmethod deploy :after (staging)
  (let ((blog (truename (rel-path (deploy-dir *config*) ""))))
    (delete-file (rel-path blog "index.html"))
    (cl-fad:copy-file (rel-path blog "1.html") (rel-path blog "index.html"))
    (with-open-file (out (rel-path blog "CNAME")
                     :direction :output
                     :if-exists :supersede
                     :if-does-not-exist :create)
      (format out "~A~%" *cname*))))

It can work well now, I don't learn common lisp much and don't understand why. Maybe I do something wrong.

Sorry for my poor English :-(

docutils dependency

How serious is the dependency on docutils? I can't quite get that component built under 64 bit ccl.

I'll rattle J.A.R. Williams chain about docutils, but is there anyway we can do without it for now?

local generation

Is there any simpler approach than needing my own git server, and requiring a post-receive hook setup? Ideally coleslaw could run the whole show itself, and then be used to transfer data to e.g. S3 or similar static serving. I appreciate the intent in the design approach, but it seriously restricts the ease of use.

An Error

; Upgrading ASDF package from version 2.26 to version 2.011
.............................
debugger invoked on a LOAD-SYSTEM-DEFINITION-ERROR in thread #<THREAD
                                                               "initial thread" RUNNING
                                                               {1002C34441}>:
  Error while trying to load definition for system inferior-shell from pathname
  /home/git/quicklisp/dists/quicklisp/software/inferior-shell-20130128-git/inferior-shell.asd:
  The value #<HASH-TABLE :TEST EQUAL :COUNT 15 {1002C7ECC1}>
  is not of type
    LIST.

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [REINITIALIZE-SOURCE-REGISTRY-AND-RETRY] Retry finding system
                                              inferior-shell after
                                              reinitializing the
                                              source-registry.
  1: [ABORT                                 ] Give up on "coleslaw"
  2: [CONTINUE                              ] Ignore runtime option --eval "(ql:quickload 'coleslaw)".
  3:                                          Skip rest of --eval and --load options.
  4:                                          Skip to toplevel READ/EVAL/PRINT loop.
  5: [QUIT                                  ] Quit SBCL (calling #'QUIT, killing the process).

((FLET #:LAMBDA2058) #<TYPE-ERROR {100428E6E1}>)
0] 

I bought a vps on photonvps, while I finished the configuration, this happens. I've Googled but found no answer about inferior-shell, please help :)

Template Variables provided by Coleslaw

Hi,I'm makeing a theme for coleslaw(I'm learning html and css in recent time).And I'd like to put a tag cloud into footer or side navigation then people can visist tags in every page.But I find that can't use variable tags in base template or post template(theme.md).

An idea came to my mind. If we can export tag data to json ?,Maybe we can also export article list to json.That maybe let people make a theme easy(can easy add a archive page, tag cloud etc).

No such file or directory on calling MAIN

I have the directory contents like in https://github.com/phoe/phoe.github.io.src
On calling coleslaw:main:

CL-USER> (coleslaw:main "~/quicklisp/local-projects/phoe.github.io.src/")
To load "puri":
  Load 1 ASDF system:
    puri
; Loading "puri"

; 
; note: deleting unreachable code
; 
; compilation unit finished
;   printed 1 note
; loading #P"/home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/plugins/gh-pages.fasl"
To load "puri":
  Load 1 ASDF system:
    puri
; Loading "puri"

; loading #P"/home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/plugins/mathjax.fasl"
; loading #P"/home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/plugins/sitemap.fasl"
; loading #P"/home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/plugins/static-pages.fasl"
; loading #P"/home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/plugins/versioned.fasl"
; rsync --delete -raz /home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/themes/readable/css .
; rsync --delete -raz /home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/themes/readable/img .
; rsync --delete -raz /home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/themes/readable/js .
; ln -sfn 1.html index.html
; mv /tmp/coleslaw/ /home/phoe/quicklisp/local-projects/phoe.github.io/generated/3709726313
; rm -r /home/phoe/quicklisp/local-projects/phoe.github.io/generated/3709726239/
; ln -sfn /home/phoe/quicklisp/local-projects/phoe.github.io/.curr /home/phoe/quicklisp/local-projects/phoe.github.io/.prev
; ln -sfn /home/phoe/quicklisp/local-projects/phoe.github.io/generated/3709726313 /home/phoe/quicklisp/local-projects/phoe.github.io/.curr
; Evaluation aborted on #<SB-INT:SIMPLE-FILE-ERROR "~@<~?: ~2I~_~A~:>" {10074638D3}>.
CL-USER> (coleslaw:main "~/quicklisp/local-projects/phoe.github.io.src/")
To load "puri":
  Load 1 ASDF system:
    puri
; Loading "puri"

; 
; note: deleting unreachable code
; 
; compilation unit finished
;   printed 1 note
; loading #P"/home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/plugins/gh-pages.fasl"
To load "puri":
  Load 1 ASDF system:
    puri
; Loading "puri"

; loading #P"/home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/plugins/mathjax.fasl"
; loading #P"/home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/plugins/sitemap.fasl"
; loading #P"/home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/plugins/static-pages.fasl"
; loading #P"/home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/plugins/versioned.fasl"
; rsync --delete -raz /home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/themes/readable/css .
; rsync --delete -raz /home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/themes/readable/img .
; rsync --delete -raz /home/phoe/quicklisp/dists/quicklisp/software/coleslaw-20170516-git/themes/readable/js .
; ln -sfn 1.html index.html
; mv /tmp/coleslaw/ /home/phoe/quicklisp/local-projects/phoe.github.io/generated/3709726320
; rm -r /home/phoe/quicklisp/local-projects/phoe.github.io/generated/3709726313/
; ln -sfn /home/phoe/quicklisp/local-projects/phoe.github.io/.curr /home/phoe/quicklisp/local-projects/phoe.github.io/.prev
; ln -sfn /home/phoe/quicklisp/local-projects/phoe.github.io/generated/3709726320 /home/phoe/quicklisp/local-projects/phoe.github.io/.curr

error opening #P"/home/phoe/quicklisp/local-projects/phoe.github.io/generated/3709726320/1.html":
  No such file or directory
   [Condition of type SB-INT:SIMPLE-FILE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {100255FFA3}>)

Backtrace:
  0: ((FLET SB-IMPL::VANILLA-OPEN-ERROR :IN OPEN))
  1: (OPEN #P"/home/phoe/quicklisp/local-projects/phoe.github.io/generated/3709726320/1.html" :DIRECTION :INPUT :ELEMENT-TYPE (UNSIGNED-BYTE 8) :IF-EXISTS NIL :IF-DOES-NOT-EXIST NIL :EXTERNAL-FORMAT :DEFAU..
  2: (CL-FAD:COPY-FILE #P"/home/phoe/quicklisp/local-projects/phoe.github.io/generated/3709726320/1.html" #P"/home/phoe/quicklisp/local-projects/phoe.github.io/generated/3709726320/index.html" :OVERWRITE N..
  3: ((:METHOD COLESLAW:DEPLOY :AFTER (T)) #<unavailable argument>) [fast-method]
  4: ((SB-PCL::EMF COLESLAW:DEPLOY) #<unavailable argument> #<unavailable argument> #P"/tmp/coleslaw/")
  5: (SB-INT:SIMPLE-EVAL-IN-LEXENV (COLESLAW:MAIN "~/quicklisp/local-projects/phoe.github.io.src/") #<NULL-LEXENV>)
  6: (EVAL (COLESLAW:MAIN "~/quicklisp/local-projects/phoe.github.io.src/"))
 --more--

Sitemap does not generated

When I include (sitemap) to plugins setting nothing happens after call to (coleslaw:main ...) while other files generated successfully.
Seems that sitemap plugin does not even get called.
Latest master branch, sbcl 1.2.13, FreeBSD.

Feature wish: Add a search function (this is a race ;-))

Hi,

(sorry, this one will be longish, but I want to make my points clear…,)

having been in the process of transitioning from WordPress to some static (not just flat-file) blog for years now (I’m really lazy), I still haven’t settled to which system to use. Actually, I had found one which I thought would be perfect, then I noticed that the provided solution for searching articles was not working as intended, especially since there was no way to use it without JavaScript. The most important feature of a blog system is a good search functionality, followed by a decent comment solution (but that’s a different thing).

So I’m back on track, looking for the perfect static blog solution. I already have a list of such systems which failed to work well for me (mostly theming- or feature-related issues), so I loosened my requirements a bit. I don’t even care which programming language is used anymore as long as it just works (as in it provides a good search function) and it’s a cool one (as in it’s not JavaScript).

Now here’s what I want:

The perfect static blog solution should, while generating the pages, keep some full-text index of the posts and provide a search function which could be accessed through the front-end (like the article listing but filtered by contents). In case this is already possible, please tell me how - I actually searched the docs and sources but I haven’t found such a functionality.

As I want you to actually consider this - I know - frequent feature wish within the near future, I posted it to several interesting generators’ issue trackers, including yours. I’ll probably use the Static Site Generator which comes up with a sufficient search functionality first.

Thank you in advance.

Trouble to get started

I am trying to setup coleslaw but I have some trouble to get it started.
First some small note, it took me a while to discover that the posts should have as file extension '.post'.

But after I fixed that, it still does not export anything, in my deployment directory I get the following directory listing:

-rw-r--r-- 1 wheel 4041 31 mrt 21:12 1.html
drwxr-xr-x 7 wheel 238 31 mrt 21:12 css
drwxr-xr-x 3 wheel 102 31 mrt 21:12 date
-rw-r--r-- 1 wheel 693 31 mrt 21:12 feed.atom
lrwxr-xr-x 1 wheel 6 31 mrt 21:12 index.html -> 1.html
drwxr-xr-x 3 wheel 102 31 mrt 21:12 posts
-rw-r--r-- 1 wheel 707 31 mrt 21:12 rss.xml
drwxr-xr-x 4 wheel 136 31 mrt 21:12 tag

And as you can see the link for index.html points to nowhere!
I tried debugging a little, but I am not sure what I am looking for. However the function compile blog:

(defun compile-blog (staging)
"Compile the blog to a STAGING directory as specified in .coleslawrc."
(when (probe-file staging)
(run-program "rm -R ~a" staging))
(ensure-directories-exist staging)
(with-current-directory staging
(dolist (dir (list (app-path "themes/~a/css" (theme config))
(merge-pathnames "static" (repo config))))
(when (probe-file dir)
(run-program "cp -R ~a ." dir)))
(do-ctypes (publish ctype))
(render-indices)
(render-feeds (feeds config))))

Seems a bit strange, especially the line (do-ctypes (publish ctype))

Note that when I inspect content I do see my one post, so the reading seems to have worked fine.

Oh, and I am using the latest quicklisp release on ccl.

Hope you can help.

Kind regards,
Wim Oudshoorn.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.