Chapter 9: Publishing Schemes

Publish

The publish feature lets you publish the previewed blogs to your .Mac iDisk, and WebDAV or FTP server. You can selectively publish blogs by setting the publish preference when you create the blog or when you edit the blog. Publish copies the local html files to the server based on the publish preferences. iBlog maintains a list of items it copied the last time a publish operation is performed and updates it each time a new publish operation is performed. This list helps publish to determine which files have to be created, modified or deleted on the server. You can reset the Publish state to copy over all the files to the server. If you change your publish destination (new server) and would like to copy all the files, choose "Reset Publish State and Publish" in "Blogs" menu. Currently iBlog supports .Mac/iDisk, WebDAV, AFP and FTP publishing schemes.

Publish Locations


Each publish location denotes a unique destination for publishing blogs. Currently FTP, AFP, Dot Mac and WebDAV publishing schemes are supported by iBlog. You can create new locations from the publish preferences panel in application preferences. You can assign zero or more blogs to each publish location. When assigning multiple blogs to a location, make sure you don't have more than one blog with "Copy Blog Folder" option unchecked. If you have more than one blog which is assigned to the same location and whose "Copy Blog Folder" option is unchecked then one blog will overwrite the contents of the other.

Assign Blog and Copy Blog Folder options

If you choose the "Assign Blog" option, the blog is published to this location the next time you click the publish button. If you choose the "Copy Blog Folder" option, a blog folder is created at the destination path on the server and all its contents of the local blog are copied over to the blog folder on the server. "Copy Blog Folder" option lets you publish multiple blogs to the same destination folder on the server. Usually you can have one blog with unchecked "Copy Blog Folder" option which serves as the primary blog. If "Copy Blog Folder" option is unchecked then the blog folder's contents are directly copied over to the destination folder on the server. "Copy Blog Folder" tells iBlog to copy the blog folder to the destination folder on the server. If "Copy Blog Folder" is checked then the whole blog folder is copied to the destination folder, if "Copy Blog Folder" is unchecked then the contents of the blog folder are copied to the destination folder.

Note: If you are confused about the "Copy Blog Folder" option then it is always easier to create a unique publish location for each blog.

.Mac Publish Location


1. Location Name: A unique name that identifies each publish location.
2. Username: Your .Mac account username.
3. Password: Your .Mac account password.
4. Copy To Folder: This is usually "Sites/". Copy To Folder path should begin with Sites/
iBlog asks the Finder to mount the iDisk by sending an Apple Event. Once the disk is mounted, iBlog looks for the "Copy To Folder" path in the mounted disk, if it doesn't exist, iBlog creates one. Then iBlog proceeds to copy the appropriate files and folders from ~/Sites/iblog folder to the "Copy To Folder" folder in the mounted disk. [~ is your Home folder]. After successful upload iBlog launches your default web browser to view the published blog's main page.

.Mac Publishing in iBlog

To publish a blog you have to create a publish location and assign the blog to it.

Setting a publish location

1. Go to iBlog application preferences.
2. Click the publish toolbar icon.
3. Choose ".Mac" in the Popup button and click the "New Location" button.
4. Enter a unique location name, dot mac username and password.
5. Set the "Copy To Folder" value to "Sites/iblog/"
6. Check the "Assign Blog" option.
7. Save the publish location settings and close the preferences window.
8. Click the publish button.
In Jaguar (OS X 10.2.x) always mount the iDisk in the Finder before clicking the publish button.

In Panther (OS X, 10.3.x), it is best to turn on "Create a local copy of your iDisk" preference in iDisk prefs in .Mac Panel in System Preferences, and let the system handle the synchronization of the files.

Example If you want your blog to be published at http://homepage.mac.com/username/iblog
Sample blog settings:
Username: xyz
Password: *******
Copy to folder: Sites/iblog
Select blogs for this location:
1) Assign Blog - Check this
2) Copy Blog Folder - Uncheck this

If you want your blog to be published at http://homepage.mac.com/username/iblog/myblog then set the "Copy to folder" to Sites/iblog/myblog

Publishing Multiple Blogs to .Mac

The initial blogs index page (page with blog names and descriptions) is not uploaded when you publish the blogs. This page is only used in preview. If you want to publish three blogs to your .Mac site then I advice you to create three .Mac publish locations and assign one blog to each one. You only have to use a different "Copy To Folder" value in each location.

For eg:
Copy To Folder: Sites/iblog/blog1
Copy To Folder: Sites/iblog/blog2
Copy To Folder: Sites/iblog/blog3

The choose "Reset Publish State and Publish" in the Blogs Menu.

WebDAV Publish Location


