4.1 Search for <head> 4.2 Replace with <head><your code>
4.3 Now you want to repeat this find and replace on every HTML file in your website, select Multi-File Search
4.4 To specify the folder containing your website, select Other, in the next screen select the folder Sites on your idisk / Web.
4.6 To start the procedure, select Replace All
Now, depending on how many pages there are in your website, this can take some time.
You’ll see a dialogue box with a progress status.
5.When ready, stop and save the AppleSript :
Remember, this is just an example to illustrate how it works. (for 1 favicon on all your pages)
You’ll have to repeat the procedure with the specific code for every Site if you want a specific favicon per Site.
Before you start doing this kind of operations on your life website you may want to experiment on a test version first !!!
No problemo, in iWeb instead of Publish to MobileMe, select Publish to a folder.
This will save your website in a (test) folder on your computer.
You can experiment as much as you want in this (test) folder.
If things go wrong, delete the (test) folder and in iWeb, do a Publish to folder again.
Note: when you Publish to a folder on your computer all functions that are managed by the MobileMe servers will not work : most notable are Comments and Search, they will not show.
Just give it a try. You’ll see, doing it is less complicated than reading this Blog Entry :-)
If it’s not your cup of tea, you can try other tools (see below).
(Non of them have the power of TextWragler, they are limited to specific tasks)
iWebBuddy costs $25 but it has a neat interface to enter specific code for every Site.
Tools to automatically enter code in HTML files :
Freeware:
TextWrangler from Bare Bones.
iTweak (aka iWeb Expander) from Guimkie.
To pay:
iWeb Valet from ZiggySoft $19
iWebBuddy from Zarra Studios $25
Favicons
A Favicon is a little custom icon that appears to the left of a website's URL in the address bar of a web browser. They also show up in your bookmarked sites and on the tabs in tabbed browsers.
Favicon is short for Favorites Icon.
15 Feb 2009
How to add favicons to your website when published with iWeb to MobileMe.
Most browsers can show a GIF (including animated ones) or PNG (including full transparency).
All browsers understand the .ico format.
File Name = favicon
Extension = .ico
Dimensions = 16 by 16 pixels or 32 by 32 pixels
Colours : 8-bit or 24-bit
Free on-line favicon generators :
http://www.favicongenerator.com/
http://www.graphicsguru.com/favicon.php
http://www.favicon.cc/
iWeb terminology: Domain = website, Site = subfolder of that website.
If you want to have 1 favicon on all the pages in your website, read Old Toad's tutorial #22 here
If you have a personal domain name that redirects with cname and/or you want a different favicon per Site than this entry may be of use.
The process involves 2 steps : uploading the favicon.ico file(s) and entering the code referring to the favicon in every html page.
Step 1. Uploading the favicon.ico files:
You can’t have 2 files with the same name in one folder, you’ll have to
organise them in sub-folders. (see screen-shot on the right).
Upload the favicon.ico file for each Site to the top folder of that Site.
In some situations, after publishing an update, iWeb “cleans out” the Site folder and removes the .ico file. If you’re in such a situation, you’ll have to upload the .ico files again after every update.
Rread here on how to use Automator to do this repetitive task for you.
Step 2. Code to insert in iWeb generated HTML pages: (in the <head> section)
<link rel="shortcut icon" href="http://www.website.net/Site/favicon.ico" type="image/x-icon"/>
<link rel="icon" href="http://www.website.net/Site/favicon.ico" type="image/x-icon"/>
Note :
- replace "www.website.net" with your personal domain name
- replace "Site" with the name of the Site (attention : case sensitive!!)
Do this for every Site you want a specific favicon.
Use a tool to insert the Site specific code in every html page of that Site.
TextWrangler is Freeware and it fully supports AppleSript (scriptable, recordable, and attachable) so you can easily automate the procedures. Note that you need to change the replace code for every Site.
Some screen shots here just to illustrate how it works.
1. Your HTML files are on MobileMe so you’ll need to mount iDisk in the finder to access them.
2. Open TextWrangler and the first thing you do is Start Recording an AppleScript.
TextWrangler works together with Apple’s AppleSript to record all steps you perform in TextWrangler.
So next time you don’t have to do the work all over again, you only have to start the AppleScript.
You will not see a thing of this recording process, it works completely in the background.
When you are ready and stop recording, you’ll be asked to save the script. See later on.
3. Select the first index.html file you find in your website.
4. Enter the Find and Replace code :
Location of your website on MobileMe :
iDisk / Web / Sites /
File / Open
iDisk / Web / Sites / index.html
on your computer