coleslaw-org / coleslaw

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

Sitemap plugin doesn't create sitemap.xml #142

Open shelvick opened 7 years ago

shelvick commented 7 years ago

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")
PuercoPop commented 7 years ago

@shelvick Thanks for reporting this issue. However I don't think sitemap should subclass content but rather index. From hacking.md

Roughly speaking, a POST is a blog entry and an INDEX is a collection of POSTs or other content. An INDEX really only serves to group a set of content objects on a page, it isn't content itself.

This used to be the case. We should probably see what is needed to restore that. I think it may be asserting a route for the sitemap in the config

cipherself commented 6 years ago

This is still an issue and @shelvick's patch doesn't even work anymore.

SerialDev commented 4 years ago

This issue has been open for a while, any suggestions on how to move this forward quickly?