1. Location Name: A unique name that identifies each publish location.
2. Username: Your WebDAV account username.
3. Password: Your WebDAV account password.
4. WebDAV URL: The URL thats points to your WebDAV disk. For Dot Mac this URL is of the form "idisk.mac.com/username" where username is your .Mac account username.
5. Copy To Folder: This is the path to the destination folder on the server to upload the blog files. Note that Copy To Folder and Website URL are related. For dot mac this is usually "Sites/".
6. Mount Point: This specifies the path to mount the WebDAV disk. This is of the form "/Volumes/VolumeName" for Dot Mac this is of the form "/Volumes/username" where username is your dot mac account username.
7. Website URL: This is the URL to access your published blogs.

iBlog uses mount_webdav to mount alternate WebDAV enabled server disks at the mount point specified. Once the disk is mounted, iBlog looks for the "Copy To Folder" path in the mounted disk, if it doesn't exist, iBlog creates one. Then iBlog proceeds to copy the appropriate files and folders from ~/Sites/iblog folder to the "Copy To Folder" folder in the mounted disk. [~ is your Home folder]. After successful upload iBlog launches your default web browser to view the published blog's main page.

AFP Publish Location


1. Location Name: A unique name that identifies each publish location.
2. Username: Your AFP account username.
3. Password: Your AFP account password.
4. AFP URL: The URL thats points to your AFP server/volume.
5. Copy To Folder: This is the path to the destination folder on the server to upload the blog files. Note that Copy To Folder and Website URL are related.
6. Mount Point: This specifies the path to mount the AFP volume. This is of the form "/Volumes/VolumeName".
7. Website URL: This is the URL to access your published blogs.
iBlog uses mount_afp to mount AFP volumes at the mount point specified. Once the volume is mounted, iBlog looks for the "Copy To Folder" path in the mounted volume, if it doesn't exist, iBlog creates one. Then iBlog proceeds to copy the appropriate files and folders from ~/Sites/iblog folder to the "Copy To Folder" folder in the mounted volume. [~ is your Home folder]. After successful upload iBlog launches your default web browser to view the published blog's main page.

FTP Publish Location


1. Location Name: A unique name that identifies each publish location.
2. Username: Your FTP account username.
3. Password: Your FTP account password.
4. Server Name/IP: FTP server host name or IP address.
5. Copy To Folder: The destination folder on the FTP server to upload the HTML files to. Note: The path to the destination folder should be an absolute path (beginning with '/' for Unix based servers).
6. Timeout Interval: You can set the timeout interval for login and data transfers. If the operation doesn't complete in the set timeout interval then it is suspended.
7. Website URL: The document root or base URL to the published website. This URL is also used in the generated RSS/XML feed files.

iBlog connects to the FTP server using the Username, Password and Server IP.. After successful connection iBlog changes to the destination ("Copy To Folder") folder. If the destination folder doesn't exist then iBlog creates one. Then iBlog proceeds to copy the appropriate files and folders from ~/Sites/iblog folder to the "Copy To Folder" folder on the FTP server. [~ is your Home folder]. After successful upload iBlog launches your default web browser to view the published blog's main page. iBlog reports any problems while uploading with an alert message.

The "Copy To Folder" path should refer to a folder on the server from which the web server can fetch the html files. Check with your server administrator about the web server "Document Root" folder and ask him/her where you can upload the html files. The website URL will depend on the path you set in the Copy To Folder path.

For eg:
Server Name/IP: ftp.ibloggers.net
Copy To Folder: public_html/weblog
Website URL: http://www.ibloggers.net/weblog

Here "public_html" is the Document Root for the web server. If your server is ftp.myserver.com and you go to http://www.myserver.com /index.html then the web browser will display the index.html file in the Document Root folder of the ftp.myserver.com server.

Local Publish Location


1. Location Name: A unique name that identifies each publish location.
2. Copy To Folder: Full path to a folder on the local machine.
3. Website URL: This is the URL to access your published blogs.
iBlog copies the appropriate files and folders from ~/Sites/iblog folder to the "Copy To Folder" path on the local machine. [~ is your Home folder].

Publishing
After you create a publish location and assign the blog to it. You can click the publish button or choose "Publish" from the "Blogs" menu.



Blog Address

When you Preview your blog, a URL is generated that refers to a local file on your computer. The URL is of the form file:///Users/...... Click the "Publish" button in iBlog inorder to upload your blog to the server. Once the publish process is done, the web browser is automatically launched and displays your blog page. Copy the URL from the address bar in the browser and email this link to your friends. You can also click on the email button at the bottom of the main window to email the weblog address to your contacts.