Publishing is the step of website construction that transforms your Sparkle layouts into a world-viewable website, comprised of HTML, CSS, images and Javascript.

You can publish your site either when you’re done building it, or for a live test. You initiate publishing via the “Publish website…” option in the File menu or through the "Publish" icon in the toolbar.

On first publish you will have to set up a location. Click on the “Setup…” button to get started.

A publishing location stores all settings so that updating the site is a single click away. Sparkle also uses the location information to only publish actually changed files.

Sparkle's publish popup

Where to publish

To publish your site to the web you will need to have a hosting plan with a web hosting company. This isn’t included in Sparkle. We generally recommend any of the top sites listed on this ReviewSignal page.

Sparkle can:

  • Publish to the web, Sparkle will transfer files to your web host with its built-in ftp client;
  • Export to disk, Sparkle will generate the files on disk, you will need to transfer files on your own using a third party tool, such as Cyberduck or FileZilla.

The initial screen reflects this.

Export to disk

Exporting to disk is straightforward, you are requested to pick a folder and name the location. Additionally the text encoding option lets you choose how non-ASCII characters are represented in the web page code. It conservatively defaults to ASCII text, which makes the page source somewhat larger but is compatible with all web servers. You can set it to UTF-8 for a more compact page source if you know the server is compatible (the browser will otherwise show incorrect characters). This setting is auto-detected when Sparkle publishes directly to the web.

By default Sparkle produces high performance HTML that works when uploaded to a web server. If you intend to load the HTML files directly in the browser from the local disk you will need to set the code generation option to “Offline compatible”.

Some website features can’t work in offline compatible mode due to how the reliance on PHP (which can only run on a server) or because of how underlying component works, specifically:

Publish to the web

Publishing to the web is more complex, but while it has some upfront annoyance, once it’s done you can subsequently publish updates with a few clicks.

Initially you need to tell Sparkle at what address your site will live on the web. This should not include any detail about the hosting for the site.

While referencing your web host’s settings, either in an email or in the section of their web portal that discusses FTP and domain management, fill in the setup screen:

Sparkle needs the web address because it will check that the FTP space it connects to corresponds to the web address you want. This helps autodetect a number of settings that ensure Sparkle works with the widest variety of web hosts and servers.

Your web host will provide the server address and user name and password. They might also suggest a preferred protocol. You can use the advanced section for that.

A higher number of connections generally corresponds to a faster transfer speed, though will also need a faster connection for the higher number of connections. Some web hosts limit the number of connections, in some cases blocking any further connection for some time, and note that this counts for all apps you might have open on your Mac. For example if your web host only allows a single connection and you already have an FTP app open, Sparkle might not be able to connect.

Settings communicated by your web host:
The FTP server name

The FTP username

The FTP password or the server SSH key

Number of connections to the server

The protocol generally works with auto-detection, but you can manually set it based on your web host’s suggestions if Sparkle has trouble connecting

Setup completion

If the connection succeeds and your web host is set up in a way that Sparkle can auto-detect, after a few seconds you will see the location save screen, signaling setup completion.

If you haven’t set a master password, you will also see the password prompt.

Intermediate step

The purpose of the publishing setup is for Sparkle to find the server folder where the domain or web address lives. Where this folder lives on the server is not a standard, though there are some common patterns, so before getting to this step Sparkle attempts to auto detect it making some educated guesses, and publishing a detection file to the server, then checking its existence at the web address you entered.

But in some cases Sparkle can’t figure it out, either your web host is using a folder naming scheme that Sparkle doesn’t know about, or a server cache is interfering with the “probe file” from showing up at the web address. In these cases you need to assist Sparkle to complete the setup.

Before the setup completion screen, Sparkle will show the filesystem of your web server, and you will need to locate the folder where the website needs to be published, to be visible at the requested address, if your domain has older content then the folder containing that content is the right one.

A couple common issues that will prevent this from working entirely:

  • if the FTP user can’t access the folder with the website files, because it has a restriction to access a folder lower in the filesystem tree, you will need to modify or recreate the FTP account on the web host, and give it unrestricted access to the server folder;
  • if you are setting up the website on a new web host, but the domain is still on a previous web host, or is in the process of moving, Sparkle will be unable to access the “probe file” on the new web host, you will need to wait for the domain transfer to complete.

Publishing updates

When you make changes and want to update the website, click on the Publish toolbar icon and click on the Publish button for each location you want to update.

A notification will inform you of the publish completion.

Publishing performance

Sparkle’s goal when publishing is the performance of the published website. This has informed some choices that make the publishing process slower than what would be intuitive, but the end goal is a speedy experience for the site visitor.

For example:

  • during publishing Sparkle will use image compression algorithms that favor higher compression (and smaller file sizes), at the expense of compression time;
  • the main html file for each page, and the corresponding javascript and css files, are all re-generated every time the site is published, this is designed to work with server and browser caches.

In order to avoid re-compressing the images every time you publish, Sparkle associates a disk cache with each publish location, you can manually clear it from the Sparkle preferences window, but more importantly re-using the same publish location is what ensures publishing is fast and only transfers changed files.

Please report any shortcoming in this documentation and we’ll fix it as soon as possible!

Updated for Sparkle 5.2

Made with Sparkle

Copyright © Crinon SRL 

This website makes use of cookies.

Please see our privacy policy for details.

It’s Okay