This is the cl-bloggy Reference Manual, version 2.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:41:44 2024 GMT+0.
cl-bloggy/cl-bloggy.asd
cl-bloggy/package.lisp
cl-bloggy/classes.lisp
cl-bloggy/conditions.lisp
cl-bloggy/hunchentoot-handler.lisp
cl-bloggy/request-processing.lisp
cl-bloggy/content.lisp
cl-bloggy/uri-processing.lisp
cl-bloggy/generate-rss.lisp
cl-bloggy/generate-css.lisp
cl-bloggy/generate-html.lisp
cl-bloggy/cl-bloggy.lisp
The main system appears first, followed by any subsystem dependency.
cl-bloggy
A self hosted and extensible blogging system built atop Hunchentoot.
The user writes blog entries by connecting to their remote image with sly/slime and
creates new entries by writing HTML using spinneret.
K1D77A
GPL-3
2.0.0
hunchentoot
(system).
spinneret
(system).
alexandria
(system).
lass
(system).
str
(system).
xml-emitter
(system).
do-urlencode
(system).
closer-mop
(system).
local-time
(system).
lorem-ipsum
(system).
package.lisp
(file).
classes.lisp
(file).
conditions.lisp
(file).
hunchentoot-handler.lisp
(file).
request-processing.lisp
(file).
content.lisp
(file).
uri-processing.lisp
(file).
generate-rss.lisp
(file).
generate-css.lisp
(file).
generate-html.lisp
(file).
cl-bloggy.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-bloggy/cl-bloggy.asd
cl-bloggy/package.lisp
cl-bloggy/classes.lisp
cl-bloggy/conditions.lisp
cl-bloggy/hunchentoot-handler.lisp
cl-bloggy/request-processing.lisp
cl-bloggy/content.lisp
cl-bloggy/uri-processing.lisp
cl-bloggy/generate-rss.lisp
cl-bloggy/generate-css.lisp
cl-bloggy/generate-html.lisp
cl-bloggy/cl-bloggy.lisp
cl-bloggy/classes.lisp
package.lisp
(file).
cl-bloggy
(system).
*blog-index-directory*
(special variable).
*blog-root-directory*
(special variable).
acceptor
(reader method).
acceptor
(reader method).
(setf acceptor)
(writer method).
atom-request
(class).
author
(reader method).
(setf author)
(writer method).
blog
(reader method).
blog
(reader method).
blog
(reader method).
(setf blog)
(writer method).
blog
(class).
categories
(reader method).
(setf categories)
(writer method).
category
(reader method).
category
(reader method).
(setf category)
(writer method).
(setf category)
(writer method).
category
(class).
category-request
(class).
children
(reader method).
(setf children)
(writer method).
content
(reader method).
content
(reader method).
content
(reader method).
(setf content)
(writer method).
(setf content)
(writer method).
(setf content)
(writer method).
content
(class).
date
(reader method).
description
(reader method).
description
(reader method).
(setf description)
(writer method).
(setf description)
(writer method).
domain
(reader method).
(setf domain)
(writer method).
entries
(reader method).
(setf entries)
(writer method).
entry
(class).
id
(reader method).
index
(reader method).
(setf index)
(writer method).
index
(class).
language
(reader method).
(setf language)
(writer method).
name
(reader method).
(setf name)
(writer method).
parent
(reader method).
(setf parent)
(writer method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
r-method
(reader method).
request
(reader method).
rss-category-request
(class).
rss-request
(class).
special-request
(class).
split-uri
(reader method).
subtitle
(reader method).
(setf subtitle)
(writer method).
sym
(reader method).
sym
(reader method).
(setf sym)
(writer method).
title
(reader method).
title
(reader method).
(setf title)
(writer method).
(setf title)
(writer method).
unpublished-entry
(class).
uri
(reader method).
%convert-month-to-n
(method).
%convert-month-to-n
(method).
add-new-blog
(method).
clean-string
(function).
make-blog
(function).
make-id
(function).
new-blog-entry
(function).
new-date-timestamp
(function).
url
(reader method).
url
(reader method).
cl-bloggy/conditions.lisp
classes.lisp
(file).
cl-bloggy
(system).
blog
(reader method).
bloggy-condition
(condition).
cat-list
(reader method).
(setf cat-list)
(writer method).
category
(reader method).
category
(reader method).
content
(reader method).
(setf content)
(writer method).
display-condition
(generic function).
exceeded-category-depth
(condition).
feature
(reader method).
(setf feature)
(writer method).
http-code
(reader method).
instructions
(reader method).
(setf instructions)
(writer method).
malformed-url
(condition).
message
(reader method).
missing-categories
(condition).
missing-content
(condition).
missing-required-feature
(condition).
request-condition
(condition).
rss%bad-categories
(condition).
unknown-content
(condition).
cl-bloggy/hunchentoot-handler.lisp
conditions.lisp
(file).
cl-bloggy
(system).
acceptor-dispatch-request
(method).
add-route
(method).
blog
(reader method).
(setf blog)
(writer method).
bloggy-acceptor
(class).
make-route
(function).
remove-route
(method).
routes
(reader method).
(setf routes)
(writer method).
delete-route-by-sym
(function).
route
(type).
routep
(function).
cl-bloggy/request-processing.lisp
hunchentoot-handler.lisp
(file).
cl-bloggy
(system).
determine-request-type
(generic function).
handle-unknown-uri
(generic function).
process-special-request
(generic function).
%non-rss-request-type
(function).
%rss-request-type
(function).
%validate-url
(function).
cl-bloggy/content.lisp
request-processing.lisp
(file).
cl-bloggy
(system).
acceptor
(reader method).
(setf acceptor)
(writer method).
add-content
(generic function).
data
(reader method).
(setf data)
(writer method).
easy-image
(function).
find-content
(generic function).
image-content
(class).
mime
(reader method).
(setf mime)
(writer method).
name
(reader method).
(setf name)
(writer method).
path
(reader method).
(setf path)
(writer method).
uploaded-content
(class).
url
(reader method).
(setf url)
(writer method).
cl-bloggy/uri-processing.lisp
content.lisp
(file).
cl-bloggy
(system).
process-uri
(generic function).
cl-bloggy/generate-rss.lisp
uri-processing.lisp
(file).
cl-bloggy
(system).
generate-rss
(generic function).
cl-bloggy/generate-css.lisp
generate-rss.lisp
(file).
cl-bloggy
(system).
*colourfour*
(special variable).
*colourone*
(special variable).
*colourthree*
(special variable).
*colourtwo*
(special variable).
page-css
(generic function).
cl-bloggy/generate-html.lisp
generate-css.lisp
(file).
cl-bloggy
(system).
*default-css*
(special variable).
html-body
(generic function).
html-footer
(generic function).
html-headers
(generic function).
to-html
(generic function).
%format-tags
(function).
cl-bloggy/cl-bloggy.lisp
generate-html.lisp
(file).
cl-bloggy
(system).
*max-category-depth*
(special variable).
all-children
(method).
category-names
(method).
clean-category
(generic function).
delete-category
(method).
delete-category
(method).
delete-category
(method).
delete-entry
(generic function).
easy-blog-entry
(macro).
entries-in-category
(function).
find-categories
(function).
find-category
(function).
find-entry
(generic function).
format-timestamp
(generic function).
new-blog
(function).
new-content
(function).
new-index
(function).
%recurse-categories-children
(function).
%recurse-categories-parents
(function).
category-all-urls
(method).
make-children
(function).
Packages are listed by definition order.
cl-bloggy
bloggy
common-lisp
.
*blog-index-directory*
(special variable).
*blog-root-directory*
(special variable).
*colourfour*
(special variable).
*colourone*
(special variable).
*colourthree*
(special variable).
*colourtwo*
(special variable).
*default-css*
(special variable).
*max-category-depth*
(special variable).
acceptor
(generic reader).
(setf acceptor)
(generic writer).
add-content
(generic function).
add-route
(generic function).
all-children
(generic function).
atom-request
(class).
author
(generic reader).
(setf author)
(generic writer).
blog
(generic reader).
(setf blog)
(generic writer).
blog
(class).
bloggy-acceptor
(class).
bloggy-condition
(condition).
cat-list
(generic reader).
(setf cat-list)
(generic writer).
categories
(generic reader).
(setf categories)
(generic writer).
category
(generic reader).
(setf category)
(generic writer).
category
(class).
category-names
(generic function).
category-request
(class).
children
(generic reader).
(setf children)
(generic writer).
clean-category
(generic function).
content
(generic reader).
(setf content)
(generic writer).
content
(class).
data
(generic reader).
(setf data)
(generic writer).
date
(generic reader).
delete-category
(generic function).
delete-entry
(generic function).
description
(generic reader).
(setf description)
(generic writer).
determine-request-type
(generic function).
display-condition
(generic function).
domain
(generic reader).
(setf domain)
(generic writer).
easy-blog-entry
(macro).
easy-image
(function).
entries
(generic reader).
(setf entries)
(generic writer).
entries-in-category
(function).
entry
(class).
exceeded-category-depth
(condition).
feature
(generic reader).
(setf feature)
(generic writer).
find-categories
(function).
find-category
(function).
find-content
(generic function).
find-entry
(generic function).
format-timestamp
(generic function).
generate-rss
(generic function).
handle-unknown-uri
(generic function).
html-body
(generic function).
html-footer
(generic function).
html-headers
(generic function).
http-code
(generic reader).
id
(generic reader).
image-content
(class).
index
(generic reader).
(setf index)
(generic writer).
index
(class).
instructions
(generic reader).
(setf instructions)
(generic writer).
language
(generic reader).
(setf language)
(generic writer).
make-route
(function).
malformed-url
(condition).
message
(generic reader).
mime
(generic reader).
(setf mime)
(generic writer).
missing-categories
(condition).
missing-content
(condition).
missing-required-feature
(condition).
name
(generic reader).
(setf name)
(generic writer).
new-blog
(function).
new-content
(function).
new-index
(function).
page-css
(generic function).
parent
(generic reader).
(setf parent)
(generic writer).
path
(generic reader).
(setf path)
(generic writer).
process-special-request
(generic function).
process-uri
(generic function).
r-method
(generic reader).
remove-route
(generic function).
request
(generic reader).
request-condition
(condition).
routes
(generic reader).
(setf routes)
(generic writer).
rss%bad-categories
(condition).
rss-category-request
(class).
rss-request
(class).
special-request
(class).
split-uri
(generic reader).
subtitle
(generic reader).
(setf subtitle)
(generic writer).
sym
(generic reader).
(setf sym)
(generic writer).
title
(generic reader).
(setf title)
(generic writer).
to-html
(generic function).
unpublished-entry
(class).
uploaded-content
(class).
uri
(generic reader).
%convert-month-to-n
(generic function).
%format-tags
(function).
%non-rss-request-type
(function).
%recurse-categories-children
(function).
%recurse-categories-parents
(function).
%rss-request-type
(function).
%validate-url
(function).
add-new-blog
(generic function).
category-all-urls
(generic function).
clean-string
(function).
delete-route-by-sym
(function).
make-blog
(function).
make-children
(function).
make-id
(function).
new-blog-entry
(function).
new-date-timestamp
(function).
route
(type).
routep
(function).
unknown-content
(condition).
url
(generic reader).
(setf url)
(generic writer).
Definitions are sorted by export status, category, package, and then by lexicographic order.
ACCEPTOR - The acceptor you want to add this entry to, ie your instance of ’bloggy-acceptor.
ENTRY-CLASS - The class you want your blog entry to be, normally this would be your
own subclass of ’entry, this is used to determine the HTML and CSS that is generated and
allows you to maximize customizability.
CATEGORIES - This is a list of categories like (’general’ ’programming’), a category object
is searched for and if one cannot be found then one is generated for later.
Categories are found via that list, so a category is the product of its parents, and
their parents parents etc, this means that (’general’ ’programming’ ’lisp’ ’common lisp’)
and (’general’ ’programming’ ’common lisp’) do not resolve to the same category, however
they would both be children of the category ’programming’.
TITLE - The title for the entry.
SYM - A keyword used to reference this blog within CL.
DATE - Is a list that is passed to the function ’new-date-timestamp’ this accepts
keyword arguments that would be used with local-time:encode-timestamp in order to
generate a timestamp for that blog entry. This determines the order they are displayed in
both the index and the main page.
SUBTITLE - This is an optional subtitle.
DESCRIPTION - This is an option description. In the case this is provided then the RSS
feed will display this instead of the result of evaluating the function in content.
The description is also displayed on the index page.
LET-BINDINGS-TO-OVERRIDE-GLOBAL-VARS - This gives you an opportunity to per entry
lexically bind any of the global variables. Although I have not tested this so idk if
it works.
Given an ACCEPTOR (where your blog is stored), a path to an image (string)
and a KEY (keyword), creates a new instance of ’image-content and stores it within
the content object within your blog.
Returns all of the entries that are associated with CATEGORY within BLOG.
Attempts to find the category that is in list.
List contains the names of the categories, say (’general’ ’programming’ ’common lisp’
’generics’) the correct category would be the very final one, that is a child of
each of those categories successively, if you swapped ’common lisp’ for ’clojure’ then
the final category would have to be new. So categories are found by their parents.
Initializes the main blog within ACCEPTOR. This must be called before both new-index and new-content. BLOG-CLASS should ideally be a subclass of blog. Uses (url (make-instance BLOG-CLASS)) to determine the url to put the main page. Defaults to /blog/main.
Initialize the main content repo within (blog acceptor) using the class CONTENT-CLASS. Ideally CONTENT-CLASS will be a subclass of content.
Initializes the main index page within (blog acceptor) using the class INDEX-CLASS.
Ideally INDEX-CLASS will be your subclass of ’index. Uses (url (make-instance INDEX-CLASS))
to determine where to put the route for the index page.
Defaults to /blog/index
uploaded-content
)) ¶automatically generated reader method
blog
)) ¶This is the top level acceptor where the blog object is stored.
special-request
)) ¶automatically generated reader method
uploaded-content
)) ¶automatically generated writer method
Stores content under key in E.
bloggy-acceptor
) (content uploaded-content
) key) ¶blog
) (content uploaded-content
) key) ¶adds CONTENT to BLOG under KEY.
bloggy-acceptor
)) ¶Adds a route to your acceptor, the acceptor is what you used to start hunchentoot
bloggy-acceptor
)) ¶automatically generated reader method
blog
.
request-condition
)) ¶blog
.
index
)) ¶automatically generated reader method
blog
.
content
)) ¶automatically generated reader method
blog
.
exceeded-category-depth
)) ¶exceeded-category-depth
)) ¶missing-categories
)) ¶rss%bad-categories
)) ¶special-request
)) ¶automatically generated reader method
entry
)) ¶automatically generated writer method
special-request
)) ¶automatically generated writer method
Deletes all the entries that are in that category and then deletes it.
unknown-content
)) ¶content
)) ¶automatically generated reader method
unknown-content
)) ¶content
)) ¶automatically generated writer method
blog
)) ¶automatically generated writer method
uploaded-content
)) ¶uploaded-content
)) ¶A function that when you evaluate returns the byte vector containing the content of the content.
data
.
Deletes a blog entry from (blog acceptor)
bloggy-acceptor
) (entry null
)) ¶bloggy-acceptor
) (entry entry
)) ¶Given an instance of the special-request class (not subclasses)
attempts to determine which subclass it should change-class that instance into.
Can possibly signal ’rss%bad-categories, ’missing-categories, ’missing-content
special-request
)) ¶Displays the condition to the user.
WAY is a keyword argument, right now there are two :internal and :html,
:internal displays the condition as normal, while :html is used for rendering HTML for
the condition. If you look in src/generate-html.lisp you can see how the
request-conditions are formatted for HTML output
unknown-content
) (way (eql :internal)
) &rest args) ¶missing-required-feature
) (way (eql :internal)
) &rest args) ¶missing-categories
) (way (eql :internal)
) &rest args) ¶rss%bad-categories
) (way (eql :internal)
) &rest args) ¶(eql :html)
) &rest args) ¶request-condition
) (way (eql :internal)
) &rest args) ¶missing-required-feature
)) ¶missing-required-feature
)) ¶Finds content under KEY from E.
bloggy-acceptor
) key) ¶Uses CHECK to try and find entry in BLOG.
symbol
) blog) ¶formats timestamp into stream by WAY.
Converts object into RSS using xml-emitter.
entry
)) ¶Generates the rss for an ENTRY object, fills in the default values and in the case that description is non nil then evaluates that function, if it is nil then evaluates the content function instead.
Attempts to handle a request to an unknown URI.
Tries to determine the type of request, which are subclasses of ’special-request.
Decodes the uri, checks it is valid and then creates the correct subclass.
All conditions that are a subclass of ’request-condition
are caught by :around and the conditions
are passed to display-condition with the :html key.
If a condition is a subclass of ’error a new condition is created and that is passed
to display-condition with the :html key.
If all goes well process-special-request is evaluated with the generated request.
Displays PAGE the correct way. If you wanted to change the layout
of a certain page, you would create a new version of html-body for your subclass of
that page. In that case it would be best to simply copy and paste the code for the
superclass and then play with it that way, you dont want to end up breaking functionality.
request-condition
)) ¶Applies the default css sheets listed in *default-css* to the header and then evaluates call-next-method.
request-condition
)) ¶missing-required-feature
)) ¶missing-required-feature
)) ¶bloggy-condition
)) ¶uploaded-content
)) ¶uploaded-content
)) ¶The mimetype obtained with tbnl:mime
mime
.
Generates CSS for page. Uses append method so that each subclass of
page has its CSS appended after. Works with most-specific-last meaning that the
methods are applied like so page -> entry -> my-entry, assuming you have subclassed
something and then created your own version of page-css for it. This is ideal for
CSS as CSS cascades. If you wanted to override the default colours you could create a
new :root and override the values of :–colourone etc.
append
.
:most-specific-last
index
)) ¶Provide default css for all indexes and subclasses of index.
Provide the default CSS for all objects within cl-bloggy.
uploaded-content
)) ¶automatically generated reader method
path
.
uploaded-content
)) ¶automatically generated writer method
path
.
Properly handles the subclass of special-request and serves the content expected.
rss-category-request
)) ¶Attempts to generate an RSS feed for the category in request.
category-request
)) ¶Generate the HTML for content within the categories discovered in the request url. Can signal ’missing-categories and ’missing-content.
rss-request
)) ¶Generates the correct url for E. Key is the method to use.
blog
) (key (eql :category-url)
) &rest args) ¶When (first args) is a category, generates a url for that category.
image-content
) (key (eql :upload)
) &rest args) ¶Generates the URL for im, this is different from the normal content in that the routes are at /images/ rather than /generic/
content
) (key (eql :upload)
) &rest args) ¶Giving IM which is an instance of content, generates a url at ../generic/..
string
) (key (eql :decode)
) &rest args) ¶Decodes the URI string. Used when requests are made to tbnl. Makes use of *max-category-depth* in an attempt to stop DoS attacks which use very large URIs full of fake categories.
entry
) (key (eql :for-route)
) &rest args) ¶Default URI encoding for entries, this is so that entries once created can be
found at the correct uri. This is a workaround with Nginx, nginx seems to be rewriting URLs
so best just decode the URI on request and check that way.
special-request
)) ¶automatically generated reader method
bloggy-acceptor
)) ¶special-request
)) ¶automatically generated reader method
bloggy-acceptor
)) ¶automatically generated reader method
bloggy-acceptor
)) ¶automatically generated writer method
special-request
)) ¶automatically generated reader method
The entry function used to create HTML pages. This method calls ’html-headers’ html-body’ and ’html-footer’ in that order in order to render a page. You can create your own version of this method to modify the functionality for your own subclasses the same goes for the three methods it calls.
request-condition
)) ¶special-request
)) ¶automatically generated reader method
uri
.
bloggy-acceptor
) request) ¶Check the URI in the request against the routes stored within (routes acceptor), if the route is found then serves the content, otherwise executes handle-unknown-uri to try and process the request.
hunchentoot
.
Top level condition for cl-bloggy.
error
.
Signalled by find-category when the category list is greater than *max-category-depth*
Signalled when someone makes a request that is neither for the index or main but is missing blog/main.
(quote 400)
:http-code
Signalled when someone makes a request for sorting by categories but the categories they provided can’t be found.
(quote 404)
:http-code
Signalled when someone makes a request to a url that doesn’t exist.
(quote 404)
:http-code
Signalled when trying to use a function that needs a feature,
for example you try to use easy-image but havent called (add-blog ...).
All conditions that are related to user requests.
The returned HTTP code.
(quote 400)
:http-code
This slot is read-only.
Signalled when someone makes a request to rss.xml but they have used bad categories.
(quote 404)
:http-code
(setf acceptor)
.
acceptor
.
add-content
.
add-new-blog
.
(setf author)
.
author
.
(setf categories)
.
categories
.
category-all-urls
.
(setf content)
.
content
.
(setf description)
.
description
.
(setf domain)
.
domain
.
(setf entries)
.
entries
.
find-content
.
generate-rss
.
html-body
.
html-headers
.
(setf index)
.
index
.
(setf language)
.
language
.
page-css
.
print-object
.
process-uri
.
(setf title)
.
title
.
url
.
list
:entries
(or function nil)
(lambda (cl-bloggy:blog) (declare (ignore cl-bloggy:blog)) "main page")
:title
list
:categories
(or function nil)
(lambda (cl-bloggy:blog) (declare (ignore cl-bloggy:blog)) "author")
:author
string
:domain
(or function nil)
(lambda (cl-bloggy:blog) (declare (ignore cl-bloggy:blog)) "my blog")
:description
string
"en-gb"
:language
cl-bloggy:index
:index
cl-bloggy:content
:content
This is the top level acceptor where the blog object is stored.
:acceptor
list
:content
add-new-blog
.
(setf blog)
.
blog
.
(setf category)
.
category
.
(setf content)
.
content
.
date
.
delete-entry
.
(setf description)
.
description
.
find-content
.
generate-rss
.
html-body
.
html-headers
.
id
.
page-css
.
print-object
.
process-uri
.
process-uri
.
(setf subtitle)
.
subtitle
.
sym
.
(setf title)
.
title
.
to-html
.
cl-bloggy:category
:category
The date
local-time:timestamp
:date
date
.
This slot is read-only.
A keyword used to reference this entry.
keyword
:sym
sym
.
This slot is read-only.
(or null function)
:title
(or null function)
:subtitle
An amalgamation of title and category
string
:id
id
.
This slot is read-only.
function
:content
(or function null)
:description
:category
An entry that doesn’t get published to the blog main page or RSS feeds however a URL is created so it can be viewed on the blog.
Class that is used for storing content within the blog. The content can be retrieved using keywords.
:acceptor
A function that when you evaluate returns the byte vector containing the content of the content.
function
:data
data
.
Recurses over the category and all of its children executing func with the current category and the accumulator as arguments, the result of the funcall is pushed to the accumulator.
Recurses over the category and all of its parents executing func with the current category and the accumulator as arguments, the result of the funcall is pushed to the accumulator.
Attemps to validate the uri which has been split in URI-LIST by comparing it with the url listed for (url BLOG). If it is not then signals ’malformed-url.
downcases, replaces spaces with hyphens and removes white space
Generates the children for the category CURRENT with the names listed in NAMES.
uploaded-content
)) ¶automatically generated reader method
url
.
content
)) ¶automatically generated reader method
url
.
uploaded-content
)) ¶automatically generated writer method
url
.
Jump to: | %
(
A B C D E F G H I L M N P R S T U |
---|
Jump to: | %
(
A B C D E F G H I L M N P R S T U |
---|
Jump to: | *
A B C D E F H I L M N P R S T U |
---|
Jump to: | *
A B C D E F H I L M N P R S T U |
---|
Jump to: | A B C E F G H I M P R S T U |
---|
Jump to: | A B C E F G H I M P R S T U |
---|