blob: 49698808b9e65a81c105d898b22093c7ebab19f9 [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 {
Marc Kupietz2bd89b32026-08-03 17:39:34 +020035 # Replaces Kalamar's default corpus section (same id) in place,
36 # extending it with the release-log sub-item.
Akron56644052026-01-19 15:27:48 +010037 "title" => "corpus",
38 "id" => "corpus",
39 "class" => "folded",
40 "items" => [
41 {
Marc Kupietz4f28dc42026-07-21 19:39:29 +020042 "title" => "releases",
43 "id" => "releases"
44 },
45 {
Akron56644052026-01-19 15:27:48 +010046 "title" => "composition",
47 "id" => "composition"
48 },
49 {
50 "title" => "useful_subcorpora",
51 "id" => "useful_subcorpora"
52 },
53 {
54 "title" => "named_vc",
55 "id" => "named_vc"
56 }
57 ]
Akronc71176d2022-03-14 11:15:07 +010058 },
59 {
60 "title" => "Privacy",
61 "id" => "privacy"
62 },
Akron8dbf9c62024-03-20 17:24:15 +010063 {
64 "title" => "News",
65 "id" => "news"
66 },
Akronc71176d2022-03-14 11:15:07 +010067 ],
Marc Kupietza1675022026-01-19 18:52:47 +010068 defaults => {
69 alignment => 'center' # or 'right' or 'center'
70 },
Akronc71176d2022-03-14 11:15:07 +010071 },
72 CSP => {
73 'frame-src' => 'self',
74 'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/']
75 },
76 'Kalamar-Plugins' => {
Marc Kupietza1675022026-01-19 18:52:47 +010077 # Optimized for docker usage:
78 default_plugins => '/kalamar/default.plugins.json'
Akronc71176d2022-03-14 11:15:07 +010079 },
80 Piwik => {
81 url => 'https://stats.ids-mannheim.de',
82 token_auth => '8515ea786127a63a2974de25a0808b00',
83 site_id => 8,
84 embed => 1
85 },
86 hypnotoad => {
87 listen => ['http://*:4348'],
88 workers => 5,
89 inactivity_timeout => 120,
90 proxy => 1
91 },
Akronc71176d2022-03-14 11:15:07 +010092 Localize => {
Marc Kupietza1675022026-01-19 18:52:47 +010093 override => 1,
Akronc71176d2022-03-14 11:15:07 +010094 dict => {
95 de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto',
96 en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account',
97 en_Nav_privacy => 'Privacy',
98 de_Nav_privacy => 'Datenschutz',
99 de_Nav_corpora => 'Korpora',
100 en_Nav_corpora => 'Corpora',
101 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',
Marc Kupietz4f28dc42026-07-21 19:39:29 +0200115 en_Nav_releases => 'Release Log',
Marc Kupietz2bd89b32026-08-03 17:39:34 +0200116 de_Nav_releases => 'Korpus-Releases',
Akronc71176d2022-03-14 11:15:07 +0100117 }
118 },
119 'TagHelpers-ContentBlock' => {
120 footer => [
121 {
122 inline => '<%= link_to loc("about") => "https://www.ids-mannheim.de/digspra/kl/projekte/korap/" %>',
123 position => 70
124 },
125 {
Marc Kupietza1675022026-01-19 18:52:47 +0100126 inline => '<%= link_to loc("news") => url_for(doc => {page => "news" }) %>',
127 position => 72
128 },
129 {
Akrondc1b9bb2025-07-21 14:34:05 +0200130 inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "faq", scope => undef })->fragment("howToCite") %>',
Akronc71176d2022-03-14 11:15:07 +0100131 position => 75
132 },
133 {
Akrondc1b9bb2025-07-21 14:34:05 +0200134 inline => '<%= link_to loc("privacy") => url_for(doc => { page => "privacy", scope => undef }) %>',
Akronc71176d2022-03-14 11:15:07 +0100135 position => 90
136 },
137 {
138 inline => '<%= link_to loc("imprint") => "https://www.ids-mannheim.de/allgemein/impressum/" %>',
139 position => 80
140 },
141 ],
142 faq => [
143 {
144 position => 50,
145 inline => <<'HOWTOCITE'
146<section>
147 <h3 id="howToCite"><%= loc 'howToCite' %></h3>
148%= include 'custom/partial/citation'
149</section>
150HOWTOCITE
151 }
152 ],
153 loginInfo => [
154 {
155 inline => '<p><%== loc "loginExplanation" %></p>',
156 position => 50
157 }#,
158# {
159# 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>',
160# position => 100
161# }
Akron743c2d62025-03-05 14:37:59 +0100162 ],
163 headerButtonGroup => [
164 {
Akrondc1b9bb2025-07-21 14:34:05 +0200165 inline => '<h3 class="nav-link"><%= link_to loc("news") => url_for(doc => {page => "news", scope => undef }) %></h3>',
Akron743c2d62025-03-05 14:37:59 +0100166 position => 30
167 }
Akronc71176d2022-03-14 11:15:07 +0100168 ]
169 },
Akronc71176d2022-03-14 11:15:07 +0100170 # See Mojolicious::Plugin::CHI
Marc Kupietza1675022026-01-19 18:52:47 +0100171 # Could be optimized to use the data folder in docker scenarios:
172# CHI => {
173# default => {
174# driver => 'FastMmap',
175# root_dir => app->home . '/cache/data',
176# cache_size => '500m',
177# max_size => '500m'
178# },
179# user => {
180# l1_cache => {
181# driver => 'FastMmap',
182# root_dir => app->home . '/cache/usermap',
183# cache_size => '50m',
184# max_size => '50m'
185# },
186# driver => 'File',
187# root_dir => app->home . '/cache/userfile',
188# max_key_length => 64,
189# max_size => '500m'
190# }
191# }
Akronc71176d2022-03-14 11:15:07 +0100192};