blob: 34004e771400e6ca2a1272a9430272f7e0f5a525 [file] [log] [blame]
Akronc71176d2022-03-14 11:15:07 +01001use Mojo::ByteStream 'b';
Akron85559f02023-09-04 11:42:45 +02002
Marc Kupietza1675022026-01-19 18:52:47 +01003# $main::ENV{MOJO_MAX_LINE_SIZE} = 65536;
Akron85559f02023-09-04 11:42:45 +02004
Akronc71176d2022-03-14 11:15:07 +01005{
Akronc71176d2022-03-14 11:15:07 +01006 'Kalamar-Auth' => {
Marc Kupietza1675022026-01-19 18:52:47 +01007 # client_id => b($app->home->child('.client_id')->slurp)->trim,
8 # client_secret => b($app->home->child('.client_secret')->slurp)->trim,
9 # Optimized for docker usage:
10 client_file => '/kalamar/super_client_info',
Akronc71176d2022-03-14 11:15:07 +010011 oauth2 => 1,
12 experimental_client_registration => 1
13 },
14 Kalamar => {
Marc Kupietza1675022026-01-19 18:52:47 +010015 # Removed for docker compliance
16 # api_path => 'http://10.0.10.51:9000/api/',
Marc Kupietz4f28dc42026-07-21 19:39:29 +020017 # Render Markdown doc pages (*.html.md) with headings at their literal
18 # level, so "##" in the corpus release log is an <h2> (matches the rest
19 # of the doc pages) rather than being pushed down by the default offset.
20 Markdown => { heading_offset => 0 },
Akron4a118742023-09-04 11:41:46 +020021 log_path => $app->home . '/log',
Akronc71176d2022-03-14 11:15:07 +010022 secure_cookie => 1,
23 https_only => 1,
24 plugins => ['Auth', 'Piwik','Plugins'],
25 experimental_proxy => 1,
26 proxy_inactivity_timeout => 120,
27 proxy_connect_timeout => 120,
Akron8ceba022024-04-18 09:18:53 +020028 openapi => 'openapi',
Akronc71176d2022-03-14 11:15:07 +010029 Piwik => {
30 ping_requests => 1,
31 ping_site_id => 13
32 },
33 navi_ext => [
34 {
Akron56644052026-01-19 15:27:48 +010035 "title" => "corpus",
36 "id" => "corpus",
37 "class" => "folded",
38 "items" => [
39 {
Marc Kupietz4f28dc42026-07-21 19:39:29 +020040 "title" => "releases",
41 "id" => "releases"
42 },
43 {
Akron56644052026-01-19 15:27:48 +010044 "title" => "composition",
45 "id" => "composition"
46 },
47 {
48 "title" => "useful_subcorpora",
49 "id" => "useful_subcorpora"
50 },
51 {
52 "title" => "named_vc",
53 "id" => "named_vc"
54 }
55 ]
Akronc71176d2022-03-14 11:15:07 +010056 },
57 {
58 "title" => "Privacy",
59 "id" => "privacy"
60 },
Akron8dbf9c62024-03-20 17:24:15 +010061 {
62 "title" => "News",
63 "id" => "news"
64 },
Akronc71176d2022-03-14 11:15:07 +010065 ],
Marc Kupietza1675022026-01-19 18:52:47 +010066 defaults => {
67 alignment => 'center' # or 'right' or 'center'
68 },
Akronc71176d2022-03-14 11:15:07 +010069 },
70 CSP => {
71 'frame-src' => 'self',
72 'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/']
73 },
74 'Kalamar-Plugins' => {
Marc Kupietza1675022026-01-19 18:52:47 +010075 # Optimized for docker usage:
76 default_plugins => '/kalamar/default.plugins.json'
Akronc71176d2022-03-14 11:15:07 +010077 },
78 Piwik => {
79 url => 'https://stats.ids-mannheim.de',
80 token_auth => '8515ea786127a63a2974de25a0808b00',
81 site_id => 8,
82 embed => 1
83 },
84 hypnotoad => {
85 listen => ['http://*:4348'],
86 workers => 5,
87 inactivity_timeout => 120,
88 proxy => 1
89 },
Akronc71176d2022-03-14 11:15:07 +010090 Localize => {
Marc Kupietza1675022026-01-19 18:52:47 +010091 override => 1,
Akronc71176d2022-03-14 11:15:07 +010092 dict => {
93 de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto',
94 en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account',
95 en_Nav_privacy => 'Privacy',
96 de_Nav_privacy => 'Datenschutz',
97 de_Nav_corpora => 'Korpora',
98 en_Nav_corpora => 'Corpora',
Marc Kupietza1675022026-01-19 18:52:47 +010099 de_Nav_corpus => 'Korpus',
100 en_Nav_corpus => 'Corpus',
Akronc71176d2022-03-14 11:15:07 +0100101 en_howToCite => 'Citation Help',
102 de_howToCite => 'Zitierhilfe',
103 en_recentCorpusPub => 'Recent publications to refer to DeReKo as linguistic research data',
104 de_recentCorpusPub => 'Neuere Publikationen zu DeReKo als linguistische Forschungsdatengrundlage',
Akronbd2b9572023-09-04 11:26:19 +0200105 en_recentToolPub => 'Recent publications to refer to KorAP as a research tool',
Akronc71176d2022-03-14 11:15:07 +0100106 de_recentToolPub => 'Neuere Publikationen zu KorAP als Forschungswerkzeug',
Marc Kupietz152dfc92025-04-11 10:02:27 +0200107 de_usefulvcs => 'Nützliche virtuelle Sub-Korpora',
108 en_usefulvcs => 'Useful virtual sub-corpora',
109 de_currentdb => 'Aktuelle Datengrundlage: virtuelles Korpus <%= t code => stash("vc") %>',
110 en_currentdb => 'Current data set: Virtual corpus <%= t code => stash("vc") %>',
111 de_compositionbysource => 'Zusammensetzung nach Quelle',
112 en_compositionbysource => 'Composition by source',
Marc Kupietza1675022026-01-19 18:52:47 +0100113 #de_Title_composition => 'Korpus-Zusammensetzung',
114 #en_Title_composition => 'Corpus Composition',
Akron56644052026-01-19 15:27:48 +0100115 en_Nav_composition => 'Composition',
116 de_Nav_composition => 'Zusammensetzung',
117 en_Nav_useful_subcorpora => 'Useful subcorpora',
118 de_Nav_useful_subcorpora => 'Nützliche Subkorpora',
119 en_Nav_named_vc => 'Named VC',
120 de_Nav_named_vc => 'Benamte VC',
Marc Kupietz4f28dc42026-07-21 19:39:29 +0200121 en_Nav_releases => 'Release Log',
122 de_Nav_releases => 'Versionsverlauf',
Akronc71176d2022-03-14 11:15:07 +0100123 }
124 },
125 'TagHelpers-ContentBlock' => {
126 footer => [
127 {
128 inline => '<%= link_to loc("about") => "https://www.ids-mannheim.de/digspra/kl/projekte/korap/" %>',
129 position => 70
130 },
131 {
Marc Kupietza1675022026-01-19 18:52:47 +0100132 inline => '<%= link_to loc("news") => url_for(doc => {page => "news" }) %>',
133 position => 72
134 },
135 {
Akrondc1b9bb2025-07-21 14:34:05 +0200136 inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "faq", scope => undef })->fragment("howToCite") %>',
Akronc71176d2022-03-14 11:15:07 +0100137 position => 75
138 },
139 {
Akrondc1b9bb2025-07-21 14:34:05 +0200140 inline => '<%= link_to loc("privacy") => url_for(doc => { page => "privacy", scope => undef }) %>',
Akronc71176d2022-03-14 11:15:07 +0100141 position => 90
142 },
143 {
144 inline => '<%= link_to loc("imprint") => "https://www.ids-mannheim.de/allgemein/impressum/" %>',
145 position => 80
146 },
147 ],
148 faq => [
149 {
150 position => 50,
151 inline => <<'HOWTOCITE'
152<section>
153 <h3 id="howToCite"><%= loc 'howToCite' %></h3>
154%= include 'custom/partial/citation'
155</section>
156HOWTOCITE
157 }
158 ],
159 loginInfo => [
160 {
161 inline => '<p><%== loc "loginExplanation" %></p>',
162 position => 50
163 }#,
164# {
165# inline => '<p class="announcement"><time datetime="2018-05-24">24.05.2018</time> Um weitere Anwendungen für die Nutzung von DeReKo anbieten zu können, haben wir die <%= link_to "Nutzungsvereinbarung", "https://www.ids-mannheim.de/cosmas2/projekt/registrierung/Nutzungsvereinbarung.html" %> angepasst!</p>',
166# position => 100
167# }
Akron743c2d62025-03-05 14:37:59 +0100168 ],
169 headerButtonGroup => [
170 {
Akrondc1b9bb2025-07-21 14:34:05 +0200171 inline => '<h3 class="nav-link"><%= link_to loc("news") => url_for(doc => {page => "news", scope => undef }) %></h3>',
Akron743c2d62025-03-05 14:37:59 +0100172 position => 30
173 }
Akronc71176d2022-03-14 11:15:07 +0100174 ]
175 },
Akronc71176d2022-03-14 11:15:07 +0100176 # See Mojolicious::Plugin::CHI
Marc Kupietza1675022026-01-19 18:52:47 +0100177 # Could be optimized to use the data folder in docker scenarios:
178# CHI => {
179# default => {
180# driver => 'FastMmap',
181# root_dir => app->home . '/cache/data',
182# cache_size => '500m',
183# max_size => '500m'
184# },
185# user => {
186# l1_cache => {
187# driver => 'FastMmap',
188# root_dir => app->home . '/cache/usermap',
189# cache_size => '50m',
190# max_size => '50m'
191# },
192# driver => 'File',
193# root_dir => app->home . '/cache/userfile',
194# max_key_length => 64,
195# max_size => '500m'
196# }
197# }
Akronc71176d2022-03-14 11:15:07 +0100198};