-
- /**
- * Show the view for /robots.txt.
- */
- public function robots()
- {
- $sitePublic = setting('app-public', false);
- $allowRobots = config('app.allow_robots');
-
- if ($allowRobots === null) {
- $allowRobots = $sitePublic;
- }
-
- return response()
- ->view('misc.robots', ['allowRobots' => $allowRobots])
- ->header('Content-Type', 'text/plain');
- }
-
- /**
- * Show the route for 404 responses.
- */
- public function notFound()
- {
- return response()->view('errors.404', [], 404);
- }
-
- /**
- * Serve the application favicon.
- * Ensures a 'favicon.ico' file exists at the web root location (if writable) to be served
- * directly by the webserver in the future.
- */
- public function favicon(FaviconHandler $favicons)
- {
- $exists = $favicons->restoreOriginalIfNotExists();
- return response()->file($exists ? $favicons->getPath() : $favicons->getOriginalPath());
- }
-
- /**
- * Serve the application manifest.
- * Ensures a 'manifest.json'
- */
- public function manifest()
- {
- $manifest = [
- "name" => config('app.name' | 'BookStack'),
- "short_name" => "bookstack",
- "start_url" => "/",
- "scope" => "/",
- "display" => "standalone",
- "background_color" => "#fff",
- "description" => config('app.name' | 'BookStack'),
- "categories" => [
- "productivity",
- "lifestyle"
- ],
- "launch_handler" => [
- "client_mode" => "focus-existing"
- ],
- "orientation" => "portrait",
- "icons" => [
- [
- "src" => "/icon-64.png",
- "sizes" => "64x64",
- "type" => "image/png"
- ],
- [
- "src" => "/icon-32.png",
- "sizes" => "32x32",
- "type" => "image/png"
- ],
- [
- "src" => "/icon-128.png",
- "sizes" => "128x128",
- "type" => "image/png"
- ],
- [
- "src" => "icon-180.png",
- "sizes" => "180x180",
- "type" => "image/png"
- ],
- [
- "src" => "icon.png",
- "sizes" => "256x256",
- "type" => "image/png"
- ],
- [
- "src" => "icon.ico",
- "sizes" => "48x48",
- "type" => "image/vnd.microsoft.icon"
- ],
- [
- "src" => "favicon.ico",
- "sizes" => "48x48",
- "type" => "image/vnd.microsoft.icon"
- ],
- ],
- ];
-
- return response()->json($manifest);
- }