Can I automatically generate static website on my webspace? #139
-
Have some domain like admin.mydomain.de with my yellow installation where I maintain the system. Then I want mydomain.de to present only static html to the website visitor – the output of "php yellow.php build". This works for me but I had to install yellow on my localhost and upload the static output. The goal is to make the site even faster and a bit more secure by omitting php. Only pure and clear html. Chris |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments
-
I love it! Imagine under dynamic.domain.net you can access the dynamic (editable) version of your site and with a command on a kind of "cli" page, yellow would bake the static site for static.domain.net. Great idea IMO. richi |
Beta Was this translation helpful? Give feedback.
-
richi said it all. This is exactly what I want. |
Beta Was this translation helpful? Give feedback.
-
As I said before, I don't have shell access and I am not a developer. I go for the current solution of installing a local server. Happy new year! |
Beta Was this translation helpful? Give feedback.
-
There are several ways to deploy a website to your web hosting provider:
I am afraid to say that most good ways require shell access. If you have shell access then there are many possibilities. A cronjob is a good way, if you want to edit your website in one subdomain and publish it later to the official domain. Syncing files with rsync/Dropbox is a handy way, if you want to edit your website on one computer and publish it later to the official server. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Actually there is no need for ftp, dropbox or such, since both domains are hosted on the same machine, only in different directories. What is needed is just the ability to start the baking without shell access. Converting the cli plugin to a html plugin so to speak. Since my PHP knowledge is limited and rusty, I would at least need an educated guess wether this is possible at all. |
Beta Was this translation helpful? Give feedback.
-
What about adding a auto-generate "script" (enabled/disabled in the config) to automatically output a static version on visiting the site (in yellow.php) I will try to add the php build command in yellow.php later. |
Beta Was this translation helpful? Give feedback.
-
Here we go: https://github.com/richi/yellowcms-cli This is a small and experimental plugin for utilising the command line interface without shell access. Cheers, richi |
Beta Was this translation helpful? Give feedback.
-
If your site is running apache you can use mod_rewrite to serve files directly from the cache directory. Use the cli plugin https://github.com/richi/yellowcms-cli and run a plain "build" command. Yellow will fill the cache directory. Using the original .htaccess file yellow.php will check the cache first, but is still getting started and does the serving. With a modified .htaccess file any cached file will directly be served through apache without bothering yellow.php at all. On a shared host this might speed up things. Here is an example .htaccess file:
Cheers, richi |
Beta Was this translation helpful? Give feedback.
-
Thanks! I will have a look into that later. :-) |
Beta Was this translation helpful? Give feedback.
-
@CryssDOTnet: Have you already tested richis plugin? Does it work for you? Just want to know. |
Beta Was this translation helpful? Give feedback.
-
Hi, Build and Clean both appear to work on a vanilla installation (no testing with blog plugin). One issue - if you enter the name of a directory to clean that doesn't exist, you still get a message that it has been cleaned (will put this in the plugin issue queue). Thanks! This plugin is really good for windows users (particularly working with portable drives) since then we don't have to muck around changing paths in the windows system config which is pretty nasty. |
Beta Was this translation helpful? Give feedback.
-
I fixed a problem, that caused a lot of garbage files: https://github.com/richi/yellowcms-cli And this is a better .htaccess file for serving the data directly out of the cache.
On some shared servers (STRATO for example) DOCUMENT_ROOT is not working. If this is the case simply replace |
Beta Was this translation helpful? Give feedback.
Here we go:
https://github.com/richi/yellowcms-cli
This is a small and experimental plugin for utilising the command line interface without shell access.
This is the first shoot. It might eat all your date or nuke your server. Use at your own risk.
Cheers, richi