Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Static sites w/ GS - speed & security. "GetSimpler"
#4
Thanks for the vote of confidence, Chris :-)

I think the pseudocode would look something like:

0. Specify a base URL from which the static version of your site will be accessed, and whether links in the static site should be relative or absolute.

1. Calculate all possible legitimate URLs that might be accessed from internal links between pages (optionally including e.g. plugins like blog), starting from the front page.

2. Run the PHP code for each of the URLs to make each page and save as .html in an appropriate directory underneath a root directory (static_html) which will be placed at the base URL. Track the mapping between URLs and HTML files.

3. Rewrite the <A> tags in the generated page to map to the correct .html file using the mapping above - optionally as either relative links or absolute links based on the base url.

4. Copy all referenced dependencies (IMG, CSS etc) to the correct place with the static_html folder.

(1) could be done by looking at GS's internal site structure metadata or by traditional web spidering. Metadata is probably the safer option given the risk that plugins may not behave as expected during spidering. On the other hand, spidering is more likely to be able to include content from plugins without further modification.
Reply


Messages In This Thread
Static sites w/ GS - speed & security. "GetSimpler" - by the_amusing_cow - 2011-07-19, 11:45:06



Users browsing this thread: 1 Guest(s)