juhlinus / depictr Goto Github PK
View Code? Open in Web Editor NEWA middleware for rendering static pages when crawled by search engines
A middleware for rendering static pages when crawled by search engines
Won't this package increase the response time for crawlers since the middleware is launching a new Chromium instance? Therefor resulting in a negative SEO effect for bots that doesn't parse and execute JS?
Hi, do you have a wiki or documentation of this package?
Hello, I wanted to test whether the rendering result was successful, so I added a Laravel project and installed Depictr, running in my Homestead, and forced to return the rendered page:
vendor/juhlinus/depictr/src/Middleware.php
<?php
...
public function handle($request, Closure $next): Response
{
$response = $this->requestRenderedPage($request->fullUrl());
return response($response['content'], $response['code']);
// if ($this->shouldDepict($request)) {
// try {
// $response = $this->requestRenderedPage($request->fullUrl());
// } catch (RuntimeException $exception) {
// return $next($request);
// }
// return response(
// $response['content'],
// $response['code'],
// );
// }
// return $next($request);
}
But when I browse the Laravel page, I get the following error:
How can I solve it?
Would it be possible to include a demonstration setup within the project. It looks like a great piece of software, but I don't know where to begin troubleshooting since it doesn't appear to be doing anything in my setup.
Are extra dependencies required? Or should it just be a case of require and publish?
Hi! Thx for package!
I got error here src/Middleware.php
try {
$response = $this->requestRenderedPage($request->fullUrl());
}
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http DELETE to /session/fde5d9782c2792d530ff42f7a9b2fd0b
Operation timed out after 30000 milliseconds with 0 bytes received in file /home/ivan/www/inertia/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php on line 331
php 7.4
Laravel 8
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.