Re: images in posts
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
hello,
> Pyblosxom does not support images, as the http protocol goes, if you let
> pyblosxom deal with images, it will mean that pyblosxom will be loaded
> everytime for an image. That is a waste of CPU processes. Store your
> image files in your HTDOCS/images directory, for example, and use
> href="/images/foo.jpg" in your links. This is something the webserver
> will handle better, not any of the *osxoms. I believe, this is the
> easiest most common sensical way.
Thanks for the help, things work great now. I have a patch and a new
entry parser; the patch appears below. I'm not sure this is correct, but
it made the difference between working and not working for me. The
entryparser (attached) uses a recent version of docutils to mark up
reStructuredText files with a 'rst' extension.
My blog is at http://ribald.uark.edu/sean/blog. It's still undergoing
quite a bit of work, so it may be flakey from time to time.
Thanks again for the software!
Sean
--- tools.py 28 Mar 2003 08:55:42 -0000 1.27
+++ tools.py 1 Apr 2003 20:59:08 -0000
@@ -306,8 +305,7 @@
if defaultfunc != None and callable(defaultfunc) and donefunc(output)
!= 1:
return defaultfunc(input)
-
- return output
+ return output or input
rst.py
(text/plain, 329 B)
from docutils.core import publish_string
def parse(filename, request):
d = file(filename).read()
title = d.split('\n')[0]
d = d[len(title):]
html = publish_string(d, writer_name='html')
body = html[html.find('<body>') + 6:html.find('</body>')]
return {'title': title,
'body': body}