mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Compare commits
58 Commits
8b10e991ac
...
c4d2f741ab
Author | SHA1 | Date | |
---|---|---|---|
|
c4d2f741ab | ||
|
fd71c57aab | ||
|
0be82b4f96 | ||
|
f83ec3a8b4 | ||
|
d00e2ed37c | ||
|
1a963974d8 | ||
|
7b9c67edc4 | ||
|
5655c93ea1 | ||
|
1db399d12d | ||
|
29862b5323 | ||
|
409aa2541d | ||
|
1a94e6033f | ||
|
9162b1af83 | ||
|
8ec45611e7 | ||
|
ce03fbcb62 | ||
|
4a22febc70 | ||
|
b720b424da | ||
|
2a2e472dc4 | ||
|
c576aa3369 | ||
|
7affeea418 | ||
|
53f24492c8 | ||
|
4fade907f3 | ||
|
3af17dff7b | ||
|
5aeee6f802 | ||
|
2632023981 | ||
|
42e1f1a308 | ||
|
6d875b7bb2 | ||
|
1ef8faecac | ||
|
0ec731507e | ||
|
1e74f6f57d | ||
|
68738e69a6 | ||
|
de53bbc13e | ||
|
b9352ef921 | ||
|
9c10fdd431 | ||
|
12bee9ca43 | ||
|
f3e998389a | ||
|
972c44894a | ||
|
8007008a78 | ||
|
6e20d52c09 | ||
|
ab84536c76 | ||
|
5764425a89 | ||
|
8d86682616 | ||
|
bb913d5809 | ||
|
55b963735a | ||
|
8c41fc086b | ||
|
df03d96800 | ||
|
9ffd4fdac8 | ||
|
0b4488b62f | ||
|
e65655594f | ||
|
514db60617 | ||
|
8bc6e75319 | ||
|
2f74cfb42c | ||
|
1302e3c959 | ||
|
a5b031f906 | ||
|
71e46c8c8e | ||
|
4f890c431c | ||
|
c110a97d8a | ||
|
476c2be5a6 |
@ -64,4 +64,14 @@ class MetaController extends Controller
|
||||
'jsLibData' => file_get_contents(base_path('dev/licensing/js-library-licenses.txt')),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the view for /opensearch.xml.
|
||||
*/
|
||||
public function opensearch()
|
||||
{
|
||||
return response()
|
||||
->view('misc.opensearch')
|
||||
->header('Content-Type', 'application/opensearchdescription+xml');
|
||||
}
|
||||
}
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'سياسة الخصوصية',
|
||||
'terms_of_service' => 'اتفاقية شروط الخدمة',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Политика за поверителност',
|
||||
'terms_of_service' => 'Условия на услугата',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Pravila o privatnosti',
|
||||
'terms_of_service' => 'Uslovi korištenja',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Política de privadesa',
|
||||
'terms_of_service' => 'Condicions del servei',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Zásady ochrany osobních údajů',
|
||||
'terms_of_service' => 'Podmínky služby',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Polisi Preifatrwydd',
|
||||
'terms_of_service' => 'Telerau Gwasanaeth',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -65,7 +65,7 @@ return [
|
||||
'auth_login' => 'loggede ind',
|
||||
'auth_register' => 'registered as new user',
|
||||
'auth_password_reset_request' => 'requested user password reset',
|
||||
'auth_password_reset_update' => 'reset user password',
|
||||
'auth_password_reset_update' => 'nulstil adgangskode',
|
||||
'mfa_setup_method' => 'configured MFA method',
|
||||
'mfa_setup_method_notification' => 'Multi-faktor metode konfigureret',
|
||||
'mfa_remove_method' => 'removed MFA method',
|
||||
@ -85,8 +85,8 @@ return [
|
||||
'webhook_delete_notification' => 'Webhooken blev slettet',
|
||||
|
||||
// Users
|
||||
'user_create' => 'created user',
|
||||
'user_create_notification' => 'User successfully created',
|
||||
'user_create' => 'opret bruger',
|
||||
'user_create_notification' => 'Bruger oprettet korrekt',
|
||||
'user_update' => 'updated user',
|
||||
'user_update_notification' => 'Brugeren blev opdateret',
|
||||
'user_delete' => 'deleted user',
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Privatlivspolitik',
|
||||
'terms_of_service' => 'Tjenestevilkår',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Datenschutzbestimmungen',
|
||||
'terms_of_service' => 'Allgemeine Geschäftsbedingungen',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Datenschutzerklärung',
|
||||
'terms_of_service' => 'Allgemeine Geschäftsbedingungen',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Πολιτική Απορρήτου',
|
||||
'terms_of_service' => 'Όροι χρήσης',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Privacy Policy',
|
||||
'terms_of_service' => 'Terms of Service',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Política de privacidad',
|
||||
'terms_of_service' => 'Términos de Servicio',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Buscar :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Política de privacidad',
|
||||
'terms_of_service' => 'Términos de Servicio',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Privaatsus',
|
||||
'terms_of_service' => 'Kasutustingimused',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Pribatutasun politika',
|
||||
'terms_of_service' => 'Zerbitzu-baldintzak',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'سیاست حفظ حریم خصوصی',
|
||||
'terms_of_service' => 'شرایط خدمات',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Tietosuojaseloste',
|
||||
'terms_of_service' => 'Palvelun käyttöehdot',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Politique de confidentialité',
|
||||
'terms_of_service' => 'Conditions d\'utilisation',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'מדיניות הפרטיות',
|
||||
'terms_of_service' => 'תנאי שימוש',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Politika privatnosti',
|
||||
'terms_of_service' => 'Uvjeti korištenja',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Adatvédelmi irányelvek',
|
||||
'terms_of_service' => 'Felhasználási feltételek',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Kebijakan Privasi',
|
||||
'terms_of_service' => 'Ketentuan Layanan',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Norme sulla privacy',
|
||||
'terms_of_service' => 'Condizioni del Servizio',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'プライバシーポリシー',
|
||||
'terms_of_service' => '利用規約',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Privacy Policy',
|
||||
'terms_of_service' => 'Terms of Service',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => '개인 정보 처리 방침',
|
||||
'terms_of_service' => '서비스 이용 약관',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Privatumo politika',
|
||||
'terms_of_service' => 'Paslaugų teikimo paslaugos',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Privātuma politika',
|
||||
'terms_of_service' => 'Pakalpojuma noteikumi',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Personvernregler',
|
||||
'terms_of_service' => 'Bruksvilkår',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Privacybeleid',
|
||||
'terms_of_service' => 'Algemene voorwaarden',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Personvernreglar',
|
||||
'terms_of_service' => 'Bruksvilkår',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Polityka prywatności',
|
||||
'terms_of_service' => 'Warunki usługi',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Política de Privacidade',
|
||||
'terms_of_service' => 'Termos de Utilização',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Políticas de Privacidade',
|
||||
'terms_of_service' => 'Termos de Serviço',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Politică de confidențialitate',
|
||||
'terms_of_service' => 'Termeni și condiții',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Политика конфиденциальности',
|
||||
'terms_of_service' => 'Условия использования',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Zásady ochrany osobných údajov',
|
||||
'terms_of_service' => 'Podmienky používania',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Pravilnik o zasebnosti',
|
||||
'terms_of_service' => 'Pogoji uporabe',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Privacy Policy',
|
||||
'terms_of_service' => 'Terms of Service',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Правила о приватности',
|
||||
'terms_of_service' => 'Услови коришћења',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Integritetspolicy',
|
||||
'terms_of_service' => 'Användarvillkor',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Gizlilik Politikası',
|
||||
'terms_of_service' => 'Hizmet Şartları',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Політика приватності',
|
||||
'terms_of_service' => 'Умови використання',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Maxfiylik siyosati',
|
||||
'terms_of_service' => 'Xizmat ko‘rsatish shartlari',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => 'Chính Sách Quyền Riêng Tư',
|
||||
'terms_of_service' => 'Điều khoản Dịch vụ',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => '隐私政策',
|
||||
'terms_of_service' => '服务条款',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -107,4 +107,7 @@ return [
|
||||
// Not directly used but available for convenience to users.
|
||||
'privacy_policy' => '隱私權政策',
|
||||
'terms_of_service' => '服務條款',
|
||||
|
||||
// OpenSearch
|
||||
'opensearch_description' => 'Search :appName',
|
||||
];
|
||||
|
@ -71,10 +71,12 @@ const modeMap = {
|
||||
ocaml: () => legacyLoad('oCaml'),
|
||||
py: () => legacyLoad('python'),
|
||||
python: () => legacyLoad('python'),
|
||||
r: () => legacyLoad('r'),
|
||||
rb: () => legacyLoad('ruby'),
|
||||
rs: () => legacyLoad('rust'),
|
||||
ruby: () => legacyLoad('ruby'),
|
||||
rust: () => legacyLoad('rust'),
|
||||
sas: () => legacyLoad('sas'),
|
||||
scala: () => legacyLoad('scala'),
|
||||
scheme: () => legacyLoad('scheme'),
|
||||
shell: () => legacyLoad('shell'),
|
||||
|
@ -16,8 +16,10 @@ export {pascal} from '@codemirror/legacy-modes/mode/pascal';
|
||||
export {powerShell} from '@codemirror/legacy-modes/mode/powershell';
|
||||
export {properties} from '@codemirror/legacy-modes/mode/properties';
|
||||
export {python} from '@codemirror/legacy-modes/mode/python';
|
||||
export {r} from '@codemirror/legacy-modes/mode/r';
|
||||
export {ruby} from '@codemirror/legacy-modes/mode/ruby';
|
||||
export {rust} from '@codemirror/legacy-modes/mode/rust';
|
||||
export {sas} from '@codemirror/legacy-modes/mode/sas';
|
||||
export {scheme} from '@codemirror/legacy-modes/mode/scheme';
|
||||
export {shell} from '@codemirror/legacy-modes/mode/shell';
|
||||
export {
|
||||
|
@ -32,6 +32,9 @@
|
||||
<link rel="manifest" href="{{ url('/manifest.json') }}">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
|
||||
<!-- OpenSearch -->
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="{{ setting('app-name') }}" href="{{ url('/opensearch.xml') }}">
|
||||
|
||||
@yield('head')
|
||||
|
||||
<!-- Custom Styles & Head Content -->
|
||||
|
12
resources/views/misc/opensearch.blade.php
Normal file
12
resources/views/misc/opensearch.blade.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName>{{ mb_strimwidth(setting('app-name'), 0, 16) }}</ShortName>
|
||||
<Description>{{ trans('common.opensearch_description', ['appName' => setting('app-name')]) }}</Description>
|
||||
<Image width="256" height="256" type="image/png">{{ setting('app-icon') ?: url('/icon.png') }}</Image>
|
||||
<Image width="180" height="180" type="image/png">{{ setting('app-icon-180') ?: url('/icon-180.png') }}</Image>
|
||||
<Image width="128" height="128" type="image/png">{{ setting('app-icon-128') ?: url('/icon-128.png') }}</Image>
|
||||
<Image width="64" height="64" type="image/png">{{ setting('app-icon-64') ?: url('/icon-64.png') }}</Image>
|
||||
<Image width="32" height="32" type="image/png">{{ setting('app-icon-32') ?: url('/icon-32.png') }}</Image>
|
||||
<Url type="text/html" rel="results" template="{{ url('/search') }}?term={searchTerms}"/>
|
||||
<Url type="application/opensearchdescription+xml" rel="self" template="{{ url('/opensearch.xml') }}"/>
|
||||
</OpenSearchDescription>
|
@ -26,7 +26,7 @@
|
||||
'Bash', 'CSS', 'C', 'C++', 'C#', 'Clojure', 'Dart', 'Diff', 'Fortran', 'F#', 'Go', 'Haskell', 'HTML', 'INI',
|
||||
'Java', 'JavaScript', 'JSON', 'Julia', 'Kotlin', 'LaTeX', 'Lua', 'MarkDown', 'MATLAB', 'MSSQL', 'MySQL',
|
||||
'Nginx', 'OCaml', 'Octave', 'Pascal', 'Perl', 'PHP', 'PL/SQL', 'PostgreSQL', 'Powershell', 'Python',
|
||||
'Ruby', 'Rust', 'Scala', 'Scheme', 'Shell', 'Smarty', 'SQL', 'SQLite', 'Swift',
|
||||
'R', 'Ruby', 'Rust', 'SAS', 'Scala', 'Scheme', 'Shell', 'Smarty', 'SQL', 'SQLite', 'Swift',
|
||||
'Twig', 'TypeScript', 'VBScript', 'VB.NET', 'XML', 'YAML',
|
||||
];
|
||||
@endphp
|
||||
|
@ -23,6 +23,7 @@ Route::get('/robots.txt', [MetaController::class, 'robots']);
|
||||
Route::get('/favicon.ico', [MetaController::class, 'favicon']);
|
||||
Route::get('/manifest.json', [MetaController::class, 'pwaManifest']);
|
||||
Route::get('/licenses', [MetaController::class, 'licenses']);
|
||||
Route::get('/opensearch.xml', [MetaController::class, 'opensearch']);
|
||||
|
||||
// Authenticated routes...
|
||||
Route::middleware('auth')->group(function () {
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests;
|
||||
namespace Tests\Meta;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class HelpTest extends TestCase
|
||||
{
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests;
|
||||
namespace Tests\Meta;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class LicensesTest extends TestCase
|
||||
{
|
@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests;
|
||||
namespace Tests\Meta;
|
||||
|
||||
use BookStack\Entities\Repos\BaseRepo;
|
||||
use BookStack\Entities\Repos\BookRepo;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Testing\TestResponse;
|
||||
use Tests\TestCase;
|
||||
|
||||
class OpenGraphTest extends TestCase
|
||||
{
|
42
tests/Meta/OpensearchTest.php
Normal file
42
tests/Meta/OpensearchTest.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Meta;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class OpensearchTest extends TestCase
|
||||
{
|
||||
public function test_opensearch_endpoint()
|
||||
{
|
||||
$appName = 'MyAppNameThatsReallyLongLikeThis';
|
||||
setting()->put('app-name', $appName);
|
||||
$resultUrl = url('/search') . '?term={searchTerms}';
|
||||
$selfUrl = url('/opensearch.xml');
|
||||
|
||||
$resp = $this->get('/opensearch.xml');
|
||||
$resp->assertOk();
|
||||
|
||||
$html = $this->withHtml($resp);
|
||||
|
||||
$html->assertElementExists('OpenSearchDescription > ShortName');
|
||||
$html->assertElementContains('OpenSearchDescription > ShortName', mb_strimwidth($appName, 0, 16));
|
||||
$html->assertElementNotContains('OpenSearchDescription > ShortName', $appName);
|
||||
|
||||
$html->assertElementExists('OpenSearchDescription > Description');
|
||||
$html->assertElementContains('OpenSearchDescription > Description', "Search {$appName}");
|
||||
$html->assertElementExists('OpenSearchDescription > Image');
|
||||
$html->assertElementExists('OpenSearchDescription > Url[rel="results"][template="' . htmlspecialchars($resultUrl) . '"]');
|
||||
$html->assertElementExists('OpenSearchDescription > Url[rel="self"][template="' . htmlspecialchars($selfUrl) . '"]');
|
||||
}
|
||||
|
||||
public function test_opensearch_linked_to_from_home()
|
||||
{
|
||||
$appName = setting('app-name');
|
||||
$endpointUrl = url('/opensearch.xml');
|
||||
|
||||
$resp = $this->asViewer()->get('/');
|
||||
$html = $this->withHtml($resp);
|
||||
|
||||
$html->assertElementExists('head > link[rel="search"][type="application/opensearchdescription+xml"][title="' . htmlspecialchars($appName) . '"][href="' . htmlspecialchars($endpointUrl) . '"]');
|
||||
}
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests;
|
||||
namespace Tests\Meta;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class PwaManifestTest extends TestCase
|
||||
{
|
35
tests/Meta/RobotsTest.php
Normal file
35
tests/Meta/RobotsTest.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Meta;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class RobotsTest extends TestCase
|
||||
{
|
||||
public function test_robots_effected_by_public_status()
|
||||
{
|
||||
$this->get('/robots.txt')->assertSee("User-agent: *\nDisallow: /");
|
||||
|
||||
$this->setSettings(['app-public' => 'true']);
|
||||
|
||||
$resp = $this->get('/robots.txt');
|
||||
$resp->assertSee("User-agent: *\nDisallow:");
|
||||
$resp->assertDontSee('Disallow: /');
|
||||
}
|
||||
|
||||
public function test_robots_effected_by_setting()
|
||||
{
|
||||
$this->get('/robots.txt')->assertSee("User-agent: *\nDisallow: /");
|
||||
|
||||
config()->set('app.allow_robots', true);
|
||||
|
||||
$resp = $this->get('/robots.txt');
|
||||
$resp->assertSee("User-agent: *\nDisallow:");
|
||||
$resp->assertDontSee('Disallow: /');
|
||||
|
||||
// Check config overrides app-public setting
|
||||
config()->set('app.allow_robots', false);
|
||||
$this->setSettings(['app-public' => 'true']);
|
||||
$this->get('/robots.txt')->assertSee("User-agent: *\nDisallow: /");
|
||||
}
|
||||
}
|
@ -128,33 +128,6 @@ class PublicActionTest extends TestCase
|
||||
$resp->assertDontSee($page->name);
|
||||
}
|
||||
|
||||
public function test_robots_effected_by_public_status()
|
||||
{
|
||||
$this->get('/robots.txt')->assertSee("User-agent: *\nDisallow: /");
|
||||
|
||||
$this->setSettings(['app-public' => 'true']);
|
||||
|
||||
$resp = $this->get('/robots.txt');
|
||||
$resp->assertSee("User-agent: *\nDisallow:");
|
||||
$resp->assertDontSee('Disallow: /');
|
||||
}
|
||||
|
||||
public function test_robots_effected_by_setting()
|
||||
{
|
||||
$this->get('/robots.txt')->assertSee("User-agent: *\nDisallow: /");
|
||||
|
||||
config()->set('app.allow_robots', true);
|
||||
|
||||
$resp = $this->get('/robots.txt');
|
||||
$resp->assertSee("User-agent: *\nDisallow:");
|
||||
$resp->assertDontSee('Disallow: /');
|
||||
|
||||
// Check config overrides app-public setting
|
||||
config()->set('app.allow_robots', false);
|
||||
$this->setSettings(['app-public' => 'true']);
|
||||
$this->get('/robots.txt')->assertSee("User-agent: *\nDisallow: /");
|
||||
}
|
||||
|
||||
public function test_default_favicon_file_created_upon_access()
|
||||
{
|
||||
$faviconPath = public_path('favicon.ico');
|
||||
|
Loading…
Reference in New Issue
Block a user