-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
grav-docs.ru |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* Switch config based on the language context subdir | ||
* | ||
* DO NOT EDIT UNLESS YOU KNOW WHAT YOU ARE DOING! | ||
*/ | ||
|
||
use Grav\Common\Filesystem\Folder; | ||
|
||
$languageContexts = [ | ||
'de-AT', | ||
'de-CH', | ||
'de-DE', | ||
]; | ||
|
||
// Get relative path from Grav root. | ||
$path = isset($_SERVER['PATH_INFO']) | ||
? $_SERVER['PATH_INFO'] | ||
: Folder::getRelativePath($_SERVER['REQUEST_URI'], ROOT_DIR); | ||
|
||
// Extract name of subdir from path | ||
$name = Folder::shift($path); | ||
|
||
if (in_array($name, $languageContexts)) { | ||
return [ | ||
'streams' => [ | ||
'schemes' => [ | ||
'config' => [ | ||
'type' => 'ReadOnlyStream', | ||
'prefixes' => [ | ||
'' => [ | ||
'environment://config', | ||
'user://config/' . $name, | ||
'user://config', | ||
'system/config', | ||
], | ||
], | ||
], | ||
], | ||
], | ||
]; | ||
} | ||
|
||
return []; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* Multisite setup for sub-directories or path based | ||
* URLs for subsites. | ||
* | ||
* DO NOT EDIT UNLESS YOU KNOW WHAT YOU ARE DOING! | ||
*/ | ||
|
||
use Grav\Common\Filesystem\Folder; | ||
|
||
// Get relative path from Grav root. | ||
$path = isset($_SERVER['PATH_INFO']) | ||
? $_SERVER['PATH_INFO'] | ||
: Folder::getRelativePath($_SERVER['REQUEST_URI'], ROOT_DIR); | ||
|
||
// Extract name of subsite from path | ||
$name = Folder::shift($path); | ||
$folder = "sites/{$name}"; | ||
$prefix = "/{$name}"; | ||
|
||
if (!$name || !is_dir(ROOT_DIR . "user/{$folder}")) { | ||
return []; | ||
} | ||
|
||
// Prefix all pages with the name of the subsite | ||
$container['pages']->base($prefix); | ||
|
||
return [ | ||
'environment' => $name, | ||
'streams' => [ | ||
'schemes' => [ | ||
'user' => [ | ||
'type' => 'ReadOnlyStream', | ||
'prefixes' => [ | ||
'' => ["user/{$folder}"], | ||
] | ||
] | ||
] | ||
] | ||
]; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* Multisite setup for subsites accessible via sub-domains. | ||
* | ||
* DO NOT EDIT UNLESS YOU KNOW WHAT YOU ARE DOING! | ||
*/ | ||
|
||
use Grav\Common\Utils; | ||
|
||
// Get subsite name from sub-domain | ||
$environment = isset($_SERVER['HTTP_HOST']) | ||
? $_SERVER['HTTP_HOST'] | ||
: (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost'); | ||
// Remove port from HTTP_HOST generated $environment | ||
$environment = strtolower(Utils::substrToString($environment, ':')); | ||
$folder = "sites/{$environment}"; | ||
|
||
if ($environment === 'localhost' || !is_dir(ROOT_DIR . "user/{$folder}")) { | ||
return []; | ||
} | ||
|
||
return [ | ||
'environment' => $environment, | ||
'streams' => [ | ||
'schemes' => [ | ||
'user' => [ | ||
'type' => 'ReadOnlyStream', | ||
'prefixes' => [ | ||
'' => ["user/{$folder}"], | ||
] | ||
] | ||
] | ||
] | ||
]; |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<browserconfig> | ||
<msapplication> | ||
<tile> | ||
<square150x150logo src="/assets/images/mstile-150x150.png"/> | ||
<TileColor>#da532c</TileColor> | ||
</tile> | ||
</msapplication> | ||
</browserconfig> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "Grav CMS Russian Docs", | ||
"short_name": "Grav CMS Russian Docs", | ||
"icons": [ | ||
{ | ||
"src": "/assets/images/android-chrome-192x192.png", | ||
"sizes": "192x192", | ||
"type": "image/png" | ||
} | ||
], | ||
"theme_color": "#ffffff", | ||
"background_color": "#ffffff", | ||
"start_url": "https://grav-docs.ru", | ||
"display": "standalone" | ||
} |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.