«« Can I TrackBack Myself? The Hundred-Year Language »»
blog header image
Blog Images

MoveableType organises files in a way that makes putting images in your blog difficult. When I add my images directory, the directory structure looks like:

blog/
   index.html
   archives/
      postXXXX.html
      images/

I want to use relative image paths in my posts so that I can move the directories around and not break the images. But the posts exist in two different directories, blog/ and archives/. Now I could put the archives in the root to solve the problem but that would just make a big mess. Instead I use "images/img.jpg" relative path for images and made a symbolic link in the blog/ directory to archives/images/:

[blog]$ ln -s archives/images images

I'm open to other suggestions as well. There must be a more elegant way to do it.

Posted at April 18, 2003 at 12:36 AM EST
Last updated April 18, 2003 at 12:36 AM EST
Comments

How are the actual blog posts stored? Why not just read everything from the archives onto the main page...

(Keep in mind I know nothing about MovableType...)

» Posted by: Peter at April 18, 2003 12:51 PM

They are stored in a database and the pages are generated statically. There's one page in the archives for each post and then an index that has posts from the last 7 days.

» Posted by: ryan at April 18, 2003 01:56 PM

"Why not just read everything from the archives onto the main page?"

If you read the posts into the index (ie. with a PHP include()) they'll be looking for images in images/ directory from blog/ which doesn't exist without the symbolic link. Relative paths complicates things.

Besides, I don't want to make my own index page. It's a lot more work than a symbolic link - and less elegant. I want to work with MoveableType not against it.

» Posted by: ryan at April 18, 2003 02:08 PM

I like 'ln -s archives/images images'. I think it's elegant and classy :-P

» Posted by: roy at April 18, 2003 03:07 PM

i have blogger FREE will with work on it?

» Posted by: at October 4, 2003 10:48 AM

how can i change the background on my blog? do u know how to? please e-mail me!

» Posted by: brittany at April 20, 2004 02:37 PM
Google
 
Search scope: Web ryanlowe.ca