Search

Here’s question…

Is there any way to output a Symphony site to a purely XHTML site, with folder structure and assets?

I know it sounds a little weird, but the agency I now work for do flat-file sites for clients that don’t want to pay for a database, don’t want a CMS etc etc.

I’ve got so used to working in Symphony now, that I think using it as a development platform, so that we can do quick updates and store them in a database on the dev server is going to be useful, yet still be able to provide the site in XHTML to deploy on the live server for the client.

I don’t know if there is currently a way to do this, or whether it is feasible in an extension…

Any ideas??

Can’t they just organise some cheap MySQL shared hosting?

There were some talking about a Static site exporter extension but I don’t think it have ever been released to the public :(

Maybe you could use something like HTTrack to create a static copy?

I got about half way through making the unreleased Static Site Exporter extension work with Symphony 2.1 but never found the time to put the finishing touches to it for a proper public release. If you’re interested I’d be glad to put it onto Github for you to pick over.

I’ve just downloaded Sitesucker (Mac) to do this kind of thing with.

A static site exporter extension would be a great idea IMO…

Nick, that would be cool… How much dev would need to be done in your opinion, to get it working?

Cheers.

Great news Nick!

I think it works already, but it needs a few hours to get it to public release standard. I’ll take a look tomorrow.

I’ve watched the empty repo already ;o)

Site Sucker is your friend. I’ve used it in the past for exactly this, outputting and localising the files from a Symphony site.

Yeah Site Sucker is awesome.

We’ve used the static site exporter for projects where the client had a static server stack (the BBC circa 2007) and so access to PHP or MySQL was not an option. The client would manage their site via Symphony, hosted externally, and then click an Export button which would spider the site and FTP the files.

I’ve ripped out the FTP functionality for the time being as I think it’s more useful to first get a working crawler resulting in a static build.

I’ve been meaning to release for some time, as occasionally I use Symphony for rapid prototyping, and it’s easier to throw up a load of files into version-named directories on an FTP server than it is to set up lots of virtual hosts and databases.

It’s an interest concept of building static webpages. But the routes schema are the same just like in Symphony?

But the routes schema are the same just like in Symphony?

Depends on how your write your crawler :p But the answer is yes, a tool like site sucker will crawl your site (following the links therein) and download all the files you specify. If you want more control you probably have to write something custom. In the past we’ve (where by we I mean my workmate Tim) has written a Ruby script that crawls a Symphony site and converts it to a static site for use in a Phonegap iPhone app.

John did you give this a try? Is anyone else interested in this extension, is it worth pursuing?

Sounds awesome, @nickdunn — looking forward to trying it out. Wouldn’t a lot of the code behind that extension be reusable for generating a sitemap.xml file for a Symphony site? Have yet to find an extension that does that.

Yep I reckon so. During the crawl each unique page found is logged in a database table (sym_static_site_exporter_index) with its URL. This could be queried to build a sitemap.xml file with ease.

I might try this to push a site’s static pages to github (to use github pages as CDN). However from my mac I can do it with terminal or an app, but if the site is hosted (without shell access) would there be a way to update the crawled pages to github somehow?…

You could modify the extension so that instead of downloading a Zip of the archive, it FTPs the files to Github.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details