Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

.SHTML

I use server-side scripts on my pages to do various things so I want to have all my files named .shtml -- or at the very least have the main one named that.

I can make the main one be named that by renaming the main "index.html" file to be "index.shtml". That, unfortunately, wedges the "preview" mechanism because it insists on starting in "index.html" and there no longer is one, so it lists every file (hundreds of them) and asks me which I want. I've finally decided the solution is to create both, and have the "index.html" be a fast redirect to "index.shtml" but that isn't very satisfactory.

More important is that I don't see any obvious way to make citydesk generate the individual article entries with an "shtml" filename. It looks as if Citydesk "knows" that all files have the file extension "html".

Is there any way to override that? I get an intuition that whatever mechanism permits creation of .xml files would also permit me to create .shtml's, but I'm afraid that this would be in addition, rather than instead, of the .html files. I don't want to have both.


I'm accumulating a list of "things I wish I had" but I'm not going to dump it here now. This is the only one which is actually impeding me from implementing my site.

That said, I am very pleased with this system. It is highly reliable, for one thing. For another, it is really very convenient to use. For a third, it's blazingly fast.

Steven C. Den Beste
Saturday, December 22, 2001

I can't help you with preview but have you tried adding a new file type, "shtml"

View-File types then Add a "shtml" file type.

Then, when you create a new template use "shtml" as the extension.

I haven't done this myself, but I presume it would work for you.

TK
Saturday, December 22, 2001

I have this same preview problem with one site.  It's a small site so it doesn't cause me much of a problem.

But until there is a solution I would just create an "index.html" file containing a link to your "index.shtml" page whenever I started working on the site.  You'd get this page when you Preview so just click on the link to "index.shtml.  Then I would delete it before I published the site.

It's a little trouble but it probably would only take a few seconds to manage and it's better than publishing the index.html and redirecting.

TK
Saturday, December 22, 2001

In the Templates dialog you can change the extension for generated files from .html to anything you want.

Joel Spolsky
Saturday, December 22, 2001

Thank you, Joel; I didn't realize that was there. (RTFM and all that...)

Steven C. Den Beste
Sunday, December 23, 2001

My solution to "not using index.html" involves the fact that I'm running IIS on my box, as my site is all ASP.net. My main page is "index.aspx".

In addition to the IIS web server, I also run the IIS FTP server on my box, and publish to my local box via FTP. It's not quite as fast (though it's still extremely fast), and that let's me specify a startup URL, which looks like http://localhost/somedir/ and then I don't need any contortations (you should be able to use a file: URL if you aren't running a web server, but the original poster would need a web server to make the SHTML work anyway).

Of course, this won't work if you can't run a local FTP server. :) If you can't run IIS, there are plenty of free FTP servers available at http://www.tucows.com/ and the like.

Brad Wilson
Sunday, December 23, 2001

I've come up with a work-around. I have created my own special "Publish" rule which writes to a local disk directory on my computer. I use that instead of the "Preview". In that directory I've manually created an "index.html" file which does a redirect to "index.shtml" (with an HTTP-EQUIV="Refresh").

Steven C. Den Beste
Tuesday, December 25, 2001

*  Recent Topics

*  Fog Creek Home