Download the PHP package webiny/static-render without Composer

On this page you can find all versions of the php package webiny/static-render. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package static-render

Static render

Static render is an app that does server side render of your Webiny React app and produces a static HTML snapshot.

The app only kicks in when a bot visits the site and it works only if the site is in production mode.

Reason behind this app

We use Webiny, which is a React based platform, to build both websites as well as web applications. For web applications it doesn’t really matter, but for websites, it's important that they can be properly indexed by bots and other crawlers.

Google claims that their bot can read and execute JavaScript, which is true, but only partially. There are some limitations, which are not documented and we are not certain what they are exactly. But we know that there are some because some of our pages were not indexed properly or not indexed at all, which is bad for us and our customers.

Another reason for building this app is that other search engines, like Bing, Yahoo, Baidu, DuckDuckGo and others, they don’t execute JS at all. And finally, sharing a JS page on Facebook or Twitter, just doesn’t work.

Dependencies

This is a Webiny app, meaning you need to use Webiny platform as the foundation for your website to use this application. To learn more about Webiny, head over to http://www.webiny.com/

Additionally you need to have the following items:

PhantomJs 2.5.0

At the point of writing this file, Phantom 2.5.0-beta was released. From that version onwards PhantomJs supports ES6, so we jumped on the beta ship straight away. Since we are transpiling our JS using webpack, version 2.1.1 is also enough to render the pages correctly.

Installing the 2.5.0-beta requires a few steps and here is what you need to do if you are running Ubuntu (like our Vagrant machine):

  1. Download the binary from this link: https://bitbucket.org/ariya/phantomjs/downloads/

Extract the archive:

Run the install scripts (and update the paths to match the version you downloaded):

Configuration

The app has few config parameters. Here is a sample config and the explanation below:

ResourceTimeout Defines how log to wait before taking the snapshot of the DOM. If you see that some of your components are not loading, try increasing the number. The number is in milliseconds.

CacheTtl Once a snapshot is created, it is cached and this number defines for how long. The number is in seconds.

PathToPhantomJs This is the path to PhantomJs executable. If you installed PhantomJs using the steps in the previous section, you can set the path to the value that’s in the sample config.

PathToNode This is path to your node executable. If you made couple of updates to your node installation, the app might run an older version of node, depending on how your paths are set. By forcing a specific path to the node app, you can make sure it executes the commands using the latest node version.

Features

The app also has a user interface. Using the interface via the Webiny administration you can access additional features. Those features are:

License and Contributions

Contributing > Feel free to send PRs.

License > MIT


All versions of static-render with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webiny/static-render contains the following files

Loading the files please wait ....