Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Static Offline Site Generator #309

Open
MicroUpdate opened this issue Sep 3, 2014 · 17 comments
Open

Feature Request: Static Offline Site Generator #309

MicroUpdate opened this issue Sep 3, 2014 · 17 comments

Comments

@MicroUpdate
Copy link

Create a system to allow a wordpress site to be run completely offline from the database and plugins, e.g. from pure html. This would give great options for speed, compatibility, and the ability to create snapshots (live) of sites during development and deployment.

@raamdev raamdev changed the title Feature Request: Static Offline Site Generator" Feature Request: Static Offline Site Generator Sep 3, 2014
@raamdev
Copy link
Contributor

raamdev commented Sep 3, 2014

@MicroUpdate Thank you for the feature request! I'm marking this as an enhancement for consideration during a future development cycle.

@aziernest
Copy link

I would like to vote/request for the same feature as well, and when creating this feature it would be great to provide regex patern to follow / create static files.

like create static files for all posts or all category pages etc... { or exclusion pattern }

@raamdev
Copy link
Contributor

raamdev commented Nov 2, 2014

@aziernest Great idea! Thanks for the suggestion. :)

@aziernest
Copy link

Do you have any place where can I see when it can be implemented into quickcache?

@raamdev
Copy link
Contributor

raamdev commented Nov 5, 2014

@aziernest There is no ETA at the moment. When this feature gets added to a development cycle this issue will be updated to let you know.

@ChrMll
Copy link

ChrMll commented Oct 23, 2015

I also would like to back this idea. By seeing some static site / cache generators I'm pretty sure that ZenCache brings by far the best prerequisites for a good working and very flexible static site generator.

The Auto-Cache Engine could keep the static version up2date and when publishing something new one just would need an possibility to add that new page/post to the cache.Would be awesome!

@raamdev
Copy link
Contributor

raamdev commented Oct 24, 2015

The Auto-Cache Engine could keep the static version up2date and when publishing something new

@ChrMll Interesting idea! Thank you for the feedback and the vote for this feature.

@jaswsinc It looks like the idea suggested above would require working on #417 first. I'm curious to see a draft of steps that you feel are necessary to start working towards this GitHub issue, as a Static Offline Site Generator seems like an attractive feature to have and it seems like we're already mostly there. :-)

@aziernest
Copy link

@raamdev static files would be great as they will keep serving site users/visitors even if mysql crashed or php-fpm has any issue, it only need to have nginx or apache working and site will be up and running.

Lastly, I have got another feature request i.e

clear cache for separate pages
i.e
clear "post cache"
clear "category/tags cache"

particularly, posts caching is something that rarely requires update even when new post is published, the category page changes, home page and / or tag pages too but not previously published post, so it would be a good idea to keep post cache for longer time, and even if we need to clear cache, we just clear everything except posts.

@jaswrks
Copy link

jaswrks commented Oct 25, 2015

@jaswsinc It looks like the idea suggested above would require working on #417 first. I'm curious to see a draft of steps that you feel are necessary to start working towards this GitHub issue, as a Static Offline Site Generator seems like an attractive feature to have and it seems like we're already mostly there. :-)

There was a point in the recent past when I would have said this is something that we could work into the current version of ZenCache as an enhancement, and that we could just sit this enhancement right alongside the existing functionality.

However, after a lot of the work that we have done to optimize ZenCache as a cache plugin first and foremost, to add multisite compat., domain mapping compat, statistics, etc, etc... I feel like the current branched cache structure is not a good fit for being used a static site clone.

The branched cache structure that we have ended up with in ZenCache is one that had to be optimized for easy cache clearing under a variety of conditions. Often times, our work on cache functionality leads us into a much different direction than we would go in for a static site generator. A static site generator being much simpler to deal with actually.

Having said all of that, the ZenCache codebase and the things we have learned from working on it, would certainly be a great way to get started on a static site generator. There is much of the code that could be reused in order to build one.

A quick outline of what it would take:

  • A separate /static sub-directory that is not a part of the cache, but instead designed specifically for static site generation.
  • A new variation of the very powerful buildCachePath() method in ZenCache. A new variation could be specifically designed with static site generation in mind; i.e., one that is not so concerned with cache optimization and accessibility from a pruning standpoint, but one that is focused entirely on cloning the site in static form.
  • A new .htaccess file that would go into the /static sub-directory and be capable of rewriting the original links found in the static version of the site automatically. This way the static site that is generated could simply be dropped into place as a static fallback— as @aziernest mentioned.
  • Improvements to the existing ACE in ZenCache, and then a second version of that improvement that would be specifically designed for static site generation; i.e., work more like a spider/crawler than as a cache primer. The code for both would be similar, but for static site generation there would most likely be some minor differences. A separate class file for this would be best I think.

@aziernest
Copy link

@jaswsinc great explaination / comment, does it means that you people might develop additional plugin for static site generator?

Since most of zencache code has to be reused, I don't think it would require lots of development time to do so(having said that let me admit I am being excited to have it soon in my hands ;-) .So, when do I expect it ? :-P )

@nicolinuxfr
Copy link

If you add this feature, I'll switch to ZenCache instantly ! It's precisely what I want and no other cache plugin does it.

So, I hope you'll be able to achieve this. :-)

@raamdev
Copy link
Contributor

raamdev commented Oct 26, 2015

@aziernest writes...

Lastly, I have got another feature request

Please open a separate GitHub issue for that feature request. :-)

@raamdev
Copy link
Contributor

raamdev commented Oct 26, 2015

@jaswsinc writes...

I feel like the current branched cache structure is not a good fit for being used a static site clone.
[...]
Having said all of that, the ZenCache codebase and the things we have learned from working on it, would certainly be a great way to get started on a static site generator. There is much of the code that could be reused in order to build one. A quick outline of what it would take:

Sounds like a plan! 😄 Thanks for outlining that.

@raamdev
Copy link
Contributor

raamdev commented Oct 27, 2015

@aziernest I see that you already opened another GitHub issue for this. 😄 Thanks! #596

@superian
Copy link

Yes please for this. The competition - WP Static HTML Output and Really Static - have major problems.

I have several sites that are very unlikely to change: they're kept as archives of sites up to 10 years old and don't have comments or other dynamic features enabled. I have their cache expiries set to years, but it would be lovely to just have them serve HTML rather than have PHP available just in case they do change.

@jaswrks
Copy link

jaswrks commented Dec 29, 2015

@superian Thanks for the +1. :-)

@raamdev
Copy link
Contributor

raamdev commented Mar 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants