Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

publish which files?

When I use Publish article, changed files only:
CD uploads many files that are not connected to the page. It seems to like some pictures used elsewhere and some files in the root of the CD tree.

Which files are uploaded and why? It does upload some files which I don't want to publish/update yet.

I expect only uploading of files of which the magic names are used in the page selected for upload.

Adriaan van den Brand
Monday, September 2, 2002

There are actually two steps to any "publish" operation.

In the first step, CityDesk assembles a copy of the site on your hard drive, in a temporary directory. We'll call this step "ASSEMBLY" for the purpose of the conversation.

In the second step, CityDesk uploads files to the web server. We'll call this step "UPLOAD."

There are three ways you could publish, with slightly different behavior (I admit, this is more confusing than it should be)

A) You could click the "publish" button on the toolbar in an article
B) You could publish from the main window and check "Publish all Files" in the dialog
C) You could publish from the main window and check "Publish Changed Files" in the dialog.

Here are how these three options differ:

(A) does not ASSEMBLE any articles other than the one you are working on, to save time. It is a "publish this article" button. It is useful when you have a simple typo to correct. In particular, if you have another article somewhere else with a foreach loop that references this article, that other article will NOT be ASSEMBLED. It will also ASSEMBLE any non-article files if they are referenced using magic names (PTMFOG...) by the current article (e.g. embedded images) OR if they contain CityScript. The last clause is a little weird -- it means if you have an HTML file (NOT an article) that contains CityScript it will be ASSEMBLED whenever you publish ANY file. This is especially useful if you have an index.html file in your site with your table of contents, as it will be ASSEMBLED every time you publish any article from within the article window.

(B) and (C) ASSEMBLE all articles.

As for uploading:

(A) and (C) UPLOAD any files of any type (including articles) that have changed -- in other words, if we think that the version in the temporary assembly point is different than the version on the server, it will be UPLOADED.
(B) UPLOADS all files, whether or not we think the server is up to date.

Hope that explains it!

Joel Spolsky
Tuesday, September 3, 2002

Thanks. Your explanation helps a lot!

as A) ASSEMBLES all files (not articles) which contain cityscript, it will also update some indexes and xml files (for RSS) with references to other articles which have not yet been published. This may cause broken links.

I was in the assumption that i could postpone publishing of some files by selectively publishing articles using A). I now see that this is not a safe way of work. But then, A) is also not a safe option if you just want to correct a typo since it may include work-in-progress in some index files.

I only expect the files with cityscript, which are not referenced by the article, to be updated when I use B) or C)


Adriaan van den Brand
Wednesday, September 4, 2002

I have this article "menu" which is included from the templates into every article (via a variable).

If I change the menu article and hit the publish button from inside the article, ONLY the menu article is updated... and not the articles it is used in.

Adriaan van den Brand
Tuesday, September 10, 2002

Right, that's the design.

If article A includes article B somehow, and article B changes, the article-publish button won't republish A.

However if an embedded HTML file (not an article) A includes article B somehow, and article B changes, the article-publish button WILL republish file A.

Joel Spolsky
Wednesday, September 11, 2002

*  Recent Topics

*  Fog Creek Home