Search

Inspired by github pages and hyde I wondered if symphony could be used to generate real static pages based of xml and or markdown flatfiles.
The examples do have some limited dynamic abilities to perform on the static files (for archive,…) but most dynamic features on a website today could easily be added by external (social) services, ea: comments handled by http://disqus.com/.

One could consider a local symphony install with a workflow to push the static generated files to the life server automagically.
But in my case I would get all the data from a desktop app that has its own database and exports xml, and for blogging from a posterous feed. So the idea is that the real data is handled in the cloud or on the desktop, and symphoyn is just the templating sytem, adding navigation.

All static files makes it great for version control, overal more simple, and ofcourse very performant.

Question remains however if google sitesearch on your static pages can be as good as queries in your database…

Why use Symphony at all? You could write a very small PHP script to open the necessary XML feeds, apply an XSLT file, and return the output.

I thought in the light of more settings moving out of the database, it could be an optional setting (data from xml, generate xhtml) for symphony 3.0? Also some kind of navigation template and probaly other core symphony features would still be needed.
Also I mean really static xhtml; xslt only parsed 1 time, and then a xhtml file with the result written in the directory.
Do you have any (personal) view on DB search VS google sitesearch, and on the idea of serving real static pages for very large websites in general?

Also I mean really static xhtml; xslt only parsed 1 time, and then a xhtml file with the result written in the directory.

This is what the CacheLite extension achieves.

Do you have any (personal) view on DB search VS google sitesearch, and on the idea of serving real static pages for very large websites in general?

Not reeeally, each has a time and place.

Searching directly from your database is best if you have specific fields you are scoping your search upon. Google search is great for a full-site search. I often use Amazon as an example. The keyword search on amazon.com searches products and products only. So if amazon.com were built using Symphony it would be best done as a Data Source on a Products section, searching within specific product fields (name, description, keywords etc.) Using a Google search in this instance would be misleading since Google also indexes the other cr*p on the page that you might not want used to represent your “product” in a keyword search.

As for serving of static pages, this is often a good thing. I’ve done it with Symphony in two ways:

  • deploy Symphony and enable CacheLite so that after the first page load the static HTML is served instead
  • a custom “Static Site Exporter” extension (Alistair wrote one for us for use with Symphony 2rev5, about two years ago) to spider/index a site, ZIP the contents and FTP to a static webserver that didn’t run PHP/MySQL

The performance gains are considerable so there’s a definite advantage. But if your site has plenty of user-generated content (comments, uploading, login) then it may be more trouble than it’s worth.

Any plans to have a Static Site Exporter extension updated and available with the final 2.0 release? I’m happy to try my hand at updating it for 2.0.8RC3, if it comes to that. This would be very useful for what I do on a daily basis, developing HTML/CSS prototypes.

I’ll check with Airlock, since I believe it was a paid-for extension at the time. It’d be a great one to have updated to 2.0.8 when it’s eventually released.

We would be more than happy to see this released to the community.

Actually I had no idea that it hadn’t already been… a central tenet of our business is that our work should be free and Open Source - an opt out rather than opt-in setup.

Great :-) In the weeks after the Symposium meetup I’ll get this into working order.

Great! Thanks, Joseph and Nick. Looking forward to the release and to seeing you in London.

I always thought karova was the only ecommerce using xslt, but recently ran across thisone which, interestingly also creates static pages to serve up. In fact a local symphony and the custom “Static Site Exporter” extension would be perfectly capable of achieving that I think.

Any news on the release of the extension?

Any news on the release of the extension?

I modified it to work with Symphony 2.0.8RC1 some time ago but I don’t know if I still have it. It’s definitely on my to-do list, since I want to use it for building static prototypes of sites — so that they can quickly be uploaded ans verioned via FTP for client review without the need to create new virtual hosts and databases.

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